Charles Cabergs
Charles Cabergs
  • 172
  • 192 494
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_
Переглядів: 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
Advanced C 38: Detect overflow
Переглядів 1,2 тис.28 днів тому
Advanced C 38: Detect overflow
Easy screenshots from the terminal with scrot
Переглядів 720Місяць тому
Easy screenshots from the terminal with scrot
Modular exponentiation without overflow
Переглядів 442Місяць тому
Modular exponentiation without overflow
Fast exponentiation using binary
Переглядів 453Місяць тому
Fast exponentiation using binary
Check if a number is prime, fast
Переглядів 1,5 тис.Місяць тому
Check if a number is prime, fast
How wildcards work under the hood
Переглядів 426Місяць тому
How wildcards work under the hood
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
Port forwarding over ssh
Переглядів 667Місяць тому
Port forwarding over ssh
moreutils, when coreutils isn't enough
Переглядів 1,3 тис.Місяць тому
moreutils, when coreutils isn't enough
Print number ranges with seq
Переглядів 4112 місяці тому
Print number ranges with seq
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
Advanced C 36: Directories
Переглядів 1,4 тис.2 місяці тому
Advanced C 36: Directories
Translate from the comfort of your terminal
Переглядів 7612 місяці тому
Translate from the comfort of your terminal
Advanced C 35: Hash Table
Переглядів 2,9 тис.3 місяці тому
Advanced C 35: Hash Table
Advanced C 34: Sorting and Searching Algorithms
Переглядів 1,5 тис.3 місяці тому
Advanced C 34: Sorting and Searching Algorithms
Handle mutable globals in Rust
Переглядів 4143 місяці тому
Handle mutable globals in Rust
Advanced C 33: Parse Command Line Arguments
Переглядів 1,6 тис.4 місяці тому
Advanced C 33: Parse Command Line Arguments
Advanced C 32: Packed Structs
Переглядів 2,9 тис.4 місяці тому
Advanced C 32: Packed Structs
Painless Arch Linux install
Переглядів 6614 місяці тому
Painless Arch Linux install
Advanced C 31: Complex Numbers
Переглядів 2,4 тис.5 місяців тому
Advanced C 31: Complex Numbers
Advanced C 30: static_assert
Переглядів 1,2 тис.5 місяців тому
Advanced C 30: static_assert

КОМЕНТАРІ

  • @pietraderdetective8953
    @pietraderdetective8953 День тому

    Been using Yazi for 6 months..smooth sailing so far. I don't need to do ls all the time!

  • @ponirvea
    @ponirvea День тому

    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

    • @cacharle
      @cacharle День тому

      Just took a look, they seem nice. Thanks for pointing it out :)

  • @hydrock9738
    @hydrock9738 2 дні тому

    Thank you! It helped me.

  • @nicholasleexyz
    @nicholasleexyz 4 дні тому

    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.

    • @cacharle
      @cacharle 4 дні тому

      Pretty impressive solutions I'm glad you enjoyed the streams :)

  • @devchaudhary78
    @devchaudhary78 5 днів тому

    Never knew this is possible, thanks for sharing! Subbed!

  • @lorforlinux
    @lorforlinux 5 днів тому

    This is very cool! thanks for sharing.

  • @shayan_heidari
    @shayan_heidari 5 днів тому

    pretty happy with ranger but should check this one out👍

    • @cacharle
      @cacharle 5 днів тому

      Feel free to try it out, it's pretty fast :)

  • @raaz9662
    @raaz9662 6 днів тому

    Looks like a good file explorer...

  • @tys_san
    @tys_san 6 днів тому

    merci ! trop marre de dolphin avec sa son interface de con impossible a personnaliser, c'est un regal d'utiliser ca a la place

  • @mnk4allcaps
    @mnk4allcaps 6 днів тому

    thnx

  • @aly-bocarcisse613
    @aly-bocarcisse613 6 днів тому

    Pretty cool !

  • @Xirnatts
    @Xirnatts 6 днів тому

    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.

    • @cacharle
      @cacharle 6 днів тому

      Je viens de retirer ça au cas ou mais bon, chuis juste un ptit youtuber

  • @gunarcom
    @gunarcom 6 днів тому

    I clicked on this link thinking "it better be yazi" .. yes. yazi is that good.

  • @prashlovessamosa
    @prashlovessamosa 6 днів тому

    thanks

  • @ginzilb3395
    @ginzilb3395 6 днів тому

    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

    • @cacharle
      @cacharle 6 днів тому

      Thanks a lot :)

  • @homermakes
    @homermakes 6 днів тому

    Yo this is so sick

  • @cordestandoff2358
    @cordestandoff2358 7 днів тому

    I have written math olymp, so I have not been on stream. Again, again + 1...again + N from Russia ;)

    • @cacharle
      @cacharle 7 днів тому

      Ahahah, thank you again again Mr. Russia

  • @Wobbelgenerator
    @Wobbelgenerator 7 днів тому

    This looks so much better than ranger, which i have been using so far. Im going to use this a lot

    • @cacharle
      @cacharle 7 днів тому

      Let me know if you find it any good :)

  • @kellynosoucy-y4j
    @kellynosoucy-y4j 7 днів тому

    hello est il possible d'avoir un repertoire dans la partie album qui soit privé merci

    • @cacharle
      @cacharle 7 днів тому

      J'ai répondu dans l'autre commentaire

  • @kellynosoucy-y4j
    @kellynosoucy-y4j 7 днів тому

    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

    • @cacharle
      @cacharle 7 днів тому

      Il est possible de créé des albums privé (en ajoutant un mot de passe) J'explique ça à 5:42

  • @youdontknowme2508
    @youdontknowme2508 8 днів тому

    Yes

  • @khatakeddb
    @khatakeddb 8 днів тому

    nnn is pretty great. It’s written in C so a bit easier/faster to get it running.

    • @CoolestPossibleName
      @CoolestPossibleName 8 днів тому

      I'm getting weird results when I searched nnn.

    • @cacharle
      @cacharle 7 днів тому

      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

    • @khatakeddb
      @khatakeddb 7 днів тому

      @@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.

    • @cacharle
      @cacharle 7 днів тому

      @@khatakeddb I see what you mean

  • @pedroprobst5230
    @pedroprobst5230 8 днів тому

    3:06 😅

    • @cacharle
      @cacharle 8 днів тому

      Double me! 😅

  • @Baka100
    @Baka100 8 днів тому

    let's goo 🎉

  • @jenstrudenau9134
    @jenstrudenau9134 8 днів тому

    Best Englisch speaking frenchman

  • @Brad_Script
    @Brad_Script 10 днів тому

    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.

    • @cacharle
      @cacharle 10 днів тому

      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 🙂

  • @ponirvea
    @ponirvea 11 днів тому

    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`

    • @cacharle
      @cacharle 11 днів тому

      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

    • @cacharle
      @cacharle 11 днів тому

      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 😄

  • @ponirvea
    @ponirvea 12 днів тому

    50:42 the syntax you're looking for instead of `(\w -> read w :: Int) v` is the type application syntax `read @Int v`

  • @ponirvea
    @ponirvea 12 днів тому

    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

    • @cacharle
      @cacharle 12 днів тому

      Indeed, it works and feels a bit cleaner, thanks!

  • @anwari.h.g7072
    @anwari.h.g7072 13 днів тому

    I like your contact please continue 🌹

  • @Traiden_
    @Traiden_ 13 днів тому

    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.

    • @cacharle
      @cacharle 13 днів тому

      Indeed, another comment mentioned that and it was a nice discovery for me

    • @Traiden_
      @Traiden_ 12 днів тому

      @@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!

  • @klear-z9z
    @klear-z9z 14 днів тому

    do you also code in cpp?

    • @cacharle
      @cacharle 14 днів тому

      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

  • @kilianvounckx9904
    @kilianvounckx9904 14 днів тому

    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.

    • @cacharle
      @cacharle 14 днів тому

      Oooooooh thank you for that! super interesting

  • @flopasen
    @flopasen 14 днів тому

    this is very helpful for understanding bitcoin script because satoshi used both types of endianness. Mind bending

    • @cacharle
      @cacharle 14 днів тому

      Really? That sounds odd..

  • @kuzofrog4378
    @kuzofrog4378 14 днів тому

    How'd you print out that printf template so quickly? Is it a vim feature?

    • @0xDEAD_Inside
      @0xDEAD_Inside 14 днів тому

      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.

    • @cacharle
      @cacharle 14 днів тому

      Indeed, it was just a copy/paste (yy then p in vim)

    • @IsdaouneAbderrahmane
      @IsdaouneAbderrahmane 11 днів тому

      @@cacharle can you give use you neovim configuration?

    • @cacharle
      @cacharle 10 днів тому

      @@IsdaouneAbderrahmane github.com/cacharle/dotfiles Look into config/nvim

  • @zanehisako1416
    @zanehisako1416 15 днів тому

    I really don't think transparent background is working it's too distracting The old style was better

    • @cacharle
      @cacharle 15 днів тому

      I like having more screen space for the code, I'll keep it like this unless too many people complain

    • @__gadonk__
      @__gadonk__ 14 днів тому

      @@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!

    • @kilianvounckx9904
      @kilianvounckx9904 14 днів тому

      It works well enough!

  • @cordestandoff2358
    @cordestandoff2358 15 днів тому

    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

    • @cacharle
      @cacharle 15 днів тому

      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

  • @d4nix5
    @d4nix5 15 днів тому

    Cool video!

  • @aceJacek
    @aceJacek 15 днів тому

    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.

    • @cacharle
      @cacharle 15 днів тому

      Nice timing, the file you output will definitely be portable with this :D

  • @AndrewLentay
    @AndrewLentay 16 днів тому

    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?

    • @cacharle
      @cacharle 15 днів тому

      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; }

    • @cacharle
      @cacharle 15 днів тому

      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';

    • @AndrewLentay
      @AndrewLentay 15 днів тому

      Now I understand. Thank you!

    • @AndrewLentay
      @AndrewLentay 15 днів тому

      @@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; }

  • @amizednix
    @amizednix 16 днів тому

    You can try asciinema too!

    • @cacharle
      @cacharle 16 днів тому

      Oh yes, it looks like a modern rewrite of script with some server to upload the recordings Thank you for the recommendation

  • @parsabushehri5488
    @parsabushehri5488 18 днів тому

    i use it but it's buggy with i3

    • @cacharle
      @cacharle 18 днів тому

      That's unfortunate. Someone mentioned the flameshot program in another comment

  • @Huckleberry_F
    @Huckleberry_F 19 днів тому

    Thanks for your setup Just curious - why did you consider using cgit, rather than gitea?

    • @cacharle
      @cacharle 18 днів тому

      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

  • @nadavshemesh1231
    @nadavshemesh1231 20 днів тому

    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

    • @cacharle
      @cacharle 19 днів тому

      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)

  • @hugo9078
    @hugo9078 21 день тому

    Intéressant j'avais jamais vu ça merci !

  • @kemalbidzhiev1948
    @kemalbidzhiev1948 21 день тому

    Great video Charles ! Enjoyed a lot your channel

  • @danielaornelas9642
    @danielaornelas9642 22 дні тому

    What’s the difference Between a const pointer and a pointer to const? Deze nuts

  • @aceJacek
    @aceJacek 22 дні тому

    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.

    • @quarksify
      @quarksify 22 дні тому

      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"

    • @cacharle
      @cacharle 19 днів тому

      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/

  • @quarksify
    @quarksify 22 дні тому

    fun fact, you can declare const in various orders like this int const x = 0; is the same as const int x = 0;

    • @cacharle
      @cacharle 19 днів тому

      C is not confusing at all 😅

  • @d4nix5
    @d4nix5 22 дні тому

    Love your content, keep it up!