Тёмный

Most beautiful programming language feature | Chris Lattner and Lex Fridman 

Lex Clips
Подписаться 1,3 млн
Просмотров 44 тыс.
50% 1

Lex Fridman Podcast full episode: • Chris Lattner: The Fut...
Please support this podcast by checking out our sponsors:
- Blinkist: blinkist.com/lex and use code LEX to get a free week of premium
- Neuro: www.getneuro.com and use code LEX to get 15% off
- MasterClass: masterclass.com/lex to get 15% off annual sub
- Cash App: cash.app/ and use code LexPodcast to get $10
PODCAST INFO:
Podcast website: lexfridman.com/podcast
Apple Podcasts: apple.co/2lwqZIr
Spotify: spoti.fi/2nEwCF8
RSS: lexfridman.com/feed/podcast/
Full episodes playlist: • Lex Fridman Podcast
Clips playlist: • Lex Fridman Podcast Clips
CONNECT:
- Subscribe to this RU-vid channel
- Twitter: / lexfridman
- LinkedIn: / lexfridman
- Facebook: / lexfridmanpage
- Instagram: / lexfridman
- Medium: / lexfridman
- Support on Patreon: / lexfridman

Наука

Опубликовано:

 

17 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 90   
@DrBenVincent
@DrBenVincent 3 года назад
Would love to see one of the authors of Julia language interviewed here
@gabrielmachado5708
@gabrielmachado5708 3 года назад
That would be amazing. It is my favorite language.
@OGBhyve
@OGBhyve 3 года назад
In the meantime, check this out. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-VgZm53qgj9Q.html
@Dr_KAP
@Dr_KAP 3 года назад
When your RU-vid suggestions feed is full of 5 minute CLIPS of podcasts you’ve already seen- it’s seriously annoying and is just a tool for the channels to pick up more views. They all do it- Rogan etc. I’m going to block the clips channels so I only get the podcasts ! Sorry my rant, first world problems 😂
@reasonerenlightened2456
@reasonerenlightened2456 3 года назад
Why the programming languages are still not self-aware in the 21-st century !!!! That should really trouble you.
@nieczerwony
@nieczerwony Год назад
@@reasonerenlightened2456 what troubles me is that in 21st century, less and less ppl are aware of themselfs 😂
@jamesnankervis8029
@jamesnankervis8029 3 года назад
Algebraic Data Types and exhaustive pattern matching are beautiful language features that enable the creation of high quality libraries. Both of these are fundamental core features of Haskell, OCaml and F#.
@ekremdincel1505
@ekremdincel1505 3 года назад
Rust has it builtin too.
@hashiromer7668
@hashiromer7668 3 года назад
Was looking for this comment
@kelbiekelbie909
@kelbiekelbie909 3 года назад
My favourite features in JavaScript is the spread operator and optional chaining. One of the cool things about JavaScript is that you can use features like these before they are in the specification with tools like Babel, so you can technically add your own language features which I think is really empowering.
@sho3bum
@sho3bum 3 года назад
I felt the same way with list comprehension and the declarative style of programming which lead me on to a journey to haskell. The fact you can create everything in a declarative style makes it composable and composition is beautiful. Edit : typo
@gabrielmachado5708
@gabrielmachado5708 3 года назад
The broadcast operator in Julia is amazing.
@LofiWurld
@LofiWurld 3 года назад
Talk about scratch next. The way you can drag block into each other, truly Elegant!
@marna_li
@marna_li 3 года назад
.NET (and C#) actually did something right when they added the notion of ValueTypes. A variable of type "int" (System.Int32), or even a "bool" value, may be like any other object from a class but they are being passed by value. I started with .NET, and when I went to Java at college, I got instantly confused that you had to constantly wrap primitive types in classes and lose the value semantics. In .NET this is handled for you by the runtime. The methods are always available on value types. Not to forget the type-erasure generics (Java) vs. runtime generics (.NET). In .NET value is an object, albeit with difference semantics for variables based on type.
@Daniel_WR_Hart
@Daniel_WR_Hart 8 месяцев назад
First-class functions are an addiction
@antonios4553
@antonios4553 3 года назад
excellent clip! programming, from my beginner's eye, is a game unto itself; you called it a bicycle for the mind. In either case, it does need a more collaborative effect for change. How to convince the ruling bodies such as W3C of such proposals. Hmmm
@comscinerd2070
@comscinerd2070 3 года назад
0:16 list comprehensions are my favorite things ever!
@rw-xf4cb
@rw-xf4cb 3 года назад
Yeah bit addictive everything became a list comprehension even when it wasn't the best way - had to detox, then I found map!
@comscinerd2070
@comscinerd2070 3 года назад
@@rw-xf4cb what's map?
@rw-xf4cb
@rw-xf4cb 3 года назад
@@comscinerd2070 various languages have map function takes a function and an iterator and calls the function with an item off the iterator. Python map(myfunc, list) will run myfunc with one item off list. Python3 runs as generator so map would have to be consumed with a list(map(myfunc, iterator)) to get the same effect as list comprehension/python2 map. www.w3schools.com/python/ref_func_map.asp
@fred.flintstone4099
@fred.flintstone4099 2 года назад
I've used list comprehensions in Python, but I just think it made my code less readable, so I prefer to write it just as simple if statements and for loops instead.
@user-jg8lx7ss6u
@user-jg8lx7ss6u Год назад
Proud to see smart men talking about things that really matter. Great job, guys
@chmoder
@chmoder 3 года назад
The ROI / cost+benefit part of this is something I hope everyone can appreciate.
@reasonerenlightened2456
@reasonerenlightened2456 3 года назад
Why the programming languages are still not self-aware in the 21-st century ! That should really trouble you all.
@bennri
@bennri Год назад
Python's long int. How many bits? It's as long as you need. No overflows.
@simonkotchou9644
@simonkotchou9644 2 года назад
Functional options in languages like Python and Java are very satisfying to use. I'm glad functools has been basically integrated into newer python versions. The syntax and elegance of streams in java and builtin (map, reduce, filter) in python gets me everytime
@schmetterling4477
@schmetterling4477 Год назад
Functional languages don't scale. Functional expressions look simple, but they are abstracting your performance and scalability away. If all you have to do is to parse a 10k html page, that's fine, but don't try to do serious work on large data without knowing the structure of your data. The universe will end before your program does.
@VijayaGopala
@VijayaGopala Год назад
It really annoys me when a novel language does not allow me to do ++i%=7; That is such an often-useful expression.
@bennri
@bennri Год назад
Useful but not readable. Like perl. I've made hundreds of efficient elegant perl scripts that just a week later I could not understand.
@schmetterling4477
@schmetterling4477 Год назад
But what does it mean? (Yes, I am using C regularly).
@VijayaGopala
@VijayaGopala Год назад
@@schmetterling4477 Advancing index in a ring buffer to the next item. The buffer size in this case is 7, can be any positive integer.
@isodoublet
@isodoublet 3 года назад
It's a little silly to say Int is not a built-in type in Swift. The implication seems to be that there are no special types in Swift, so everything is democratic and user-defined types are just as good as the built-ins. But that's silly since _some_ type has to have a special relationship with the compiler since _something_ has to talk to the hardware. In Swift, that's just e.g. Builtin.Int64, so the only reason Int doesn't have a special relatiosnhip with the compiler is because Builtin.Int64 does! To be fair to other languages, you should compare e.g. int in C with Builtin.Int64 in Swift, and you'll find that (apart from the fact that Builtin.Int64 has crummy syntax) they behave almost identically, as they must. What's more, the Builtin module is not really available for regular programs, only the stdlib. So even Int itself is a special type that an ordinary library developer couldn't write!
@tobyn123
@tobyn123 3 года назад
Streams and lambdas make me love Java.
@wyqtor
@wyqtor Год назад
Kotlin and Scala do them a lot better, also on the JVM.
@Talk378
@Talk378 3 года назад
Linq in c# is 💯
@Gabagool22
@Gabagool22 3 года назад
agree
@prafesa
@prafesa 3 года назад
Yes!
@fred.flintstone4099
@fred.flintstone4099 2 года назад
I do agree, LINQ is amazing, well I do love the LINQ library, but I hate the built-in SQL-like LINQ into the language. It is really nice with to query data over an abstraction.
@dylanl9532
@dylanl9532 3 года назад
swift function labeled parameters shouldn't have order
@minionsystems
@minionsystems 3 года назад
I agree that libraries are important but making the language too extensible destroys readability because you think you know what "+" means but operator overloading can make it very difficult to understand the code you see because + could be redefined to be "-" making the code unreadable - the same is true for compile time macros. The use of int built into the language is less extensible but it allows the compiler to optimize better. Java, for instance, has both int and Integer - one is value and the other is Object. Really valuable for creating libraries are machine independent byte code, garbage collection and built in thread operators since the library can use these features transparently to the application.
@vibovitold
@vibovitold Год назад
"+" can be redefined to actually be "-". OK. can't an "add" method (function whatever) be redefined to actually "remove" just the same, causing the exact same confusion?
@minionsystems
@minionsystems Год назад
@@vibovitold Yes, but at least we know it is a function and not part of the language itself. It also makes it easier to insert back-door code. I can redefine + to do a proper add but also add a nearly invisible back-door. I.e. it makes the code more difficult to understand and troubleshoot.
@thibs0
@thibs0 3 года назад
Had a 2s hesitation before hitting the like button... because the "likes counter" was saying 256... and didn't want to make it 257 XD
@chrisE815
@chrisE815 3 года назад
Did he answer the question?
@mattbowden1981
@mattbowden1981 3 года назад
I like promises in Javascript.
@gabrielmachado5708
@gabrielmachado5708 3 года назад
I like being able to add attributes dynamically to the objects (but I also hate it, because of the bugs it causes)
@spyroninja
@spyroninja 3 года назад
RxJS is sweet tho
@reasonerenlightened2456
@reasonerenlightened2456 3 года назад
Why the programming languages are still not self-aware in the 21-st century !!!! That should really trouble you.
@user-xm9if5tu2v
@user-xm9if5tu2v 2 месяца назад
0:59
@PerfectlyNormalBeast
@PerfectlyNormalBeast 3 года назад
Native support for dozenal :)
@darkdudironaji
@darkdudironaji Год назад
Is Python the only language Lex knows? It's the only one I've ever heard him talk about.
@ericpmoss
@ericpmoss Год назад
I think he knows Lisp to some extent, but he often speaks as though he doesn't really get it.
@darkdudironaji
@darkdudironaji Год назад
@@ericpmoss Well yeah. Python is one of the easiest languages to get good at and Lisp is one of the hardest. If he only really knows python, that's a huge jump.
@Daniel_WR_Hart
@Daniel_WR_Hart Год назад
Does he ever specify what dialect of Lisp he uses?
@vegahimsa3057
@vegahimsa3057 3 года назад
Swift can't for (;;i++) ?
@noon310
@noon310 3 года назад
It can with while though.
@vegahimsa3057
@vegahimsa3057 3 года назад
@@noon310 it was the i++ I meant to ask about ... I guess not.
@aedd3307
@aedd3307 3 года назад
i+=1
@manantank
@manantank 3 года назад
First Class Functions !
@Neurochrom
@Neurochrom 3 года назад
Operator overloading is not an invention of swift
@JoshBenore
@JoshBenore 3 года назад
Lex: You are literally creating suffrage in the world. Chris: Its for your own good and I'm totally justified before even considering your comment.
@nicholasroman8071
@nicholasroman8071 Год назад
You cannot underestimate JavaScript. I love Python. But in combination with typescript JavaScript is extremely elegant.
@greengoblin9567
@greengoblin9567 3 года назад
I agree fully. Arrays in c++ produce a lot of bugs
@isodoublet
@isodoublet 3 года назад
What?
@indycinema
@indycinema 3 года назад
I bet all that int beauty costs ya in compile time. this is a fine conversation tho.
@gjum42
@gjum42 3 года назад
Same way object orientation costs you in compile time; but you typically get it back in overall development time (debugging, onboarding), which is usually much more expensive.
@GordeevVladimirV
@GordeevVladimirV 3 года назад
Costs in run time too
@MrJigarparmar
@MrJigarparmar 3 года назад
I like function in HTML
@kariabraham2998
@kariabraham2998 3 года назад
I LOVE CODEEEEEEEEEEEEEE
@alfredomulleretxeberria4239
@alfredomulleretxeberria4239 3 года назад
Code is a lot of different things, and each coder has their own distinguishing set of coding habits. What exactly do you like about code?
@deerlow1851
@deerlow1851 2 года назад
@@alfredomulleretxeberria4239 I like it because: According to the theory of everything, existence itself ( the entire universe and beyond) is a complex web of systems and subsystems stemming from a singular, simple rule. E.g, given 0 and 1 and a rule to build from these with iterable and growing complexity, when allowed to iterate infinitely, the complexity also grows infinitely, and such the universe is born. Coding is like harnessing this power of creation for yourself.
@botfantasies6229
@botfantasies6229 3 года назад
Swift has the most beautiful syntax of the languages.
@ju7409
@ju7409 3 года назад
this. unfortunately swift is so restricted in use
@fred.flintstone4099
@fred.flintstone4099 2 года назад
Personally I really like C#.
@botfantasies6229
@botfantasies6229 2 года назад
@@fred.flintstone4099 I would expect nothing less from Fred Flintstone
@wyqtor
@wyqtor Год назад
Python and Julia for me. They both feel like writing pseudocode that can magically run. And without stupid OOP forced on you if you don't want it. And without superfluous braces, because we live in the age of linters and coding standards.
@botfantasies6229
@botfantasies6229 Год назад
@@wyqtor I definitely don't consider curly braces superfluous, they are like the brush strokes of a painting that give the art depth. Python reads like a book to me. Swift reads like code.
@larryseyer
@larryseyer 3 года назад
i = :)
@sacredgeometry
@sacredgeometry 2 года назад
8:46 the absence of a c style for loops and the short hand incriminators in swift is annoying. It didn't aid design, not to mention their lacklustre implementation of terrible new design practices/ keywords and paradigms has made a massive mess of the language and thoroughly fucked them over. You can see it in the way the language is evolving. They make rash stupid design choices and then there is a tidal wave of poor choices to firefight the consequences of it. That said I will take it over ObjC any day. It sure as shit looks like its going to be just as bad as that ended up by the end though.
@luigi9064
@luigi9064 3 года назад
JavaScript is the most beautiful programming language
@jamesnankervis8029
@jamesnankervis8029 3 года назад
Are you kidding?! How many programming languages have you used?
@luigi9064
@luigi9064 3 года назад
@@jamesnankervis8029 4
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 года назад
But it doesn’t have PICTUREs or ISAM files, like COBOL! Honestly, how can you say your language addresses business needs better than COBOL?
@pawelpow
@pawelpow 2 года назад
Python: [x for x in range(1, 101) if myFunc(x)] Swift: (1…100).filter { myFunc($0) }
@gritcrit4385
@gritcrit4385 2 года назад
filter myFunc [1..100] guess the language
@kyovak
@kyovak 2 года назад
@@gritcrit4385 not Haskell
Далее
100❤️
00:19
Просмотров 2,3 млн
How we fit an NES game into 40 Kilobytes
12:04
Просмотров 3,5 млн
#Shorts Good idea for testing to show.
0:17
Просмотров 3,6 млн