V - Best Programming Language to Learn in 2023?

  Рет қаралды 132,865

Code to the Moon

Code to the Moon

Күн бұрын

A walkthrough of what the V programming language is, what it aims to become, and what the current state of its community is.
---
Stuff I use to make these videos - I absolutely love all of these products. Using these links is an easy way to support the channel, thank you so much if you do so!!!
Camera: Canon EOS R5 amzn.to/3CCrxzl
Monitor: Dell U4914DW 49in amzn.to/3MJV1jx
Keyboard: Keychron Q1 amzn.to/3YkJNrB
SSD for Video Editing: VectoTech Rapid 8TB amzn.to/3hXz9TM
Microphone 1: Rode NT1-A amzn.to/3vWM4gL
Microphone 2: Seinheiser 416 amzn.to/3Fkti60
Microphone Interface: Focusrite Clarett+ 2Pre amzn.to/3J5dy7S
Tripod: JOBY GorillaPod 5K amzn.to/3JaPxMA
Mouse: Razer DeathAdder amzn.to/3J9fYCf
Computer: 2021 Macbook Pro amzn.to/3J7FXtW
Lens: Canon RF24mm F1.8 Macro is STM Lens amzn.to/3UUs1bB
Caffeine: High Brew Cold Brew Coffee amzn.to/3hXyx0q
More Caffeine: Monster Energy Juice, Pipeline Punch amzn.to/3Czmfox
Building A Second Brain book: amzn.to/3cIShWf

Пікірлер: 534
@codetothemoon
@codetothemoon Жыл бұрын
ERRATA: At around 7:00, I explain what the vision for autofree is. I say that it aims to automatically distinguish between cases where something needs to be deallocated at the end of the scope it was defined in, and cases where runtime reference counting is needed. But I skirted over one of its core value props - and that is that it aims to determine at compile time when memory is no longer needed and deallocate that memory, even when that place is not in the same scope where the memory was allocated. The claim is that it can do this *without* a runtime reference count in the vast majority of scenarios, but will fall back to runtime reference counting in the cases where it can't.
@fionawashere1086
@fionawashere1086 Жыл бұрын
Don't forget to pin this comment.
@codetothemoon
@codetothemoon Жыл бұрын
@@fionawashere1086 ahh thanks for pointing this out! Pinned.
@godofbiscuitssf
@godofbiscuitssf Жыл бұрын
Objective C has been around for nearly 40 years and for most -- if not all -- of its lifetime it's had the autorelease that the dev invokes manually. The boundary conditions are pretty clear: values declared in local scope / stack that are not assigned to references that exist beyond that scope. In ref-counted systems, it's a +1 ref count followed immediately by a -1 so that it's at 0. then when scope ends, it gets freed.
@codetothemoon
@codetothemoon Жыл бұрын
​@@godofbiscuitssf Right - I think the novel thing here that memory is freed when it is no longer needed, even if that is prior to or after the end of the scope where the memory was allocated and even if there are multiple references to it - in many cases without even needing an RC.
@godofbiscuitssf
@godofbiscuitssf Жыл бұрын
@@codetothemoon does this differ to ARC in Swift and Objective C? Because I was describing the situation before ARC came along. ARC has been around quite some time now.
@n_kwadwo
@n_kwadwo Жыл бұрын
As a Go programmer I think I already know V
@esquilo_atomico
@esquilo_atomico Жыл бұрын
exactly, so similar
@MrMashyker
@MrMashyker Жыл бұрын
selective variable capturing by closures is dope, though
@morgengabe1
@morgengabe1 Жыл бұрын
The docs say you should
@paul1
@paul1 Жыл бұрын
Go++
@RootsterAnon
@RootsterAnon Жыл бұрын
that was my very same thought when he started coding V.
@theherk
@theherk Жыл бұрын
Been following it for a few years now, and it doesn't ever seems to be moving along as quickly as its claims do. Pretty uninteresting when the field is filled with so many great languages currently.
@phagesuffersatgaming.3797
@phagesuffersatgaming.3797 Жыл бұрын
The author of it lied about a lot of it's features iirc
@sinom
@sinom Жыл бұрын
C++ smart pointers (unique_ptr and shared_prt) exist and have existed in the standard for over a decade now (2011) and have existed in the boost library for almost 2 decades (2004). They handle the freeing for when the variable goes out of scope. Yes you can also use manual new/delete and manual malloc/free but you only rarely actually have to do that and usually _shouldn't_ do that.
@mister-ace
@mister-ace Жыл бұрын
imo c++ isn’t so bad language as it described by rustaceans , I think it’s easy to avoid memory issues now.
@SkyyySi
@SkyyySi Жыл бұрын
Aren't those using reference counting, though?
@chiragsingla.
@chiragsingla. Жыл бұрын
@@mister-ace thread safety tho
@qookie
@qookie Жыл бұрын
@@SkyyySi shared_ptr is ref-counted, but unique_ptr isn't, and only uses language features (destructor, deleted copy ctor, custom move ctor) to implement it's functionality
@sinom
@sinom Жыл бұрын
@@chiragsingla. relatively new to the standard but atomic shared pointers also exist. They were added as a TS in 2016 introduced into the main draft in 2017 and are in the standard as of C++20. Also if you can't use C++20 for a project boost has also had them since at least 2017
@VeitLehmann
@VeitLehmann Жыл бұрын
It's like Go and Rust had a baby - very slick language, I really dig its design! Very smart and pragmatic choices all over the place! Thanks so much for the intro, I learned a lot and might give it another shot! I had a look a couple of years ago, it was already very promising back then but it still was very immature.
@pixobit5882
@pixobit5882 Жыл бұрын
I had exactly the same thoughts. It looks syntactically similar to go and got some variables from Rust. Since it is transpiling to C code, it could be potentially used for bare metal programming in a go-style.
@eduardabramovich1216
@eduardabramovich1216 Жыл бұрын
Now that you mention Nim, I really feel it deserves a lot more attention, hopefully you can dive into it with some practical examples.
@codetothemoon
@codetothemoon Жыл бұрын
absolutely, I'm hoping to dive further into nim. I've only worked with it very briefly but I found it to be very enjoyable
@airman122469
@airman122469 Жыл бұрын
I agree. Nim is a good language. V is promising, but Nim is already good. I think V has the advantage that it’s syntax is very go-like.
@a0um
@a0um Жыл бұрын
There is a published book by Manning on Nim: “Nim in Action”! I Think this is a sign of its maturity. I liked V at first sight, but I also had an impression it’s memory management was not fully implemented yet! I got quite suspicious after that (3 years ago). On the other hand I reckon that Nim is already used in commercial projects. But as a Java developer switching tech stack, I’m focusing all my energies on Go: a much safer bet than Nim or V.
@kiloneie
@kiloneie 10 ай бұрын
@@a0um There is also Mastering Nim book by the language creator Andreas Rumpf, physical version only. I have yet to get that one.
@phenanrithe
@phenanrithe Жыл бұрын
Very interesting! I'm also wondering how the autofree works. I'm a little concerned that it conceals potential leaks by circular references without the user knowing from just looking at the code. Or just very late freeing of objects.
@fdimb
@fdimb Жыл бұрын
From what I found on the reddit discussion and other places in the internet, that's the current situation, at the moment it cannot guarantee that no leaks will happen for a 100% of the cases (although that's the goal), that's why the --autofree flag ships with the GC anyway for that 10% of the cases when autofree missed some borrowing at compile time. There's also a discussion (not for v specific) about optimized, multi-core GCs that could outperform by miles the current implementations, which could mean that this current mix of autofree and a gc might not even be a bad choice, as that could work best for cases where memory deallocation occurs frequently. Ultimately, the goal would be to find a balance between performance, predictability, and ease of use.
@gagagero
@gagagero Жыл бұрын
It leaks in a hello world. This project is vaporware.
@fdimb
@fdimb Жыл бұрын
@@gagagero Are you talking about a blog post from 2019 or from a recent, 2023 test with autofree+gc?
@awwastor
@awwastor Жыл бұрын
(currently, it doesn’t)
@gagagero
@gagagero Жыл бұрын
@@fdimb A friend of mine tested it a few days ago, it leaks.
@sp.n7401
@sp.n7401 Жыл бұрын
Nim also has ARC memory management that's becoming default in 2.0 (current devel).
@codetothemoon
@codetothemoon Жыл бұрын
This is interesting - I'm guessing they only add reference counting where needed. Given that, I'm curious whether they handle some of the tricky scenarios where reference counting actually isn't needed, but maybe a naive compiler would think it is needed.
@diadetediotedio6918
@diadetediotedio6918 Жыл бұрын
Hmmm, I did not know, it appears to have some curious problems with this approach of using ref-counting automatically, it makes the code very less explicit than it proably should be, and I wonder if the switch from autofree to manual memory management wouldn't hurt a lot when people actually need to change. It is surely an interesting language, but I think it is not, at least for now when it is not stable yet, worth learning more than other already working languages, maybe in the future it could be great.
@wertzui123
@wertzui123 Жыл бұрын
That's a really good video, keep it up!
@codetothemoon
@codetothemoon Жыл бұрын
thank you!
@al1gned
@al1gned Жыл бұрын
As a go programmer I already feel entitled to try it, thanks for such a detailed video. Also, what colorscheme are you using in your editor? Monokai? Looks so calm and classy.
@codetothemoon
@codetothemoon Жыл бұрын
Yeah I think the Go crowd will feel right at home with V. Good guess, I'm using doom-monokai-pro 😎
@coveloper
@coveloper Жыл бұрын
Swift / Obj-C are great examples of ARC that really, really work. It's totally possible, although I'm sure it's tricky to get right
@codetothemoon
@codetothemoon Жыл бұрын
This is interesting - I wonder if there is a gap between what they do and what autofree aims to do. Because I think they have acceptable performance but definitely aren't known for top tier performance.
@HyruIia
@HyruIia Жыл бұрын
I'd stick and improve my skills with Rust than learning another language.
@codetothemoon
@codetothemoon Жыл бұрын
wouldn't fault you for doing so! there's definitely a cost associated with always diving into the bleeding edge stuff that has an uncertain future. There's something to be said for keeping your focus on one thing and not getting distracted!
@HyruIia
@HyruIia Жыл бұрын
@@codetothemoon Exactly! Thank you.
@luisfelipebaptista
@luisfelipebaptista Жыл бұрын
Am I the only one who thinks this video is going a bit too fast? Great content but it would be nice to see the code at the end for a few seconds before it cutting away to the next part. Had to watch it in .75 speed and pause constantly
@codetothemoon
@codetothemoon Жыл бұрын
I don't think you're the only one. It's very tricky getting the pacing right so that folks stay engaged but the video doesn't become confusing. Probably one of the most difficult aspects of doing YT 😕
@kivimangoproductions9655
@kivimangoproductions9655 Жыл бұрын
@@codetothemoon you should leave a 0.5-1 sec part before transitioning/sliding to the next part of the video.I can t even read the code on the screen and listen to the talk without pausing the video.
@bunny_the_lifeguard9789
@bunny_the_lifeguard9789 Жыл бұрын
@@kivimangoproductions9655 💯 Take your time! I think your core audience is not teens with an attention span for tiktok shorts.
@delian66
@delian66 Жыл бұрын
Thanks for trying V, and for the unbiased review about it.
@codetothemoon
@codetothemoon Жыл бұрын
Thanks for watching! Glad it came off as unbiased, that's exactly what I was going for.
@viktorshinkevich3169
@viktorshinkevich3169 Жыл бұрын
I loved explicit closure params. All the other, idk, it’s confusing to be able doing similar things in many different ways, reminds me ruby
@yuartv
@yuartv Жыл бұрын
Hi, can you pinpoint what exactly you found confusing?
@lardosian
@lardosian Жыл бұрын
Thanks, never heard of this language before!
@codetothemoon
@codetothemoon Жыл бұрын
Happy I was able to get it on your radar! It wasn't on mine either until very recently
@rachelraja7188
@rachelraja7188 Жыл бұрын
Hi, it's like an all in one,universal language so far with aspects of the other languages.Illmake sure I learn V as well. Cool. Thanks for the well explained video as I'm new to programming and am learning SO much it's getting addictive 😅I love to code!
@codetothemoon
@codetothemoon Жыл бұрын
Thanks Rachel, congrats on starting your programming journey! I share your passion for it, and feel gratitude every day for the opportunity to be a practitioner
@Mempler
@Mempler Жыл бұрын
It is just straight up incredible how fast V developes, literally a year ago and there was like nothing, almost no docs and such.
@rudde7251
@rudde7251 Жыл бұрын
How fast it develops is a little misleading, since it's still nowhere near it's initial promises.
@andrewrobinson2985
@andrewrobinson2985 Жыл бұрын
it doesn't develop that fast. I've been following it for 4 years. I quit looking at it because in those four years, it feels like it's made no progress toward becoming what it promises, and they keep adding language-nonessential library features instead of actually working on the features that they initially used to draw in devs. Using it feels too broken to even consider doing a hobby project in it.
@nicktreleaven4119
@nicktreleaven4119 Жыл бұрын
Actually in 2020 the main docs were there.
@andrewrobinson2985
@andrewrobinson2985 Жыл бұрын
@@nicktreleaven4119 main docs are pointless when the features themselves are incomplete
@nicktreleaven4119
@nicktreleaven4119 Жыл бұрын
@@andrewrobinson2985 far from pointless. They documented what was implemented so far and what was planned at the time
@ewertonls_
@ewertonls_ Жыл бұрын
That clojure syntax is criminal
@erminpajazetovic9506
@erminpajazetovic9506 Жыл бұрын
Yes
@csbnikhil
@csbnikhil Жыл бұрын
Partly looks like Clojure.
@mkrzyzowski
@mkrzyzowski 4 ай бұрын
Isn't the same as in C++?
@FedericoViscomi
@FedericoViscomi Жыл бұрын
The koka programming language claims to have achieved something similar to the autofree feature mentioned in this video
@codetothemoon
@codetothemoon Жыл бұрын
Thought I'd heard of all the new bleeding edge languages at this point, but this is the first I've heard of Koka. Thanks for the mentioning it, I've added it to my "to check out" list!
@PhosphorusMoscu-code
@PhosphorusMoscu-code Жыл бұрын
@@codetothemoon the effects system feature that was talked about a couple of blog posts ago in Rust is possible that it originates from Koka
@SaHaRaSquad
@SaHaRaSquad Жыл бұрын
​@@codetothemoon To me Koka seems like a purely functional Rust. If I'm being honest some of what I've seen goes straight over my head but it has some amazing ideas.
@sinom
@sinom Жыл бұрын
3:40 that looks a lot like captures in c++ lambdas. Looking at the doc's they are similar just that they don't support wildcards and are always capture by copy. The docs for function captures also showcase that references in V are in themselves also basically just pointers that if you copy you get another reference instead of a copy of the underlying object which I don't really like.
@kylegaijin
@kylegaijin Жыл бұрын
I'd really like to see a Nim video. For some intangible reason, I feel like Nim is more solid than V. I think maybe it's because the tutorials just didn't compile or behave as advertised when I went through them. I wasn't able to get Doom to work, etc.
@ViktorFerenczi
@ViktorFerenczi Жыл бұрын
We're in the age of too many similar programming languages. - Do we even need more at this point?
@shapedthought
@shapedthought Жыл бұрын
Funny you posted this video I bought the book last weekend, very promising but there are some bits I'm still not sold on.
@bexplosion
@bexplosion Жыл бұрын
Which book?
@shapedthought
@shapedthought Жыл бұрын
@@bexplosion "Getting Started with V Programming."
@bunny_the_lifeguard9789
@bunny_the_lifeguard9789 Жыл бұрын
Haha, the mascot is indeed better :D
@codetothemoon
@codetothemoon Жыл бұрын
💯
@dkwdvnte
@dkwdvnte Жыл бұрын
Interesting video, although it reminds me a lot of Go, thank you anyways! Could you review Crystal lang next?
@codetothemoon
@codetothemoon Жыл бұрын
Thanks! I actually took a brief look at Crystal in the video "Rust vs 7 other languages you probably haven't tried". I was extremely impressed with it during the brief time I used it, i'm hoping to get more time with it at some point.
@soanvig
@soanvig Жыл бұрын
Last time I used it, year ago or so, it compiled not working code, even if syntactilly it was correct. Telling from various readmes that list projects in V it is ORM, GUI and freakin Linux replacement and others. Without fully working and documented compiler. What the hell went wrong
@SaHaRaSquad
@SaHaRaSquad Жыл бұрын
A huge problem I see with V is target audience. If I'm okay with slight performance compromises (garbage collection/autofree) I can use Go or target WASM. If I need C-like performance I want full control over memory management, which makes Zig or Rust preferrable. How is V supposed to compete? Also, autofree is a huge challenge and will likely influence the language's design, delaying it in favor of GUI features etc seems like a questionable order of priorities.
@holthuizenoemoet591
@holthuizenoemoet591 Жыл бұрын
they should introduce an option to disable it
@dealloc
@dealloc Жыл бұрын
@@holthuizenoemoet591 You can. But then what's the point of a language that doesn't provide actual value? Not that autofree does this anyway. But the syntax is nothing to run home for. So what is?
@casper64
@casper64 Жыл бұрын
V is compiled to C so every lib written in C can be used in V and (almost) be converted to V. Development time is very fast and you can learn everything of the language in an hour
@casper64
@casper64 Жыл бұрын
I work in cyber security and the language helps me write code fast like python, but with the performance and control of C.Also inline assembly code is a plus for me.
@the_mastermage
@the_mastermage 11 ай бұрын
it could be usefull in science where you want quick prototyping but also dont necessarily want to deal with the slowness of some interpreted languages (I am looking at you Python)
@godofbiscuitssf
@godofbiscuitssf Жыл бұрын
Apple platforms with Objective C and Swift have had ARC (automatic reference counting) for a decade. before that, Objective C had manual reference counting with semi-automatic reference counting using autorelease pools. the LLVM front-end, Clang, inserts allocs and deallocs into the code on your behalf with each trip through the compiler, not as part of your source code. No performance hit above what manual memory management would cost you otherwise, and autorelease pools would in many circumstances *improve* performance by allowing you to use/reuse local memory pools (say, within tighter loops) that you could free up upon exiting scope or keep around but clear out if you know you're going to reuse it. But like I said, a decade or more.
@codetothemoon
@codetothemoon Жыл бұрын
At 7:00 I left out a key piece about what's I think is novel about autofree, as compared to the languages you mention. Check out the pinned comment - basically I think (again, the documentation on this is harder to come by than it should be) it aims to also do something like Rust's borrow checking and ownership changes, but without requiring the developer to be involved in them. Long story short, I believe the aim is to take some of the cases that would require RC in the languages you refer to, and eliminate the need for that RC. Without this, I'm not sure if there would be much to see here.
@Viralvlogvideos
@Viralvlogvideos Жыл бұрын
Great video learned a lot, bro can you please tell me what extension your using to add that sound effect when your typing the code. It sounds too good
@codetothemoon
@codetothemoon Жыл бұрын
Nice glad you got something out of it! I actually just mic up the keyboard when I'm recording myself typing.
@Viralvlogvideos
@Viralvlogvideos Жыл бұрын
@@codetothemoon what keyboard you use?? It really sounds good
@jimmyneutron129
@jimmyneutron129 9 ай бұрын
the idea seems cool, will wait to see how it evolves. a bit strange to incorporate gui right into when it is on version 0.4
@codetothemoon
@codetothemoon 8 ай бұрын
agree, wouldn't fault anyone for holding off until it gets a bit more mature
@stysner4580
@stysner4580 Жыл бұрын
I love Rust, but Vs ? operator representing either an option or an error is really nice.
@WouterStudioHD
@WouterStudioHD Жыл бұрын
Doesn't look that interesting to me tbh. I didn't really see something that really sets it apart in a useful way and the syntax seems worse. Explicitly capturing and using fn keywords for closures & lambdas are annoying to me.
@SimGunther
@SimGunther Жыл бұрын
Haskell's function/closure definitions = sublime because everything is a function :)
@shadamethyst1258
@shadamethyst1258 Жыл бұрын
@@leeroyjenkins0 I don't think people would add it to rust. The solution that's described in the video would have a serious runtime impact, and making it a default in rust would go against the language's philosophy. That being said, a Rust version of Rc that automatically optimizes away the Rc would be nice, and would lead to an easier experience using the language for newcomers. Or maybe a clippy warning that an Rc can be optimized away manually.
@MegaMage79
@MegaMage79 Жыл бұрын
Cool video. What font are you using ?
@codetothemoon
@codetothemoon Жыл бұрын
Monaco 😎
@mwnkt
@mwnkt Жыл бұрын
really loving the videos, btw what editor do you use
@codetothemoon
@codetothemoon Жыл бұрын
thank you, glad you're getting something out of them! I'm using DOOM Emacs
@mwnkt
@mwnkt Жыл бұрын
@@codetothemoon thanks
@mwnkt
@mwnkt Жыл бұрын
@@codetothemoon thanks, i forgot to ask the font and theme also
@PouriyaJamshidi
@PouriyaJamshidi Жыл бұрын
Would love to see a video on Nim as well
@codetothemoon
@codetothemoon Жыл бұрын
Would love to make one, feels like that's one of the main centers of innovation in the elusive goal of terse syntax + memory safety + optimal performance
@PouriyaJamshidi
@PouriyaJamshidi Жыл бұрын
@@codetothemoon True that
@theappearedone
@theappearedone Жыл бұрын
I still prefer switching each transistor manually, or if it HAS to be super high level like V, ill just use asm
@codetothemoon
@codetothemoon Жыл бұрын
lol that's next level 😎
@ko_fes
@ko_fes Жыл бұрын
6:17 - 7:00 - rust objects just copied (arc/rc are reference counted objects, that contains heap-allocated memory-blocks with objects inside), - there is no heap allocations for stack-allocated objects, - it's not the same as in C/C++ giving a pointer to heap-allocated memory block.
@urits3719
@urits3719 Жыл бұрын
LOVE YOUR VIDEOS. + 2 questions: 1. will you make a video about c++? 2. the code's font is insanely beautiful, what it's name?
@codetothemoon
@codetothemoon Жыл бұрын
1. Not sure about C++, it was my first language but it is also one of my least favorite. It'll be around for a very long time but it doesn't really seem to be a nucleus of innovation at the moment 2. Thanks, it's Monaco!
@gamcd
@gamcd Жыл бұрын
It’s just a weirder go with a really fast compiler
@joebarhouch2742
@joebarhouch2742 Жыл бұрын
Cool might actually learn it. what's the font name and theme you have!
@codetothemoon
@codetothemoon Жыл бұрын
font is Monaco and theme is doom-monokai-pro
@vanillaface6097
@vanillaface6097 Жыл бұрын
Autofree will likely have problems just like garbage collection. The performance of a program will depend on V compiler version, where some values are stack allocated, heap allocated etc. Golang does the exact same thing with its analysis, golang and V are on the same playing field.
@codetothemoon
@codetothemoon Жыл бұрын
I think the goal of autofree is to not have the same performance issues as garbage collection, remains to be seen whether that will be achieved. Re: Golang, regardless of the static analysis done at compile time, you'll still have the overhead of the garbage collector right?
@vanillaface6097
@vanillaface6097 Жыл бұрын
@@codetothemoon If you don't create pointers in Golang there's no garbage to collect, and if compiler detects with escape analysis that variables can be freed in the same scope it essentially becomes stack allocated, essentially what happens in autofree. I don't think there's any real solution to Rust's ownership model today.
@petrmakhnev4037
@petrmakhnev4037 Жыл бұрын
Thanks for the review. As a young language, V has many problems, some of them are being solved, some of them are not yet. Such reviews will help the language to become more known and attract more people interested in the development and improvement of languages. Calling people for questions about memory management and speed like C as trolls is a known problem, but as far as I can see it is already much less, although there are people like the author of that comment who spoil the impression of the language, which is very sad. I think in 3-4 years we will get a good language with its own advantages and disadvantages. Let's see how it goes.
@iwolfman37
@iwolfman37 Жыл бұрын
A lot of people saying it's like Go++ but if it doesn't have the Go standard library, it's more like Go--
@codetothemoon
@codetothemoon Жыл бұрын
haha! yeah i think the next logical step would be to do a deep dive comparison of V and Go, and take a look at language features, performance, ecosystem, etc. When I made this video I didn't realize the full extent of V's similarity to Go
@Im_Ninooo
@Im_Ninooo Жыл бұрын
as a Go developer this seems pretty promising!
@codetothemoon
@codetothemoon Жыл бұрын
there definitely seems to be a strong Go influence on the language!
@pumpkinjutsu1249
@pumpkinjutsu1249 Жыл бұрын
What is the font used? The parentheses are gorgeous!
@codetothemoon
@codetothemoon Жыл бұрын
Thanks, it's Monaco!
@pumpkinjutsu1249
@pumpkinjutsu1249 Жыл бұрын
@@codetothemoon Thanks!
@LAlvarez321
@LAlvarez321 Жыл бұрын
What font are you using for doom emacs?
@draakisback
@draakisback 9 ай бұрын
Personally I think zig has more promise because the creators behind v seem to be somewhat hostile towards their own community. As you highlighted at the end of the video, there have been quite a few controversial decisions with this language. The thing is, autofree doesn't actually seem that farfetched if the compiler can assign lifetimes to variables under the hood. In this way you'd effectively have ownership but you wouldn't have to worry about the borrow checker because the compiler would determine if the object can be dropped by scope or if it needs reference counting. That being said, I'm not confident in the v contributors to be able to properly implement this feature. Zig on the other hand has multiple memory management schemes and it has already delivered on a lot of the promises that the language originally promoted. Another language that is really exciting in 2023 is ocaml. There have been so many cool editions to that language recently which make it very appealing for anybody who uses rust or go.
@EdouardTavinor
@EdouardTavinor Жыл бұрын
The syntax reminds me a lot of go. I wonder if it also copies the bits of go that are absolute genius? (channels, goroutines, duck typing for interfaces etc)
@codetothemoon
@codetothemoon Жыл бұрын
that's a great question - I didn't encounter any of the features you mention, though I could have overlooked them.
@delian66
@delian66 Жыл бұрын
There are channels, and OS threads for now, goroutines/green threads are planned, but not implemented yet. Starting a new OS thread is done similar to Go, with `spawn fn() { println('hello') }`, launching a new green thread will use `go fn() { println('hello') }` . Duck typing for interfaces is also already supported.
@UnDarkVader
@UnDarkVader Жыл бұрын
A question: Can V to programming for Esp8266 or esp32 boards?
@K5RTO
@K5RTO Жыл бұрын
seems possible if it compiles initially to C anyway.
@Ether_Void
@Ether_Void Жыл бұрын
With Arduino it shouldn't be a huge issue. However with ESP-IDF it might be a bit difficult adding bindings for all the IDF functions especially considering that the available functions change depending on the IDF config. It should be possible as we also see with Rust bindings. But some features might be unavailable without falling back to C and the IDE support might not be great depending on how the tool chain will handle that case.
@Innengelaender
@Innengelaender Жыл бұрын
ok I like the idea but already hate the syntax after just the first minute - don't know exactly why - maybe it is just hard to read what exactly is going on because I am not used to it especially the := vs = just feels wrong - what's wrong with a declaration keyword? and damn the closures look ugly / hard to read Also for some reason I have a lot of difficulty with programming languages that leave the brackets around conditions (but that is a me-issue I guess)
@nullzeon
@nullzeon Жыл бұрын
I'm really rooting for V to get to 1.0, until then I really hope the LSP support gets better, so I can have a better time playing with it
@DwayneRobinsonMS
@DwayneRobinsonMS Жыл бұрын
0:38 "Looks like Go..." Hmm, yeah, looks like Go except kinda oxidized, converting the semireadable fragment "func" to an unpronounceable utterance "fn" and requiring every variable to be prefixed with "mut" to vary.
@codetothemoon
@codetothemoon Жыл бұрын
hah yeah I think some aspects of it will make Rust devs feel more at home than they will for Go devs
@MrAbrazildo
@MrAbrazildo Жыл бұрын
1:48, ouch! I don't want to specify the returning type! 3:03, ouch! I want this to be automatic! 6:31, std::unique_ptr frees that memory automatically. 6:42, C++'s std::shared_prt is meant for this RC. 6:55, are you saying 'deallocate' meaning 'free from stack' too? Because in C++ things are build on stack by default. For instance: auto a = Thing. It's recommended freeing the stack as soon as possible, because it's precious memory, as small as faster.
@andrewrobinson2985
@andrewrobinson2985 Жыл бұрын
V doesn't really have anything that makes it better than other langs in particular, and the community just keeps, for years, saying "X feature will be there" to the actual useful ones that the people wanted to begin with. And then when the devs instead add features that should be external libraries, just totally neglecting the things they said they'd implement, the community just keeps coping, calling people trolls for questioning, and acting like they put their life savings down on V because they thought it would be the next big employable language. It has no use case. It might if it could do what it says it wants to, but it does not.
@adrianbergesenfedaque1183
@adrianbergesenfedaque1183 Жыл бұрын
Can you give an example?
@andrewrobinson2985
@andrewrobinson2985 Жыл бұрын
@@adrianbergesenfedaque1183 Autofree, automatic C translation, and a working stdlib, for starters
@borstenpinsel
@borstenpinsel Жыл бұрын
Sounds like "D" 15 years ago. The next big thing, the c++ killer. It wasn't
@bene7042
@bene7042 Жыл бұрын
Yeah i see no advantage over e.g. Rust, why learn a new language
@VLang
@VLang Жыл бұрын
@@andrewrobinson2985 what do you mean by automatic C translation? C2V? There's a DOOM translation demo on our channel. What's not working in stdlib?
@markussagen3778
@markussagen3778 Жыл бұрын
This is really cool! Would love to see more examples of the V language in the future
@mkrzyzowski
@mkrzyzowski Жыл бұрын
There are tons of examples in the examples folred in V. Clone it and take a look on them.
@codetothemoon
@codetothemoon Жыл бұрын
I hope to cover it more as the language grows in maturity!
@user-qp9ks1yo6r
@user-qp9ks1yo6r 9 ай бұрын
What font are you using?
@Flowlackstalent
@Flowlackstalent 3 ай бұрын
3:27 this is so good
@BD-hx9lf
@BD-hx9lf 8 ай бұрын
which font are you using in this video?
@codetothemoon
@codetothemoon 8 ай бұрын
I believe it was Monaco!
@CasimiroBukayo
@CasimiroBukayo Жыл бұрын
Tried V, still defaulted back to Zig. There's just something about Zig that makes it a joy to work with.
@codetothemoon
@codetothemoon Жыл бұрын
out of curiosity - why do you choose Zig over something like Rust? I feel like I'm missing some pieces of the Zig puzzle and am eager to learn from those who are immersed in it.
@CasimiroBukayo
@CasimiroBukayo Жыл бұрын
@@codetothemoon Aw, my bad. I actually love both Rust and Zig. It just so happens that Zig is a lot easier and simpler for me to work with, compared to Rust. As a worn out C++ dev with horrendous nightmares of failed projects 😅, Rust and Zig gave me a chance to redeem myself. I'm in my 40s now, so I highly gravitate towards simplicity and ease of use.
@phelix3395
@phelix3395 Жыл бұрын
May I ask what font you are using in the editor?
@codetothemoon
@codetothemoon Жыл бұрын
Monaco
@shouNen_FPS
@shouNen_FPS Жыл бұрын
What is the name of the font you are using?
@codetothemoon
@codetothemoon Жыл бұрын
Monaco
@JasonMitchellofcompsci
@JasonMitchellofcompsci 4 ай бұрын
C with colsures. All the other features look great but that's all I need. All it needs now is a repl like Holy-C has. Then it would be good enough to take over an operating system.
@PaulSebastianM
@PaulSebastianM Жыл бұрын
I hate having to explicitly declare a field as required, as opposed to explicitly declaring a default value. It's so much cleaner if you know exactly what a field's default value would be if you don't specify it otherwise on initialization. The required keyword feels exactly like the bolted on solution they are currently adding to C#.
@petrmakhnev4037
@petrmakhnev4037 Жыл бұрын
In V you can also declare default values for fields
@PaulSebastianM
@PaulSebastianM Жыл бұрын
@@petrmakhnev4037 That's great but I still feel like the default behavior of having an initialized struct while some fields or all its fields can remain uninitialzied, is bad default behavior.
@petrmakhnev4037
@petrmakhnev4037 Жыл бұрын
​@@PaulSebastianM All fields are initialized to zero-value by default, 0 for numbers, empty string for strings, and so on.
@flamakespark
@flamakespark Жыл бұрын
I was a bit confused with memory handling when passing a variable (non-reference) into a scope/function. Is this variable moved into scope? Is it copied? Is this a mutable reference? This moment is unclear tbh, and not well described in docs. In GC languages you pass a reference, in Rust it depends on the annotation, in V lang it depends on the... scope??? I'd really appreciate an explanation to this memory behavior
@casper64
@casper64 Жыл бұрын
Currently V depend on entirely GC, but you can enable auto free and that inserts most of the necessary free calls in your code during compilation time. The rest is handled by GC
@casper64
@casper64 Жыл бұрын
So when you would allocate a variable on the heap V inserts a free call in the code during compilation time. So at runtime the program is faster and it won’t leak memory, because the other cases are handled by a GC
@BAMBAMBAMBAMBAMval
@BAMBAMBAMBAMBAMval Жыл бұрын
The sound of your switches makes my brain vibrate Edit: its a good thing
@codetothemoon
@codetothemoon Жыл бұрын
If you're referring to the keyboard switches, watch out for the next video this week, you might like it 😎
@ujjawalsinha8968
@ujjawalsinha8968 Жыл бұрын
Concurrency support? Does it have channels and v-routines like golang?
@zkshulgin
@zkshulgin Жыл бұрын
Yes it does. It uses the go keyword for them haha
@cheebadigga4092
@cheebadigga4092 Жыл бұрын
4:47 there's 2 assert statements, the last one says "should fail". Then you run the tests but the tests all pass? How? :D
@codetothemoon
@codetothemoon Жыл бұрын
yeah, I think I used the wrong clip there. The Primeagen pointed this out in hilarious fashion here kzbin.info/www/bejne/oGWaeZ5rpqpsd9U
@cristianchira3615
@cristianchira3615 Жыл бұрын
Hey, can you tell us what theme and font you're using?
@codetothemoon
@codetothemoon Жыл бұрын
doom-monokai-pro and Monaco
@cristianchira3615
@cristianchira3615 Жыл бұрын
@@codetothemoon amazing, thank you a lot. Loved the video by the way!
@WebGuyAron
@WebGuyAron 2 ай бұрын
What is that font tho? it's so nice
@encapsulatio
@encapsulatio Жыл бұрын
What coding font and theme is that?
@codetothemoon
@codetothemoon Жыл бұрын
Monaco and doom-monokai-pro
@kwkfortythree39
@kwkfortythree39 Жыл бұрын
You say C program to V but the code is C++, is it possible too to pass from C++ to V automatically?
@codetothemoon
@codetothemoon Жыл бұрын
you're right! This was an example pulled directly from the V website where it talks about C to V conversion, and I hadn't even realized that the code was C++. Upon taking another look, it actually says that C++ to V is currently under development as well
@andrei-speedy5786
@andrei-speedy5786 Жыл бұрын
what font do you use for emacs?
@codetothemoon
@codetothemoon Жыл бұрын
I believe it is Monaco
@snippletrap
@snippletrap 8 ай бұрын
In C++ you would use `std::unique_ptr` not `new`
@oleksiilobodiev9446
@oleksiilobodiev9446 Жыл бұрын
What font and theme are you use?
@codetothemoon
@codetothemoon Жыл бұрын
Monaco and doom-monokai-pro
@llothar68
@llothar68 Жыл бұрын
Autofree is just like the Objective-C and i guess Swift compiler tries to do it's release/retain optimizations.
@kamkoamoh
@kamkoamoh Жыл бұрын
V is pretty interesting, from the design itself and how "easy" it can be, I like Rust and Go they are super good. If you look at the moment for a language in a professional environment and for work, I'd suggest to go for Rust or Go, let's remember, V is still 0.3.3 and there is still a lot of work to be done until it can get to the v1.0.0 , some languages required decades to become really good, and people love those for what they have become. Great video, much appreciated, I like V for small projects and just personal fun, while using other languages in my day to day work.
@m3nguele
@m3nguele Жыл бұрын
I agree, I'm using it to develop some small projects, and it's been really fun learning it, the "batteries included" really help, and I'd think it could be really useful for writing cross-platform scripts, although python could also be used, I developed a hate for python. I'm still learning the ins and outs of coding so after I finish my current project, I would like to interop it with C to make a nintendo 3ds homebrew but also make it crossplatform, any idea of how that could be done?
@gagagero
@gagagero Жыл бұрын
It's fine if it isn't complete, but that doesn't excuse the author for making complete bullshit statements about it.
@kamkoamoh
@kamkoamoh Жыл бұрын
@@gagagero what do you mean ?
@gagagero
@gagagero Жыл бұрын
@@kamkoamoh Things like "compiles 2.5 million lines of code a second".
@VLang
@VLang Жыл бұрын
@@gagagero such claims were never made
@torarinvik4920
@torarinvik4920 9 ай бұрын
If a programmer can do a certain task manually there is only a question of time before the computer will become better at it. Just like compilers usually write better assembly than humans can, in the future computers will be better at parallelising and doing memory management than any human can. If a human can do it, then a computer can do it, it's that simple. The question is how long time will that take? Im guessing it will probably be between 6-12 years. But it could be sooner with the advancements in AI. “You insist that there is something a machine cannot do. If you tell me precisely what it is a machine cannot do, then I can always make a machine which will do just that.” - John von Neumann
@codetothemoon
@codetothemoon 9 ай бұрын
yes, I do feel like there is a bit of an existential threat to software developers at least in the current form of the role. Best case is that AI innovations will cause the role to change in nature. But I think there's a real possibility things could turn out worse...
@torarinvik4920
@torarinvik4920 9 ай бұрын
@@codetothemoon Agree. But at the same time, chess software will beat any human player regardless of skill easily. Even if AI will become better at memory management, or even writing entire programs we can still enjoy programming. People chop wood, fish, program in old assembly language(like NES ect.). I believe in the transition period where computers need some steering from humans it will be very enjoyable. Our productivity will increase tremendously, but at the same time we can have the satisfaction of bringing something new to this world. Btw this is a great channel!
@georgecop9538
@georgecop9538 Жыл бұрын
think that V is a more easier version of Rust. It's also very flexible, you can easily make a GUI/Web Server.
@codetothemoon
@codetothemoon Жыл бұрын
Yeah it seems like they are aiming to get most of the benefits of Rust without requiring so much development overhead
@anon_y_mousse
@anon_y_mousse Жыл бұрын
I'm confused as to why you said that it converts C to V while you showed C++, and what's more is the output didn't actually match the input functionally. The V code built up a string and then printed in one go while the C++ printed as it went. As for V itself, it just looks like a less awful syntax version of Rust. One of the things I hate about Rust is the inconsistency in syntax, but the manual interventions you have to take as the programmer that C++ doesn't make you take really irks me. I've always hated C++, despite loving certain features, but the more of Rust I learn and the more of the source code for its implementation I read, the more I despise Rust. In fact, the more I learn of other languages, the more I appreciate the cold, calculating consistency of C++. It's butt ugly, but it does a lot right that other languages really screw up. That said, I still prefer C over everything else and use it for nearly every personal project.
@homursumpsen8748
@homursumpsen8748 Жыл бұрын
what is the color scheme you are using?
@csbnikhil
@csbnikhil Жыл бұрын
Monokai Pro
@BryanChance
@BryanChance Ай бұрын
Elixir is really nice, too.
@codetothemoon
@codetothemoon Ай бұрын
i was very impressed with it in the brief time that I tried it
@yash1152
@yash1152 9 ай бұрын
0:48 whats arena allocation
@mzg147
@mzg147 Жыл бұрын
Are the sounds made by your real keyboard? If so, what is it?
@reinhold1616
@reinhold1616 Жыл бұрын
i wonder why that matters lol
@mzg147
@mzg147 Жыл бұрын
@@reinhold1616 Cause they are really nice and I want to buy it!
@mkrzyzowski
@mkrzyzowski 4 ай бұрын
I hope we have V for microcontrollers
@codetothemoon
@codetothemoon 4 ай бұрын
interesting, yeah not sure if that's one of their target use cases
@htm4914
@htm4914 Жыл бұрын
As a go developer i mean a V developer this is so familiar
@codetothemoon
@codetothemoon Жыл бұрын
yeah, not having known Go prior to making this video, it was a bit over my head the magnitude of the similarity to Go
@lakrinmex8132
@lakrinmex8132 Жыл бұрын
I usually dislike "new" languages because I am too old for changing my development habits. but this thing sounds really good actually. memory management wihout annoying ownership of rust. built in orm and gui. smart decisions
@codetothemoon
@codetothemoon Жыл бұрын
yeah it seems worth keeping tabs on 😎
@1vader
@1vader Жыл бұрын
The thing is, their memory management doesn't actually work properly as advertised. This is a common problem with many of V's features and well known in the PL community (there's a well-known article and saying "V stands for vaporware"). The reason all their stuff sounds way too good to be true for such a new and unknown language is because it is. Most of the interesting language features are either not really working as advertised, don't work at all, or are a buggy mess. It was even worse when the language was first made public and for a fair while, most people just considered it a scam since they initially asked for donations before having open-sourced their code and before people had a chance to try the compiler while advertising basically the same features as today which ofc were even less implemented back then. If you search for "v language review 2022" you'll find that it hasn't really improved significantly since then.
@lockbert99
@lockbert99 5 ай бұрын
Who does have the better mascot between Go and V?
@codetothemoon
@codetothemoon 5 ай бұрын
V
@ME-dg5np
@ME-dg5np 9 ай бұрын
Hei V vs Val vs Circle ? Can y m ?
@MagicThanos7
@MagicThanos7 Жыл бұрын
What font do you use?
@codetothemoon
@codetothemoon Жыл бұрын
Monaco 😎
@MagicThanos7
@MagicThanos7 Жыл бұрын
@@codetothemoon thanks! really good video my guy
@ilijasargic4201
@ilijasargic4201 Жыл бұрын
What is the name of the theme in doom emacs?
@codetothemoon
@codetothemoon Жыл бұрын
doom-monokai-pro
@ilijasargic4201
@ilijasargic4201 Жыл бұрын
@@codetothemoon tnx
@alathreon8315
@alathreon8315 Жыл бұрын
Wait, if it uses reference counting, how does it manage objects referencing themselves ?
@mihaimanole2643
@mihaimanole2643 Жыл бұрын
That’s a reference cycle and will be not collected unless the developer replaces one of the references with a weak one. I know that from Swift which uses RC too.
@alathreon8315
@alathreon8315 Жыл бұрын
@@mihaimanole2643 Yes, but I was wondering that because you can't simply use this auto ref counting blindly then, and it's even more problematic that if you don't know if a variale wilol be freed at the end of a method or by rc, then how can you manage cases like that
@mihaimanole2643
@mihaimanole2643 Жыл бұрын
@@alathreon8315 I guess you must do some tests and use some tools that inspect the memory leakage or use Rust if you want memory safety.
@alathreon8315
@alathreon8315 Жыл бұрын
-_-
@shadamethyst1258
@shadamethyst1258 Жыл бұрын
One (costly and very similar to gc) option is to group together circularly-referencing objects into a collective reference counter, which will free all of those objects if it reaches zero. You could also track how many references to and from the collective Rc each object has, so you can dynamically remove it from the collective Rc
@laviray5447
@laviray5447 Жыл бұрын
I was so excited about language but totally lost interest after realizing that it doesn't have a good memory management and it's not clear what they are really doing about it. I switched to Rust and it's good.
@codetothemoon
@codetothemoon Жыл бұрын
can't go wrong with Rust. I agree that it doesn't seem ultra clear how they are going to get to where they intend to go in terms of memory management.
@iritesh
@iritesh Жыл бұрын
Autofree will take decades and decades to be perfect
@codetothemoon
@codetothemoon Жыл бұрын
That appears to be a concern shared by many folks!
@alexanderten9540
@alexanderten9540 Жыл бұрын
V is suitable for open code libraries where shareholders licensed their commit. As it fully inmplements itself it can be open juridical wish of authors that implements itself, and added to compiled undisclosure code or disribution
@jimmyneutron129
@jimmyneutron129 9 ай бұрын
i will wait until it gets into 1.0 to test it
@codetothemoon
@codetothemoon 8 ай бұрын
wouldn't talk you out of that!
@rajusharma823
@rajusharma823 Жыл бұрын
Does that font exist in vscode? I guess you are using vim.
@codetothemoon
@codetothemoon Жыл бұрын
It should (it's Monaco) you should be able to get a similar theme as well (Monokai)
@ziyadkader6767
@ziyadkader6767 Жыл бұрын
Rust and typeScript are all i need for now
@ashtonmiddlefield9819
@ashtonmiddlefield9819 Жыл бұрын
Could you do a video on sql and v, please?
@codetothemoon
@codetothemoon Жыл бұрын
maybe!
The Uiua Programming Language Caught Me By Surprise
12:24
Code to the Moon
Рет қаралды 49 М.
6 Awesome Rust Projects (Open Source)
0:56
Code to the Moon
Рет қаралды 18 М.
Китайка и Пчелка 10 серия😂😆
00:19
KITAYKA
Рет қаралды 1,9 МЛН
IS THIS REAL FOOD OR NOT?🤔 PIKACHU AND SONIC CONFUSE THE CAT! 😺🍫
00:41
Super gymnastics 😍🫣
00:15
Lexa_Merin
Рет қаралды 81 МЛН
"Hello, World" in 5 CURSED languages that no one should use
13:08
Dreams of Code
Рет қаралды 528 М.
The Dream Programming Language? Lobster
20:55
Code to the Moon
Рет қаралды 142 М.
Circle Game #1
12:18
SpacetimeDB
Рет қаралды 966
Ditch your Favorite Programming Paradigm
6:08
Code Persist
Рет қаралды 157 М.
using Rust to collect GitHub stars
0:57
Code to the Moon
Рет қаралды 6 М.
I Tried JAI, Can It Replace C++?! (Programming Language)
21:05
Rust Crate Hall Of Fame
0:54
Code to the Moon
Рет қаралды 8 М.
The Dygma Defy: A Software Developer's Dream?
8:16
Code to the Moon
Рет қаралды 56 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 914 М.
Rust vs 7 Other Languages You Probably Haven't Tried
8:55
Code to the Moon
Рет қаралды 74 М.
AI от Apple - ОБЪЯСНЯЕМ
24:19
Droider
Рет қаралды 76 М.
Непробиваемый телевизор 🤯
0:23
FATA MORGANA
Рет қаралды 157 М.
Mi primera placa con dios
0:12
Eyal mewing
Рет қаралды 708 М.
Iphone or nokia
0:15
rishton vines😇
Рет қаралды 1,6 МЛН
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 347 М.