Ok I tried Tree-sitter! Here is what I think about it...

  Рет қаралды 67,076

Tsoding Daily

Tsoding Daily

Күн бұрын

Пікірлер: 131
@remrevo3944
@remrevo3944 Жыл бұрын
There is also the query API for treesitter, which makes it much easier to deal with treesitter as it provides easy pattern matching. You might want to consider using that to find the declarations.
@HitMan99299
@HitMan99299 Жыл бұрын
Treesitter is following the naming and node structure based on the grammar rules defined in the C standard (which is pretty archaic). Node type of 'declaration' in that case would also include all variable declarations (globals in a header) but that wont matter if you're parsing a header file alone, except maybe in the case of something like an stb header that has definitions and local variables also as part of the the header file
@____r72
@____r72 Жыл бұрын
I do web dev stuff and just started learning the c family, it’s just so satisfying watching someone acquire gorilla grip on a forrest filled with unknowns and burning qs. So neat knowing what happens when I use the little :TS* commands from neovim , and all the lights magically turn on
@____r72
@____r72 Жыл бұрын
the brain is fascinating fr
@xhivo97
@xhivo97 Жыл бұрын
those are language bindings thats why c not listed
@Tawre007
@Tawre007 Жыл бұрын
It's written in C, so under heading "Language bindings" you will not find it, right? AKA C Programmers trolling C Programmers 😁
@labsendeyshent
@labsendeyshent Жыл бұрын
> не трясите мой триситтер ~ Zozin, 2023
@monsieuralexandergulbu3678
@monsieuralexandergulbu3678 Жыл бұрын
1:01:29 ladies and gentlemen, I am sorry to announce, but tsoding died of ligma
@bebre_2288
@bebre_2288 Жыл бұрын
Omg, that is hilarious
@ForAeonz
@ForAeonz 10 ай бұрын
who is steve jobs
@andrewa471
@andrewa471 5 ай бұрын
i feel really dumb, what was so funny there?
@meiramshunshalin6915
@meiramshunshalin6915 4 ай бұрын
​@@andrewa471don't worry, you are not stupid, you just don't know russian
@VíctorManuelDíazNeto
@VíctorManuelDíazNeto 8 күн бұрын
ligma?
@mehdiboujid8761
@mehdiboujid8761 Жыл бұрын
I would like to see an emacs showcase it s really nice seeing you navigate and edit that fast
@nonefvnfvnjnjnjevjenjvonej3384
@nonefvnfvnjnjnjevjenjvonej3384 Жыл бұрын
learn yourself
@ecosta
@ecosta Жыл бұрын
What I love about Tsoding streams is how I don't feel alone and crazy when I realise how programming in 2023 is weird AF. Yes, life could be much simpler without those over-hyped languages/libraries with hundreds of layers of leaky abstractions and vendor locking. I loved how JAI "just worked" with GDB at 47:47 and I wish Java could do the same (since that's the language that is paying my bills).
@sharathkumark9692
@sharathkumark9692 Жыл бұрын
Why? I heard java has debugger
@ecosta
@ecosta Жыл бұрын
@@sharathkumark9692 Only IDEs can debug decently on Java. JDB and JPDA are just gimmicks. Since I don't use IDEs, then I can only rely on good old "print debugging".
@sharathkumark9692
@sharathkumark9692 Жыл бұрын
@@ecosta Really? I thought it would be like gdb. Is python debugger like that or actually usable
@ecosta
@ecosta Жыл бұрын
​@@sharathkumark9692 To be honest, I never debugged Python. I imagine it might be decent because Python is more console-friendly than Java.
@guguludugulu
@guguludugulu 4 ай бұрын
​@@sharathkumark9692I debug Python with debugpy and nvim-dap(-ui) and it's awesome. ipdb is cool, too
@monsieuralexandergulbu3678
@monsieuralexandergulbu3678 Жыл бұрын
55:07 the obly language tsoding doesn't hate is non-existing one 😂
@jamesnewman9547
@jamesnewman9547 Жыл бұрын
Really loved seeing both you and prime both diving into tree-sitter! I've used it for a bit of custom linting, and also loved how easy it was to use and even modify/write the grammar. I used rust bindings btw ;)
@allsunday1485
@allsunday1485 Жыл бұрын
When did prime did it?
@cathalogrady2331
@cathalogrady2331 Жыл бұрын
i think they didn't list C as the C is not 'binding' as that is what the library is written in
@templatepack
@templatepack Жыл бұрын
i unironically wrote my graduation thesis with tree sitter and stack graph, now i have Vietnam-style memories
@thecodealchemist7095
@thecodealchemist7095 Жыл бұрын
"People don't appreciate simplicity" - that sooo reall across many aspect of life 🤣
@shubhampawar7921
@shubhampawar7921 Жыл бұрын
Cannot wait for Jai to be public.
@named4957
@named4957 Жыл бұрын
Are there any infos on when this will happen?
@wondays654
@wondays654 Жыл бұрын
Is it better than rust 🤔
@binitrupakheti4246
@binitrupakheti4246 Жыл бұрын
Wait for 5 years
@Xotchkass
@Xotchkass Жыл бұрын
@@wondays654 Anything is better than rust
@jesusmgw
@jesusmgw Жыл бұрын
Probably just after the game it is being used for is released.
@26xBenny
@26xBenny Жыл бұрын
This is an incredible resource, wonderful, thank you so much, !
@drdca8263
@drdca8263 Жыл бұрын
I think “fine” is also a reasonable term in addition to “granular”, I guess “fine-grained” combines both?
@chromosundrift
@chromosundrift Жыл бұрын
about flashbang sites, the "dark reader" extension is pretty effective at detecting and correcting sites stuck in sunglasses-mode
@squ34ky
@squ34ky Жыл бұрын
19:38 did I hear that correctly...?
@flleaf
@flleaf Жыл бұрын
i've just fixed bug i was trying to fix for a while with this video in background :)
@TsodingDaily
@TsodingDaily Жыл бұрын
You are welcome!
@flleaf
@flleaf Жыл бұрын
you shouldn't be ashamed of simplicity! you shouldn't be ashamed of not having hash maps in the language you use!
@xhivo97
@xhivo97 Жыл бұрын
Both are true.
@Heater-v1.0.0
@Heater-v1.0.0 Жыл бұрын
I don't get the "Rust and it's consequences thing". Having used C and C++ on and off since 1983, among a pile of other languages, most of the Rust I write is in the style of C. Maybe the Rust folks would look down on me for not creating "idiomatic Rust" but I don't care, it does what I want and it catches a lot of my stupid mistakes, all is well.
@dealloc
@dealloc Жыл бұрын
Write Rust however you want. That's why it's powerful. You don't need to use impl at all (except if you want to utilize traits). Of course if you build a public API, it's better to be more idiomatic, but for your own things it doesn't matter. Additionally the non-C part would also be having global variables. Alternatively you just pass some struct(s) around by mut ref where needed. If you need thread safety, you can always wrap them in Arc or Mutex.
@Heater-v1.0.0
@Heater-v1.0.0 Жыл бұрын
@@dealloc My take on it is that in C, C++ and other such languages it is easy to accidentally write code that will misbehave in unexpected ways. So it's wise to write code in the way that has evolved over time among other users of the language. That is to say be "idiomatic" in your use of the language. That way people immediately recognise what you are doing at is I likely to be OK. Anything "weird" looking will raise suspicions. But Rust won't let you make the vast parity of those mistakes, unless you go out of your way with "unsafe". Therefore I feel there is no need to be "idiomatic" in Rust. The compiler will not let you be "weird". Anything you write that actually compiles is "idiomatic" Rust as far as I'm concerned. Including my C style Rust. I was never much into global variables in C. So I'm not missing the ease of doing that when writing Rust.
@monsieuralexandergulbu3678
@monsieuralexandergulbu3678 Жыл бұрын
Industrial revolution and it's consequences: rust
@flop-oe5mr
@flop-oe5mr Ай бұрын
What is the best video of yours to watch that covers how to approach c from someone more familiar with shell scripting?
@HrHaakon
@HrHaakon Ай бұрын
Funnily enough, bilingual debugging is pretty common in Javaland, since there's Java, Kotlin, and Groovy often in the same codebase. It works pretty well, and I don't have to read gosh-darned bytecode. (pardon the strong language)
@0netom
@0netom Жыл бұрын
if u just look at the C language grammar.js u should be able to see what are all the possible combinations u might want to handle. and then IF u update the grammar.js version, then u can just see if any of those definition you relied on has changed or not.
@djin81
@djin81 Жыл бұрын
It _is_ C, why would it need bindings to C?
@priyakdey7891
@priyakdey7891 10 ай бұрын
@Tsoding wanted to understand the difference of binding and porting? Are they same or are they different? From the English name, what I would understand is, binding a c lib from jai, end of the day the c code gets executed. When we say port, we literally implement the c code in jai. Is that right ? Thank you .
@okabe999
@okabe999 Жыл бұрын
I like this man's hair
@flleaf
@flleaf Жыл бұрын
i also like that it's probably because he doesn't want to pay for hair cut lol
@dralger
@dralger 27 күн бұрын
I'm working with Emacs 31, with treesitter, eglot.... it's very fine.
@stokedfool
@stokedfool Жыл бұрын
[33:36] - realization that tree-sitter is a _pretty decent_ parser generator.
@meneereenhoorn
@meneereenhoorn Жыл бұрын
Great session, thanks! :D
@cariyaputta
@cariyaputta 7 ай бұрын
The screen is so bright I got flashbanged.
@flleaf
@flleaf Жыл бұрын
finished watching the vid. loved it when he sit all over the trees. truely a moment
@MyShakeweight
@MyShakeweight Жыл бұрын
Poggy coding man’s uploaded
@liamkearn
@liamkearn Жыл бұрын
Poggy coding man is crazy 😂 legend.
@JohnKouts
@JohnKouts Жыл бұрын
Man I love your channel
@drdca8263
@drdca8263 Жыл бұрын
Laughed pretty loudly at the fortnight joke
@TECHN01200
@TECHN01200 Жыл бұрын
Honestly, I have a bone to pick with Treesitter's C parser. I might just try to re-implement it in C from the get go and fix the stupid bug that makes it impossible to work on large macros.
@mjkpolo7313
@mjkpolo7313 Жыл бұрын
I know nothing of the implementation, but macros never highlight in my source files in neovim and I believe it uses treesitter... really frustrating
@seventhtenth
@seventhtenth 8 ай бұрын
BASED😂 i am not a bot I just find half-thoughts to have comedic value
@berndeckenfels
@berndeckenfels Жыл бұрын
Tree sitter is hyped because neovim and maybe the LSP craze. (Btw look at TS plus Telescope as a generic coocle)
@Rssks
@Rssks Жыл бұрын
@2:55 this joke was like 100/100 truth :D
@johnhammer8668
@johnhammer8668 Жыл бұрын
39:20 How did you duplicate the line in emacs?
@TsodingDaily
@TsodingDaily Жыл бұрын
github.com/rexim/dotfiles/blob/25f8ddc6717e56f110e812fd0cec2f1a1dc9d8be/.emacs.rc/misc-rc.el#L120-L132
@mariusrasener9186
@mariusrasener9186 2 күн бұрын
Haha I came for the tech I stay for the giggles
@pynimp
@pynimp 11 ай бұрын
we nyeed it 😂, i love your accent bro 🙌🇷🇺
@seventhtenth
@seventhtenth 8 ай бұрын
this is the tree-sitter video of all time
@batlin
@batlin Жыл бұрын
Did not know about make -B. Nice.
@jordixboy
@jordixboy Жыл бұрын
are you using emacs or vim?
@myfavouritecolorisgreen
@myfavouritecolorisgreen Жыл бұрын
emacs
@rmntim
@rmntim Жыл бұрын
new mic pog?
@miko007
@miko007 Жыл бұрын
so, in the comments of the last video, someone was arguing with me against using regex because of the preprocessor. since you are now using an external preprocessor anyways, you could easily parse your function declarations with a regular expression, couldnt you?
@contempt2012
@contempt2012 Жыл бұрын
How come noone mentioned package.json being there with `build` script? 🤭 I suppose Tsoding hates javascript that much to never had anything to do with it but seeing package.json almost always means there's a build or run script in there, just like you can assume Makefile expects you to run `make`.
@Klayperson
@Klayperson Жыл бұрын
7.1 GiB is rookie numbers, i got you by almost an order of magnitude my guy
@Klayperson
@Klayperson Жыл бұрын
actually i found a second folder that is almost just as large, so i've got you by over 16x
@antonsimkin
@antonsimkin Жыл бұрын
Удается ли тебе пользоваться Чат ГПТ из России?
@TsodingDaily
@TsodingDaily Жыл бұрын
Я его пару раз поюзал через прокси. Прикольно было поначалу. А потом он мне надоел, лол.
@michaelmueller9635
@michaelmueller9635 Жыл бұрын
1:51:15 xD
@leandrotraldiperussi9108
@leandrotraldiperussi9108 Жыл бұрын
beatbox god
@justcat3
@justcat3 Жыл бұрын
parser c raylib pp kek
@eliseulucenabarros3920
@eliseulucenabarros3920 Жыл бұрын
YEAH, THEY DO NOT DOCUMENT, THEY HAVE SHAME
@roger58469
@roger58469 7 ай бұрын
missed opportunity to call it tree-shitter
@turun_ambartanen
@turun_ambartanen Жыл бұрын
Obviously no one will writing bindings from C for C. Because you don't need bindings for that, you have access to everything already. It's like looking at a list of places you visit from denmark in a day and complaining that it doesn't list denmark. Yes, you can get to denkmark within a day if you are already in denmark, lol
@replikvltyoutube3727
@replikvltyoutube3727 Жыл бұрын
What is Jai beta, and why isn't it exposed to public?
@drdca8263
@drdca8263 Жыл бұрын
Jon (John? I don’t remember how he spells it. The guy behind “The Witness”) iirc doesn’t want to lose full control of the development until it is done, and feels that making it publicly available before it is done will quickly invite forks and such, which, if there are still major changes he wants to make, may cause substantial incompatibility and community fragmentation , and so he is waiting until it is done to fully release it.
@replikvltyoutube3727
@replikvltyoutube3727 Жыл бұрын
@@drdca8263 thx
@LeonKarpinski-s6h
@LeonKarpinski-s6h Жыл бұрын
@@drdca8263 He doesn't release it because he's still traumatized by The Looker
@yeahmirva
@yeahmirva 2 ай бұрын
1:01:33 wtf
@stintaa
@stintaa Жыл бұрын
first lol anw LEYSSSS GOOO
@wiiznokes2237
@wiiznokes2237 Жыл бұрын
I'm not agree with what you said in Rust. You could code simple things with just fn. And the build system is super simple so it must be why it was so simple to rebuild it why debug symbol.
@Lklibertad
@Lklibertad Жыл бұрын
video ql largo xD
@GeorgeTsiros
@GeorgeTsiros 5 ай бұрын
if the ast used in the editor is _not_ the one generated by the actual build tools used, this whole treeshitter thing is a novelty at best, dangerous at worst.
@SlinkyD
@SlinkyD Жыл бұрын
comment5
@LowQualityGodotTutorials
@LowQualityGodotTutorials 3 ай бұрын
пасаси
@deadmarshal
@deadmarshal Жыл бұрын
Rust is a joke
@sinamobasheri
@sinamobasheri Жыл бұрын
Your mom was serious
@vaisakh_km
@vaisakh_km Жыл бұрын
But it rust is used in all platform kernals.... windows, mac, linux, android(which is also linux) and i guess ios also... which is on par with popularity of C.... :) so you have a weird definition of joke...
@sinamobasheri
@sinamobasheri Жыл бұрын
@@vaisakh_km PLEASE give reference that rust is heavily used in these oses you mention..
@thecodealchemist7095
@thecodealchemist7095 Жыл бұрын
Can you share your discord server?
@starshipx1282
@starshipx1282 Жыл бұрын
how do i join your discord
@remrevo3944
@remrevo3944 Жыл бұрын
There is a discord invite link in the about section of his twitch channel. (I would link it here, but youtube comments and links don't really work well together.)
@starshipx1282
@starshipx1282 Жыл бұрын
@@remrevo3944Thanks. Found it.
@antonpodkur3520
@antonpodkur3520 Жыл бұрын
Пасаси
@arthurmiller9518
@arthurmiller9518 11 ай бұрын
Pr0n folder: 7.1 Gig 🙂😁.
@zamnnnnnn
@zamnnnnnn Жыл бұрын
parser.c...
I tried Ninja Build Tool and it changed me...
1:22:16
Tsoding Daily
Рет қаралды 26 М.
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 161 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
"Tree-sitter - a new parsing system for programming tools" by Max Brunsfeld
38:38
Strange Loop Conference
Рет қаралды 53 М.
I regret doing this... (Tsoding Q&A Stream)
1:20:07
Tsoding Daily
Рет қаралды 91 М.
How to Use Tree Sitter Queries in Python
23:53
Michael Breitung
Рет қаралды 948
tree-sitter explained
15:00
TJ DeVries
Рет қаралды 100 М.
Ok, I made Google for C
2:29:56
Tsoding Daily
Рет қаралды 35 М.
I made JIT Compiler for Brainf*ck lol
3:07:56
Tsoding Daily
Рет қаралды 88 М.
NVIDIA CEO Jensen Huang's Vision for Your Future
1:03:03
Cleo Abram
Рет қаралды 268 М.
The Struggle To Write a Treesitter Plugin for Neovim
43:34
If Coding Were Natural
Рет қаралды 6 М.
Every programming language explained in 15 minutes | Prime Reacts
43:42
Harder Drive: Hard drives we didn't want or need
36:47
suckerpinch
Рет қаралды 1,7 МЛН