- 172
- 192 494
Charles Cabergs
Belgium
Приєднався 1 лис 2019
Just a computer guy doing computer stuff
Finally a terminal file explorer that doesn't suck!
Presentation of yazi, a terminal file explorer written in Rust with sane defaults and configuration.
I forgot to mention that you can create a file with `a` (it will create a directory if the name ends with /) and you can show hidden files by pressing `.`.
Yazi's website: yazi-rs.github.io/
Ueberzugpp: github.com/jstkdng/ueberzugpp
Dragon: github.com/mwh/dragon
Tips page: yazi-rs.github.io/docs/tips/
Make yazi the default file explorer: github.com/GermainZ/xdg-desktop-portal-termfilechooser
Social links:
Github: github.com/cacharle
Linkedin: www.linkedin.com/in/charles-cabergs
X: x.com/cacharle_
I forgot to mention that you can create a file with `a` (it will create a directory if the name ends with /) and you can show hidden files by pressing `.`.
Yazi's website: yazi-rs.github.io/
Ueberzugpp: github.com/jstkdng/ueberzugpp
Dragon: github.com/mwh/dragon
Tips page: yazi-rs.github.io/docs/tips/
Make yazi the default file explorer: github.com/GermainZ/xdg-desktop-portal-termfilechooser
Social links:
Github: github.com/cacharle
Linkedin: www.linkedin.com/in/charles-cabergs
X: x.com/cacharle_
Переглядів: 2 844
Відео
Host your pictures with immich
Переглядів 663День тому
Presentation of immich, the awesome self-hosted picture service. Website: immich.app/ Social links: Github: github.com/cacharle Linkedin: www.linkedin.com/in/charles-cabergs X: x.com/cacharle_
Advanced C 40: byte ordering
Переглядів 2,8 тис.14 днів тому
How to deal with differing byte ordering in C Social links: Github: github.com/cacharle Linkedin: www.linkedin.com/in/charles-cabergs X: x.com/cacharle_
The coolest way to record your shell
Переглядів 68814 днів тому
Showcase of the script and scriptreplay commands Social links: Github: github.com/cacharle Linkedin: www.linkedin.com/in/charles-cabergs X: x.com/cacharle_
Advanced C 39: const pointer VS pointer to const
Переглядів 76221 день тому
The difference between a const pointer and a pointer to something const. Social links: Github: github.com/cacharle Linkedin: www.linkedin.com/in/charles-cabergs X: x.com/cacharle_
Quickly build a REPL with the readline library
Переглядів 38121 день тому
Quickly build a REPL with the readline library
Easy screenshots from the terminal with scrot
Переглядів 720Місяць тому
Easy screenshots from the terminal with scrot
Modular exponentiation without overflow
Переглядів 442Місяць тому
Modular exponentiation without overflow
How spell checkers work under the hood
Переглядів 508Місяць тому
How spell checkers work under the hood
Access servers that are behind a gateway/bastion host
Переглядів 319Місяць тому
Access servers that are behind a gateway/bastion host
moreutils, when coreutils isn't enough
Переглядів 1,3 тис.Місяць тому
moreutils, when coreutils isn't enough
sed is more than search and replace
Переглядів 10 тис.2 місяці тому
sed is more than search and replace
Don't use awk or sed to parse simple fields in a text file
Переглядів 1,7 тис.2 місяці тому
Don't use awk or sed to parse simple fields in a text file
Advanced C 37: Digraphs and Trigraphs
Переглядів 2,4 тис.2 місяці тому
Advanced C 37: Digraphs and Trigraphs
Translate from the comfort of your terminal
Переглядів 7612 місяці тому
Translate from the comfort of your terminal
Advanced C 34: Sorting and Searching Algorithms
Переглядів 1,5 тис.3 місяці тому
Advanced C 34: Sorting and Searching Algorithms
Advanced C 33: Parse Command Line Arguments
Переглядів 1,6 тис.4 місяці тому
Advanced C 33: Parse Command Line Arguments
Been using Yazi for 6 months..smooth sailing so far. I don't need to do ls all the time!
38:46 it is, turns out there's a new OrPatterns extension that allows this (but with a `;` separator) and will be released in ghc 9.12
Just took a look, they seem nice. Thanks for pointing it out :)
Thank you! It helped me.
Best I could do is: solve1 :: String -> Int solve1 = sum . map (abs . foldr ((-) . read) 0) . transpose . map sort . transpose . map words . lines solve2 :: String -> Int solve2 = (\[left, right] -> sum $ map (\a -> length (filter (== a) right) * a) left) . transpose . map (map read . words) . lines I recently learned about the transpose function and I feel like it should be utilized more. Also I enjoyed the stream :) It's hard to find good haskell content usually it's just people talking about the absolute basics or trying to explain what a monad is.
Pretty impressive solutions I'm glad you enjoyed the streams :)
Never knew this is possible, thanks for sharing! Subbed!
This is very cool! thanks for sharing.
pretty happy with ranger but should check this one out👍
Feel free to try it out, it's pretty fast :)
Looks like a good file explorer...
merci ! trop marre de dolphin avec sa son interface de con impossible a personnaliser, c'est un regal d'utiliser ca a la place
thnx
Pretty cool !
Frère tu t'es littérallement doxxé avec la preview de ton contrat à 2:39 jpp Q.Q Faut faire gaffe tu sais pas qui peut voir la vidéo.
Je viens de retirer ça au cas ou mais bon, chuis juste un ptit youtuber
I clicked on this link thinking "it better be yazi" .. yes. yazi is that good.
thanks
You are great, I've found your channel like 14h ago, but I love the Advanced C series and also the tool you present. Your explanation are excellent because they're simple and come to the point. Keep on with your videos <3
Thanks a lot :)
Yo this is so sick
I have written math olymp, so I have not been on stream. Again, again + 1...again + N from Russia ;)
Ahahah, thank you again again Mr. Russia
This looks so much better than ranger, which i have been using so far. Im going to use this a lot
Let me know if you find it any good :)
hello est il possible d'avoir un repertoire dans la partie album qui soit privé merci
J'ai répondu dans l'autre commentaire
Hello est il possible de créer un album qui soit privé dont l'accès nécessite un mot de passe par exemple merci
Il est possible de créé des albums privé (en ajoutant un mot de passe) J'explique ça à 5:42
Yes
nnn is pretty great. It’s written in C so a bit easier/faster to get it running.
I'm getting weird results when I searched nnn.
I heard of it but I guess never had the time to dive in it. yazi just crossed my way earlier. They both seem nice but I don't see a reason to switch for now
@@cacharle nnn is more on the minimalistic side of things. I don't think you'll be wowed by it, after trying yazi. I have a soft spot for nnn because it's easy to modify it, but it's definitely not the most feature packed one.
@@khatakeddb I see what you mean
3:06 😅
Double me! 😅
let's goo 🎉
Best Englisch speaking frenchman
little endian is kinda annoying, if you want to deseralize some data into a struct you can't do it "automatically" with bit fields, you have to do everything manually sadly.
Indeed, that used to be my opinion aswell but some other comments have pointed out that little endian is faster when you want to cast a pointer to int32 to int16 or int8 (just go look for the other comments for a more detailed explanation) So know I think I appreciate little endian more 🙂
7:15 you can use the TypeApplication language extension to avoid doing `let levels :: <Type>` and instead read the values with `(map . map) (read @Int) s`
I've never seen that before, thanks Seems quite overkill for this usecase but I guess the goal of doing AoC in Haskell is to relearn Haskell so why not :D
I tried it and it works, altho the spacing is a bit strange: (read@Int) doesn't work (read @ Int) aswell but (read @Int) does 😄
50:42 the syntax you're looking for instead of `(\w -> read w :: Int) v` is the type application syntax `read @Int v`
50:23 instead of doing two nested maps, you can just do `(map . map) read` to make it two dimensional, and `(map . map . map) read` to go 3 layers of nesting deep
Indeed, it works and feels a bit cleaner, thanks!
I like your contact please continue 🌹
my contact?
Another great part about little endian is that a you can also know whatever the size of a type by fetching the first byte it will be the lowest part of the byte. If you have a u64 or u32 you have to skip forward different amounts to get the lowest byte.
Indeed, another comment mentioned that and it was a nice discovery for me
@@cacharle I've been dealing with a bunch of low level embedded stuff and this is great for it. Thanks for the regular short tutorials they are great. Keep it up!
do you also code in cpp?
I do but I'm better at C The newest C++ standards are discouraging tbh. It's a crazy amount of complexity and it seems poorly organized. (the error messages for template related things are also crazy) If I want that kind of complexity, I'd rather use Rust, which is also a complex language but much better organized imo
The reason Little Endian is used more is that is makes casting a noop. If a uint32_t is stored as [b0 b1 b2 b3], with b0 the least significant byte, then a pointer to that integer is automatically also a pointer to uint16_t [b0 b1], and to uint8_t b0.
Oooooooh thank you for that! super interesting
this is very helpful for understanding bitcoin script because satoshi used both types of endianness. Mind bending
Really? That sounds odd..
How'd you print out that printf template so quickly? Is it a vim feature?
It's not a template. It's line copy shortcut. In vscode, I would do it with cmd+c & cmd+v on a line without selecting any part of the line.
Indeed, it was just a copy/paste (yy then p in vim)
@@cacharle can you give use you neovim configuration?
@@IsdaouneAbderrahmane github.com/cacharle/dotfiles Look into config/nvim
I really don't think transparent background is working it's too distracting The old style was better
I like having more screen space for the code, I'll keep it like this unless too many people complain
@@cacharle i'm gonna be honest, i kinda agree with @zanehisako1416 on this one. The Transparency is not the problem. It's the weird artifacts around you that are a bit distracting. (maybe a greenscreen/bluescreen you can "chroma-key" out would be a nice alternative) Your video was very informative nontheless! keep it up!
It works well enough!
I think you should create video with some cute project, like terminal chat for linux or something else. Your videos Advanced C have very high quality! Thanks for content, from Russia
Yes, I do have plan of making more involved videos in which I build some small project The reason I haven't done them yet is simply lack of time
Cool video!
This is great! I'm just working on my toy project of huffman compressor and was worrying that it's not cross-platform while writing/reading files. Now I can remove all [FIXME] tags with this simple include.
Nice timing, the file you output will definitely be portable with this :D
i have a question: we have a file 'text.txt': hello from my file!1 if i read this file i get: line: 'hello', line_buffer_len: '64', read_size = '6' line: 'from', line_buffer_len: '64', read_size = '5' line: '', line_buffer_len: '64', read_size = '1' line: 'my', line_buffer_len: '64', read_size = '3' line: 'file!', line_buffer_len: '64', read_size = '6' last line is 'file!' though in file 'file!1' What to do in this case?
Could you give me your C code and the output of running `cat -e` on your text file? I do get the `file!1` when I try with: ❯ /usr/bin/cat -e getline_test.txt hello$ from$ $ my$ file!1$ ❯ /usr/bin/cat getline_test.c #include <stdio.h> #include <stdlib.h> int main(void) { FILE *f = fopen("./getline_test.txt", "r"); char *line = NULL; size_t line_size = 0; ssize_t read_size = 0; while ((read_size = getline(&line, &line_size, f)) != -1) printf("%s", line); free(line); fclose(f); return 0; }
My guess would be that you don't have a newline at the end of your file (I explain this at 5:15) If you're trimming the newline at the end of the line. You should add a condition to check if there is one: if (read_size > 0 && line[read_size - 1] == ' ') line[read_size - 1] = '\0';
Now I understand. Thank you!
@@cacharle code: #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main() { FILE *file = fopen("text.txt", "r"); char *line; size_t line_buffer_len = 0; ssize_t read_size = 0; while ((read_size = getline(&line, &line_buffer_len, file)) != -1) { line[read_size - 1] = '\0'; printf("line: '%s', line_buffer_len: '%zu', read_size = '%zu' ", line, line_buffer_len, read_size); } return 0; }
You can try asciinema too!
Oh yes, it looks like a modern rewrite of script with some server to upload the recordings Thank you for the recommendation
i use it but it's buggy with i3
That's unfortunate. Someone mentioned the flameshot program in another comment
Thanks for your setup Just curious - why did you consider using cgit, rather than gitea?
Because it was more minimal and easier to setup. I did try gitea on my home kubernetes cluster a few months ago and I can confirm that I am 100% happy with my cgit + git-shell approach, gitea is annoyingly complex, especially for one person. The only thing my personal git server is missing now is a git lfs integration
Thanks for this vid and for this series, it's very well made and useful! BTW If I understand correctly the linux permissions make most since as binary and not octal because they are essentially a bit flag, 111 (r,w,e) is 7 in decimal, 110, (r,w) is 6 and so on
I'm glad you're able to take somthing out of the videos. Indeed that permissions make sense in binary, it's just a convention to write them in octal (and it's also just more convenient)
Intéressant j'avais jamais vu ça merci !
Great video Charles ! Enjoyed a lot your channel
What’s the difference Between a const pointer and a pointer to const? Deze nuts
I'm still searching for good idea of memo-technique that helps me to memorize which const blocks what. I always get it wrong first time.
i don't know how helpful this is, but i usually try to read from right to left, so: `int * const x` becomes "x is a const pointer-to int" and `const int * x` becomes "x is a pointer-to const int"
I know you're supposed to read it in a "spiral" direction but I never learned that. Instead you can use this website if you get confused: cdecl.org/
fun fact, you can declare const in various orders like this int const x = 0; is the same as const int x = 0;
C is not confusing at all 😅
Love your content, keep it up!