title
Carbon Lang First Look & Crash Course | Google's C++ Successor

description
Carbon is Google's new C++ successor. In this video, we will talk a little bit about it and then look at the basic syntax including variables, data types, arrays, tuples, classes, generics and more. 💻 Carbon Main Repo: https://github.com/carbon-language/carbon-lang ✅ Gist File From Video: https://gist.github.com/bradtraversy/681eae47e8c2fc14fbfa9e3eac8dc3ca ⭐ My Courses & More https://traversymedia.com 💖 Show Support Patreon: https://www.patreon.com/traversymedia PayPal: https://paypal.me/traversymedia 👇 Follow Me On Social Media: Twitter: https://twitter.com/traversymedia Instagram: https://www.instagram.com/traversymedia Linkedin: https://www.linkedin.com/in/bradtraversy Timestamps: 0:00 - Intro 1:37 - Carbon - What & Why? 7:26 - Setup With Homebrew 13:15 - Package Namespace 14:16 - Main() Function 16:40 - Print() Function 18:00 - Creating Functions 19:40 - Primitive Data Types 21:37 - Naming Conventions 22:14 - Variables 24:15 - let Keyword 26:22 - auto Type 27:06 - Global Variables & Scope 28:52 - Multi-Line Strings 29:27 - Function Arguments 31:49 - Arrays 35:10 - Tuples 37:42 - Structs 41:11 - Classes & Objects 43:32 - Class Methods 46:10 - Class Functions 47:52 - Pointers 52:35 - If Else Statements 54:55 - Match Statement 59:04 - While Loops 1:01:32 - Generics 1:05:22 - Outro

detail
{'title': "Carbon Lang First Look & Crash Course | Google's C++ Successor", 'heatmap': [{'end': 4003.205, 'start': 3962.314, 'weight': 1}], 'summary': "Provides a comprehensive overview of google's experimental language carbon, highlighting its syntax, interoperability with c++, and goals for memory safety. it covers topics such as arrays, tuples, functions, classes, variables in python and javascript, variable scopes, data structures, and rust conditionals, loops, and generics.", 'chapters': [{'end': 735.157, 'segs': [{'end': 75.03, 'src': 'embed', 'start': 5.472, 'weight': 2, 'content': [{'end': 11.375, 'text': "Hey, what's going on, guys? So Google recently announced its new successor to C++ called Carbon.", 'start': 5.472, 'duration': 5.903}, {'end': 14.496, 'text': 'And this is a language that is experimental.', 'start': 11.835, 'duration': 2.661}, {'end': 18.298, 'text': "So it's not like you're going to go out tomorrow and get a job writing carbon.", 'start': 14.596, 'duration': 3.702}, {'end': 21.52, 'text': "But I've been looking into it for the past few days.", 'start': 18.798, 'duration': 2.722}, {'end': 29.966, 'text': 'and i figured why not make a crash course just for fun for people that like to learn new stuff like myself.', 'start': 22.2, 'duration': 7.766}, {'end': 37.551, 'text': "so what we're going to do is talk a little bit about it and i'm going to show you how to get set up, because it's not completely clear in the docs.", 'start': 29.966, 'duration': 7.585}, {'end': 45.597, 'text': "and then we're going to look at some basic syntax, from arrays and tuples to functions and classes and all that good stuff.", 'start': 37.551, 'duration': 8.046}, {'end': 49.26, 'text': "and even if you've never written a line of c plus plus, that's absolutely fine.", 'start': 45.597, 'duration': 3.663}, {'end': 52.981, 'text': 'The syntax, at least on a basic level, is pretty simple.', 'start': 49.6, 'duration': 3.381}, {'end': 60.243, 'text': 'So if you know any language at all, then most of this stuff will be pretty easy for you to understand.', 'start': 53.161, 'duration': 7.082}, {'end': 63.845, 'text': "Because we're not really going to get in deep with this.", 'start': 60.904, 'duration': 2.941}, {'end': 67.706, 'text': "And I've seen a few other videos on YouTube.", 'start': 64.565, 'duration': 3.141}, {'end': 69.286, 'text': 'Fireship has a really good one.', 'start': 67.746, 'duration': 1.54}, {'end': 71.387, 'text': "It's basically a summary of..", 'start': 69.966, 'duration': 1.421}, {'end': 75.03, 'text': 'carbon and what the plan for it is and so on.', 'start': 71.907, 'duration': 3.123}], 'summary': 'Google announced experimental language carbon, offering crash course on syntax and setup.', 'duration': 69.558, 'max_score': 5.472, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag5472.jpg'}, {'end': 123.338, 'src': 'embed', 'start': 97.767, 'weight': 0, 'content': [{'end': 104.43, 'text': 'so it is, uh, an experimental successor to c plus plus, and a lot of people might say well, what what about rust?', 'start': 97.767, 'duration': 6.663}, {'end': 109.692, 'text': 'rust is, you know, can be used for a lot of the same stuff that c plus plus is used for.', 'start': 104.43, 'duration': 5.262}, {'end': 116.455, 'text': "and while that's true carbon is actually it actually has, uh, bi-directional interoperability.", 'start': 109.692, 'duration': 6.763}, {'end': 123.338, 'text': 'so you can write c plus plus and use c plus plus libraries within carbon and vice versa.', 'start': 116.455, 'duration': 6.883}], 'summary': 'Carbon is an experimental successor to c++ with bi-directional interoperability, allowing the use of c++ libraries within carbon and vice versa.', 'duration': 25.571, 'max_score': 97.767, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag97767.jpg'}, {'end': 248.531, 'src': 'embed', 'start': 220.691, 'weight': 1, 'content': [{'end': 234.342, 'text': 'And Google stresses that the best way to address these problems is to try and avoid inheriting the legacy of C or C++ directly and instead create a new language with some solid foundations,', 'start': 220.691, 'duration': 13.651}, {'end': 240.747, 'text': 'like a modern generic system, modular code organization and a consistent and simple syntax.', 'start': 234.342, 'duration': 6.405}, {'end': 248.531, 'text': "and if we look at some of the language goals, we're designing carbon to support the performance critical software.", 'start': 241.588, 'duration': 6.943}], 'summary': 'Google stresses creating a new language with modern features like a generic system and modular code organization to address problems, with a focus on supporting performance critical software.', 'duration': 27.84, 'max_score': 220.691, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag220691.jpg'}], 'start': 5.472, 'title': "Google's experimental language carbon", 'summary': "Discusses google's experimental language carbon, its basic syntax, and the ease of understanding for beginners, with a focus on arrays, tuples, functions, and classes, and provides an objective overview of the carbon programming language, highlighting its bi-directional interoperability with c++ libraries, goals for improving memory safety and performance, and the ease of working with and migrating large c++ code bases using carbon.", 'chapters': [{'end': 75.03, 'start': 5.472, 'title': "Google's new language: carbon", 'summary': "Discusses google's experimental language carbon, its basic syntax, and the ease of understanding for beginners, with a focus on arrays, tuples, functions, and classes.", 'duration': 69.558, 'highlights': ['The syntax of Carbon is relatively simple, making it accessible for beginners who have never written a line of C++.', 'Google announced Carbon as the successor to C++, an experimental language not yet suitable for professional use.', 'The chapter includes a crash course on setting up Carbon and covers basic syntax, including arrays, tuples, functions, and classes.']}, {'end': 735.157, 'start': 75.43, 'title': 'Carbon programming language overview', 'summary': 'Provides an objective overview of the carbon programming language, an experimental successor to c++, highlighting its bi-directional interoperability with c++ libraries, goals for improving memory safety and performance, and the ease of working with and migrating large c++ code bases using carbon.', 'duration': 659.727, 'highlights': ['Carbon provides bi-directional interoperability with C++ libraries, allowing developers to write C++ code and use C++ libraries within Carbon, and vice versa, which sets it apart from Rust. Carbon offers bi-directional interoperability with C++ libraries, enabling developers to utilize C++ code and libraries within Carbon, as well as allowing the use of Carbon in C++ code. This distinguishes it from Rust, which lacks this level of interoperability.', 'Google aims to address the technical debt and the struggle to meet developer needs in C++ by creating Carbon with a modern generic system, modular code organization, and a consistent and simple syntax. Google emphasizes addressing the technical debt and the challenge of meeting developer needs in C++ by developing Carbon with modern features like a generic system, modular code organization, and a straightforward syntax, aiming to improve upon the limitations of C++.', 'Carbon is designed to support performance-critical software, ensuring that it matches the performance of C++ and offers practical safety and testing mechanisms for fast and scalable development. Carbon is tailored to support performance-critical software, striving to match C++ performance levels, and provides practical safety and testing mechanisms to enable rapid and scalable development.', "The language goals of Carbon include memory safety improvement, modern generic system implementation, and interoperability and migration from existing C++ code, addressing the challenges faced by C++ as a non-memory-safe language. Carbon's language goals encompass enhancing memory safety, implementing a modern generic system, and facilitating interoperability and migration from existing C++ code, aiming to overcome the challenges posed by C++ as a non-memory-safe language."]}], 'duration': 729.685, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag5472.jpg', 'highlights': ['Carbon provides bi-directional interoperability with C++ libraries, enabling developers to utilize C++ code and libraries within Carbon, as well as allowing the use of Carbon in C++ code.', 'Carbon is tailored to support performance-critical software, striving to match C++ performance levels, and provides practical safety and testing mechanisms to enable rapid and scalable development.', 'The syntax of Carbon is relatively simple, making it accessible for beginners who have never written a line of C++.', 'Google aims to address the technical debt and the struggle to meet developer needs in C++ by creating Carbon with a modern generic system, modular code organization, and a consistent and simple syntax.', 'Carbon is designed to support performance-critical software, ensuring that it matches the performance of C++ and offers practical safety and testing mechanisms for fast and scalable development.', 'The language goals of Carbon include memory safety improvement, modern generic system implementation, and interoperability and migration from existing C++ code, addressing the challenges faced by C++ as a non-memory-safe language.', 'Google announced Carbon as the successor to C++, an experimental language not yet suitable for professional use.', 'The chapter includes a crash course on setting up Carbon and covers basic syntax, including arrays, tuples, functions, and classes.']}, {'end': 1281.451, 'segs': [{'end': 808.036, 'src': 'embed', 'start': 735.277, 'weight': 0, 'content': [{'end': 741.382, 'text': 'So instead of using this and instead of having to run, you know, and if you run this again, it should be instant.', 'start': 735.277, 'duration': 6.105}, {'end': 745.526, 'text': "But instead of having to do that, I'm just going to use the compiler explorer.", 'start': 741.782, 'duration': 3.744}, {'end': 746.386, 'text': 'All right.', 'start': 746.086, 'duration': 0.3}, {'end': 750.79, 'text': "So, yeah, I'm just going to go ahead and close that up and.", 'start': 746.606, 'duration': 4.184}, {'end': 754.493, 'text': 'We can close that up and we can just run it in here.', 'start': 750.81, 'duration': 3.683}, {'end': 761.406, 'text': "So let's see, I want to be able to see my output.", 'start': 755.643, 'duration': 5.763}, {'end': 765.048, 'text': "So let's click on this right here.", 'start': 762.767, 'duration': 2.281}, {'end': 767.609, 'text': 'And yeah, so this will show us our output.', 'start': 765.828, 'duration': 1.781}, {'end': 772.191, 'text': 'Basically, this shows you exactly what I just saw in the in the terminal window.', 'start': 767.649, 'duration': 4.542}, {'end': 774.072, 'text': "So let's just clear this up.", 'start': 772.832, 'duration': 1.24}, {'end': 777.994, 'text': "I'm going to get rid of everything and we don't have to like click run or anything.", 'start': 774.112, 'duration': 3.882}, {'end': 778.915, 'text': "It's just instant.", 'start': 778.034, 'duration': 0.881}, {'end': 783.417, 'text': 'And of course, this is not going to going to compile because we have nothing written here.', 'start': 779.395, 'duration': 4.022}, {'end': 785.959, 'text': 'Now, I want to see if I can make this.', 'start': 783.997, 'duration': 1.962}, {'end': 791.543, 'text': 'Yeah, we can make this a little bigger and now we can get started on learning the syntax.', 'start': 786.099, 'duration': 5.444}, {'end': 792.464, 'text': 'All right.', 'start': 792.244, 'duration': 0.22}, {'end': 796.147, 'text': 'So the first thing we need to do is create a package name.', 'start': 792.524, 'duration': 3.623}, {'end': 801.651, 'text': "So a package is a group of libraries in carbon and it's a standard unit for distribution.", 'start': 796.287, 'duration': 5.364}, {'end': 808.036, 'text': 'The package name also serves as the root namespace for all name paths in its libraries.', 'start': 802.171, 'duration': 5.865}], 'summary': 'Using compiler explorer for instant output, learning syntax and creating package name in carbon.', 'duration': 72.759, 'max_score': 735.277, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag735277.jpg'}, {'end': 886.771, 'src': 'embed', 'start': 836.036, 'weight': 4, 'content': [{'end': 844.7, 'text': 'So in order for this to work, we have to add onto this either IMPL or API.', 'start': 836.036, 'duration': 8.664}, {'end': 846.1, 'text': "So, we're going to say API.", 'start': 844.78, 'duration': 1.32}, {'end': 850.342, 'text': 'And we do need semicolons to terminate our statements.', 'start': 846.701, 'duration': 3.641}, {'end': 851.323, 'text': 'All right.', 'start': 851.022, 'duration': 0.301}, {'end': 860.372, 'text': "If you've ever used C++ or even like Java, you have a main function and that's basically your entry point.", 'start': 852.665, 'duration': 7.707}, {'end': 865.257, 'text': "So if we look at the gist that I created, that's the next part is the main function.", 'start': 860.773, 'duration': 4.484}, {'end': 871.122, 'text': "So let's create that so that we can actually compile our code now to create a function.", 'start': 865.997, 'duration': 5.125}, {'end': 874.825, 'text': "we don't use the function keyword, we use fn.", 'start': 872.003, 'duration': 2.822}, {'end': 878.947, 'text': "okay, so we're going to say fn and then the naming conventions.", 'start': 874.825, 'duration': 4.122}, {'end': 881.008, 'text': "i'll go over that in a few minutes.", 'start': 878.947, 'duration': 2.061}, {'end': 884.369, 'text': "but for functions it's going to be upper camel case.", 'start': 881.008, 'duration': 3.361}, {'end': 886.771, 'text': "so it's going to start with an uppercase.", 'start': 884.369, 'duration': 2.402}], 'summary': "Creating a main function in rust using 'fn' and upper camel case naming conventions.", 'duration': 50.735, 'max_score': 836.036, 'thumbnail': ''}, {'end': 1068.565, 'src': 'embed', 'start': 1040.478, 'weight': 5, 'content': [{'end': 1046.384, 'text': 'it says type error in print argument zero, it expected a string.', 'start': 1040.478, 'duration': 5.906}, {'end': 1051.149, 'text': 'so if you do want to output a number, because this can print, we print strings here.', 'start': 1046.384, 'duration': 4.765}, {'end': 1054.472, 'text': 'so if you want to print out a number, what we could do is use a placeholder.', 'start': 1051.149, 'duration': 3.323}, {'end': 1063.301, 'text': "so and you might have seen this in other languages so we're going to have these curly braces and put a zero in that and then, after the comma,", 'start': 1054.472, 'duration': 8.829}, {'end': 1068.565, 'text': 'here will be whatever we want to print out, and this could be like a function name or something like that,', 'start': 1063.301, 'duration': 5.264}], 'summary': 'Use curly braces as a placeholder for numbers in print statements', 'duration': 28.087, 'max_score': 1040.478, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1040478.jpg'}, {'end': 1220.153, 'src': 'embed', 'start': 1193.858, 'weight': 7, 'content': [{'end': 1199.24, 'text': "If you do that, it's just going to go ahead and download your file as a carbon file, which is pretty cool.", 'start': 1193.858, 'duration': 5.382}, {'end': 1201.06, 'text': "So let's see.", 'start': 1200.2, 'duration': 0.86}, {'end': 1208.76, 'text': "We're going to look at primitive data types and As I said, carbon is a statically typed language, which means that we have to define our types.", 'start': 1201.24, 'duration': 7.52}, {'end': 1213.946, 'text': "There is an auto type that we can use, and I'll talk about that in a little bit.", 'start': 1210.102, 'duration': 3.844}, {'end': 1217.47, 'text': 'But primitive types fall into these categories.', 'start': 1214.347, 'duration': 3.123}, {'end': 1220.153, 'text': 'So we have Booleans, which are true or false.', 'start': 1217.55, 'duration': 2.603}], 'summary': 'Introduction to primitive data types in a statically typed language with emphasis on booleans.', 'duration': 26.295, 'max_score': 1193.858, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1193858.jpg'}], 'start': 735.277, 'title': 'Using compiler explorer and learning carbon syntax', 'summary': 'Covers using compiler explorer for instant compilation and learning carbon syntax, including creating a package, defining a main function, using print command, creating and calling functions, and discussing data types in the statically typed language carbon.', 'chapters': [{'end': 783.417, 'start': 735.277, 'title': 'Using compiler explorer for instant compilation', 'summary': 'Explains how to use compiler explorer for instant compilation, eliminating the need to run code repeatedly and providing immediate output without the need to click run.', 'duration': 48.14, 'highlights': ['The compiler explorer allows instant compilation, eliminating the need to run code repeatedly.', 'Immediate output is provided without the need to click run, enhancing efficiency.', 'The tool enables users to see their output without the delay of traditional compilation processes.']}, {'end': 1281.451, 'start': 783.997, 'title': 'Learning carbon syntax', 'summary': 'Covers creating a package, defining a main function, using print command, creating and calling functions, and discussing data types including booleans, signed and unsigned integers, and floating point types in the statically typed language carbon.', 'duration': 497.454, 'highlights': ['Carbon package creation A package is a group of libraries in Carbon, serving as the root namespace for all name paths, and it is a standard unit for distribution.', "Defining main function and return type The main function serves as the entry point and must be defined using 'fn'. It needs to return an integer, typically '0' indicating success.", "Using print command for string and number output The 'print' function is used to output strings, and for printing numbers, a placeholder within curly braces is utilized, allowing for different types of output.", "Creating and calling functions Functions in Carbon are created using 'fn' and can be called from the main function. Functions can return values or have void return type.", 'Discussion on data types in Carbon Carbon has primitive data types including Booleans, signed and unsigned integers, and floating point types like F16, F32, F64, and F128.']}], 'duration': 546.174, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag735277.jpg', 'highlights': ['The compiler explorer allows instant compilation, enhancing efficiency.', 'Immediate output is provided without the need to click run.', 'The tool enables users to see their output without traditional delays.', 'Carbon package creation is a standard unit for distribution.', "Defining main function as the entry point using 'fn' is essential.", "Using 'print' function for string and number output is crucial.", "Creating and calling functions in Carbon using 'fn' is fundamental.", 'Discussion on data types in Carbon includes Booleans and various numeric types.']}, {'end': 1568.729, 'segs': [{'end': 1322.493, 'src': 'embed', 'start': 1281.451, 'weight': 2, 'content': [{'end': 1286.632, 'text': 'And then, of course, we have string types, which are, you know, a string of characters wrapped in double quotes.', 'start': 1281.451, 'duration': 5.181}, {'end': 1289.553, 'text': "You can't use single quotes.", 'start': 1288.053, 'duration': 1.5}, {'end': 1290.553, 'text': 'They have to be double.', 'start': 1289.593, 'duration': 0.96}, {'end': 1294.754, 'text': 'And you can also create multiline strings using triple quotes.', 'start': 1291.193, 'duration': 3.561}, {'end': 1296.435, 'text': "And I'll go over that in a little bit.", 'start': 1294.975, 'duration': 1.46}, {'end': 1307.286, 'text': 'Now, as far as naming conventions go, upper camel case is going to be used when the named entity cannot have a dynamically varying value.', 'start': 1297.202, 'duration': 10.084}, {'end': 1318.351, 'text': 'So things like functions and namespaces and then lower lower snake case, which is just lowercase with underscores, is going to be used for variables.', 'start': 1307.386, 'duration': 10.965}, {'end': 1322.493, 'text': "So when the named entities value won't be known until runtime.", 'start': 1318.491, 'duration': 4.002}], 'summary': 'String types in programming use double quotes, naming conventions include upper camel case for fixed values and lower snake case for variables.', 'duration': 41.042, 'max_score': 1281.451, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1281451.jpg'}, {'end': 1471.47, 'src': 'embed', 'start': 1368.551, 'weight': 0, 'content': [{'end': 1374.436, 'text': "And I know a lot of you guys, at least if you're a fan of my channel, you're probably a JavaScript developer.", 'start': 1368.551, 'duration': 5.885}, {'end': 1381.12, 'text': "So this might seem a little weird these days because we don't really use var, we use let and const.", 'start': 1374.976, 'duration': 6.144}, {'end': 1386.825, 'text': "And there is actually a let in carbon lang, which I'll get into in a minute.", 'start': 1381.521, 'duration': 5.304}, {'end': 1388.606, 'text': "So that's a little confusing as well.", 'start': 1386.865, 'duration': 1.741}, {'end': 1391.808, 'text': "But we'll say var and then whatever we want to name it.", 'start': 1389.086, 'duration': 2.722}, {'end': 1397.172, 'text': "And again, it's it's it's recommended that we use snake case here.", 'start': 1392.268, 'duration': 4.904}, {'end': 1401.755, 'text': 'So if I had two words like whatever text, hello, I would do it like that.', 'start': 1397.312, 'duration': 4.443}, {'end': 1403.416, 'text': "So let's say text.", 'start': 1402.195, 'duration': 1.221}, {'end': 1406.058, 'text': 'Now, again, this is a statically typed language.', 'start': 1403.536, 'duration': 2.522}, {'end': 1406.998, 'text': 'So we have to say.', 'start': 1406.098, 'duration': 0.9}, {'end': 1411.439, 'text': 'what type of data is going to be in this variable.', 'start': 1408.015, 'duration': 3.424}, {'end': 1412.78, 'text': 'So we do that with a colon.', 'start': 1411.519, 'duration': 1.261}, {'end': 1416.604, 'text': "When it's a function, we use the arrow like that.", 'start': 1413.501, 'duration': 3.103}, {'end': 1418.766, 'text': "But when it's a variable, we use the colon.", 'start': 1416.664, 'duration': 2.102}, {'end': 1420.828, 'text': "So let's say this is going to be a string.", 'start': 1418.846, 'duration': 1.982}, {'end': 1426.234, 'text': "And then we'll set that to the value of we'll say hello there.", 'start': 1421.429, 'duration': 4.805}, {'end': 1434.779, 'text': 'OK And then we should be able to just pass into the print here the text variable and recalling output text right here.', 'start': 1427.213, 'duration': 7.566}, {'end': 1442.385, 'text': "So you can see as a result we're printing out hello there and we still get our return of zero meaning everything is OK.", 'start': 1435.14, 'duration': 7.245}, {'end': 1450.052, 'text': "Now, when we use VAR, we can reassign the the value that's in that variable.", 'start': 1443.206, 'duration': 6.846}, {'end': 1451.673, 'text': 'So I use VAR text.', 'start': 1450.152, 'duration': 1.521}, {'end': 1454.776, 'text': 'That means that I can reassign that if I want.', 'start': 1452.073, 'duration': 2.703}, {'end': 1458.579, 'text': "I can say text equals and then we'll say, I don't know.", 'start': 1454.796, 'duration': 3.783}, {'end': 1459.46, 'text': 'Hello, Brad.', 'start': 1458.659, 'duration': 0.801}, {'end': 1465.144, 'text': 'OK So if I do that that should work so I can see hello Brad printed out.', 'start': 1460.18, 'duration': 4.964}, {'end': 1471.47, 'text': "Now there is another keyword for variables and that's if we want it to be a constant.", 'start': 1465.805, 'duration': 5.665}], 'summary': "In javascript, 'var' is replaced by 'let' and 'const'. carbon lang uses 'let', 'const'.", 'duration': 102.919, 'max_score': 1368.551, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1368551.jpg'}], 'start': 1281.451, 'title': 'Python and javascript variables', 'summary': "Covers python naming conventions and variable creation along with an introduction to the 'var' keyword. it also discusses the declaration of a string variable in python and compares variable declaration in javascript using var, let, and const, highlighting differences and similarities between the two languages.", 'chapters': [{'end': 1391.808, 'start': 1281.451, 'title': 'Python naming conventions and variables', 'summary': "Covers naming conventions in python, such as upper camel case for named entities with fixed values, lower snake case for variables, and provides an introduction to creating variables using the 'var' keyword.", 'duration': 110.357, 'highlights': ['Naming conventions: Upper camel case for fixed value entities, lower snake case for variables. Upper camel case is used for named entities with fixed values, such as functions and namespaces, while lower snake case is used for variables with values known until runtime.', "Introduction to creating variables using the 'VAR' keyword. The chapter provides an introduction to creating variables in Python using the 'VAR' keyword, which is different from 'let' and 'const' used in JavaScript.", 'Multiline strings using triple quotes. Python allows creating multiline strings using triple quotes, offering flexibility in string formatting.']}, {'end': 1442.385, 'start': 1392.268, 'title': 'Python variable declaration and printing', 'summary': "Discusses the declaration of a string variable in python using snake case and statically typed language, followed by printing the variable with the expected output of 'hello there' and a return value of zero.", 'duration': 50.117, 'highlights': ['The chapter discusses the declaration of a string variable in Python using snake case and statically typed language.', "Printing the variable with the expected output of 'hello there' and a return value of zero."]}, {'end': 1568.729, 'start': 1443.206, 'title': 'Variables in javascript and carbon lang', 'summary': 'Explains the use of var, let, and const for declaring variables in javascript and highlights the differences between using let for variables that can be reassigned and const for constants. it also compares the use of const in javascript and carbon lang.', 'duration': 125.523, 'highlights': ['The chapter introduces the use of var, let, and const for declaring variables in JavaScript and Carbon Lang, emphasizing the ability to reassign values with var and the distinction between let for reassignable variables and const for constants.', 'It points out the differences in using let and const between JavaScript and Carbon Lang, where let is used for constants in Carbon Lang and const is preferred for unchangeable values in JavaScript.', "The chapter also discusses the author's approach to using var and const in JavaScript, recommending the use of const unless the variable needs to be reassigned, and highlighting the common use of constants for values that are not expected to change."]}], 'duration': 287.278, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1281451.jpg', 'highlights': ["Introduction to creating variables using the 'VAR' keyword.", 'The chapter introduces the use of var, let, and const for declaring variables in JavaScript and Carbon Lang.', 'Naming conventions: Upper camel case for fixed value entities, lower snake case for variables.', 'Multiline strings using triple quotes.', 'The chapter discusses the declaration of a string variable in Python using snake case and statically typed language.', "Printing the variable with the expected output of 'hello there' and a return value of zero."]}, {'end': 1890, 'segs': [{'end': 1595.991, 'src': 'embed', 'start': 1568.729, 'weight': 1, 'content': [{'end': 1571.672, 'text': "that's definitely not going to change no part of it.", 'start': 1568.729, 'duration': 2.943}, {'end': 1574.354, 'text': "you know you're not going to manipulate it in any way.", 'start': 1571.672, 'duration': 2.682}, {'end': 1577.416, 'text': "at least that's that's my view on it.", 'start': 1574.354, 'duration': 3.062}, {'end': 1580.759, 'text': 'um, so yeah, just i would say use var.', 'start': 1577.416, 'duration': 3.343}, {'end': 1582.1, 'text': 'i know that was kind of long-winded.', 'start': 1580.759, 'duration': 1.341}, {'end': 1586.426, 'text': 'Now I did mention that we could use auto as a type.', 'start': 1582.884, 'duration': 3.542}, {'end': 1588.947, 'text': "I couldn't use it here on the main function.", 'start': 1587.086, 'duration': 1.861}, {'end': 1592.729, 'text': "If I do that, that's not going to work.", 'start': 1588.987, 'duration': 3.742}, {'end': 1595.991, 'text': 'Main must have an explicit type.', 'start': 1592.969, 'duration': 3.022}], 'summary': "Use 'var' instead of 'auto' for the main function type.", 'duration': 27.262, 'max_score': 1568.729, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1568729.jpg'}, {'end': 1658.375, 'src': 'embed', 'start': 1628.925, 'weight': 0, 'content': [{'end': 1634.447, 'text': 'So outside of the function scopes here, I could go up here and create a variable.', 'start': 1628.925, 'duration': 5.522}, {'end': 1635.708, 'text': "So let's say VAR.", 'start': 1634.467, 'duration': 1.241}, {'end': 1647.452, 'text': "know just say var x and let's say that's going to be we'll do i32 and let's set that to 100.", 'start': 1636.804, 'duration': 10.648}, {'end': 1650.653, 'text': 'OK, so that should so that compiles.', 'start': 1647.452, 'duration': 3.201}, {'end': 1658.375, 'text': 'And then if I come down here now, remember, if you if you have any experience with any languages, we have function scope.', 'start': 1651.093, 'duration': 7.282}], 'summary': "A variable 'x' of type i32 with a value of 100 is created outside the function scope.", 'duration': 29.45, 'max_score': 1628.925, 'thumbnail': ''}, {'end': 1798.351, 'src': 'embed', 'start': 1738.876, 'weight': 2, 'content': [{'end': 1742.436, 'text': "So we're going to wrap this in three double quotes.", 'start': 1738.876, 'duration': 3.56}, {'end': 1746.917, 'text': 'And if we do that, then we can put these on separate lines.', 'start': 1743.056, 'duration': 3.861}, {'end': 1752.578, 'text': "Let's put this down here and say hello world.", 'start': 1747.417, 'duration': 5.161}, {'end': 1758.177, 'text': 'Hello All right.', 'start': 1753.118, 'duration': 5.059}, {'end': 1762.821, 'text': "So now you can see it's not we're not getting an error and it's printing these three lines out.", 'start': 1758.257, 'duration': 4.564}, {'end': 1766.625, 'text': "So that's a multi line string with triple quotes.", 'start': 1763.262, 'duration': 3.363}, {'end': 1771.409, 'text': 'Now as far as function arguments go.', 'start': 1767.666, 'duration': 3.743}, {'end': 1776.674, 'text': "I want to talk about that next, because we have these functions, but we haven't looked at passing in creating any,", 'start': 1771.409, 'duration': 5.265}, {'end': 1778.696, 'text': 'any parameters and passing in arguments.', 'start': 1776.674, 'duration': 2.022}, {'end': 1782.04, 'text': "So what we'll do here, let's actually get rid of.", 'start': 1779.397, 'duration': 2.643}, {'end': 1787.863, 'text': "output text and I'm going to create another function and I'm going to call it add.", 'start': 1783.459, 'duration': 4.404}, {'end': 1792.326, 'text': 'OK, something we see typically see in these crash courses.', 'start': 1787.883, 'duration': 4.443}, {'end': 1798.351, 'text': "So this is going to be an int, let's say I 32.", 'start': 1792.847, 'duration': 5.504}], 'summary': 'Demonstration of multi-line string with triple quotes and discussion on creating function arguments.', 'duration': 59.475, 'max_score': 1738.876, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1738876.jpg'}], 'start': 1568.729, 'title': 'Variables, scopes, and functions in coding', 'summary': 'Delves into the usage of var and auto as variable types, global variables, multi-line strings, and function arguments, providing examples and illustrating their impact on code structure and execution.', 'chapters': [{'end': 1890, 'start': 1568.729, 'title': 'Variables, scopes, and functions in coding', 'summary': 'Discusses the usage of var and auto as variable types, global variables, multi-line strings, and function arguments, showcasing examples and their impact on the code structure and execution.', 'duration': 321.271, 'highlights': ["Global variables can be declared outside function scopes The transcript explains the concept of global variables by demonstrating the declaration and usage of a global variable 'x' of type i32 with a value of 100, which can be accessed and printed from within a different function scope.", 'Demonstration of multi-line strings using triple quotes The speaker illustrates the usage of multi-line strings by enclosing text within triple quotes, showcasing the ability to include line breaks and print multiple lines without encountering errors.', "Creation and implementation of function with parameters The transcript presents the creation and usage of a function 'add' with parameters 'x' and 'y' of type i32, demonstrating the addition operation and returning the result, showcasing the process of defining and utilizing function parameters.", "Usage of var and auto as variable types The speaker discusses and demonstrates the application of 'var' and 'auto' as variable types, showcasing their usage in declaring and initializing variables with different data types like numbers, Booleans, and strings, emphasizing the flexibility and versatility of these variable types."]}], 'duration': 321.271, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1568729.jpg', 'highlights': ['Global variables can be declared outside function scopes', 'Usage of var and auto as variable types', 'Demonstration of multi-line strings using triple quotes', 'Creation and implementation of function with parameters']}, {'end': 2193.271, 'segs': [{'end': 1945.454, 'src': 'embed', 'start': 1916.953, 'weight': 0, 'content': [{'end': 1921.035, 'text': "So let's return zero and then we'll get rid of this.", 'start': 1916.953, 'duration': 4.082}, {'end': 1928.577, 'text': "This line here and let's look at arrays and all these examples I have in the snippets here.", 'start': 1922.415, 'duration': 6.162}, {'end': 1931.398, 'text': "So everything we're going over is in that file.", 'start': 1929.057, 'duration': 2.341}, {'end': 1935.586, 'text': 'So raise our data structures that hold multiple values.', 'start': 1932.344, 'duration': 3.242}, {'end': 1943.392, 'text': "When we define an array we have to define the the type of of data that's going to be in the array.", 'start': 1936.127, 'duration': 7.265}, {'end': 1945.454, 'text': 'We also have to define the size.', 'start': 1943.733, 'duration': 1.721}], 'summary': 'Arrays hold multiple values with defined type and size.', 'duration': 28.501, 'max_score': 1916.953, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1916953.jpg'}, {'end': 2027.081, 'src': 'embed', 'start': 1970.566, 'weight': 1, 'content': [{'end': 1979.992, 'text': "So, in brackets we're going to have the type that we want in this array, which is going to be a 32-bit integer, and then we do a semicolon here,", 'start': 1970.566, 'duration': 9.426}, {'end': 1983.354, 'text': 'not a comma, a semicolon, and then the size of the array.', 'start': 1979.992, 'duration': 3.362}, {'end': 1984.955, 'text': "So we'll say 5.", 'start': 1983.514, 'duration': 1.441}, {'end': 1991.58, 'text': "Then we're going to set it to a set of parentheses, and then we can put, I'll just do random numbers in here.", 'start': 1984.955, 'duration': 6.625}, {'end': 2001.081, 'text': 'And if I just stop there and we look at the error here, it says type error in name binding.', 'start': 1994.935, 'duration': 6.146}, {'end': 2006.466, 'text': 'I 32 four times is not implicitly convertible to two.', 'start': 2002.182, 'duration': 4.284}, {'end': 2009.009, 'text': 'I 32 five times.', 'start': 2007.748, 'duration': 1.261}, {'end': 2010.991, 'text': 'So that means a missing one here.', 'start': 2009.409, 'duration': 1.582}, {'end': 2011.651, 'text': "So I'll put in.", 'start': 2011.051, 'duration': 0.6}, {'end': 2013.753, 'text': "Let's do 19.", 'start': 2011.671, 'duration': 2.082}, {'end': 2017.317, 'text': 'OK, so that should work or that should compile.', 'start': 2013.753, 'duration': 3.564}, {'end': 2021.44, 'text': "Now, let's say I wanted to do a string.", 'start': 2018.499, 'duration': 2.941}, {'end': 2022.62, 'text': "We'll say var.", 'start': 2021.46, 'duration': 1.16}, {'end': 2024.72, 'text': 'You know what? Let me make this.', 'start': 2022.64, 'duration': 2.08}, {'end': 2027.081, 'text': 'Yeah, there we go.', 'start': 2026.42, 'duration': 0.661}], 'summary': 'Defining a 32-bit integer array of size 5 and troubleshooting type error in name binding.', 'duration': 56.515, 'max_score': 1970.566, 'thumbnail': ''}, {'end': 2127.774, 'src': 'embed', 'start': 2062.444, 'weight': 4, 'content': [{'end': 2067.606, 'text': "Oops Let's say print and then we'll go.", 'start': 2062.444, 'duration': 5.162}, {'end': 2077.65, 'text': "Had that because this is going to be a number, so let's take the name of the variable, which is going to be I underscore ARR.", 'start': 2069.607, 'duration': 8.043}, {'end': 2085.898, 'text': "And remember, arrays are zero-based, so it's going to be 0, 1, 2, 3, 4 for the indexes.", 'start': 2078.693, 'duration': 7.205}, {'end': 2089.32, 'text': 'I want to get 43, which is going to be the one index.', 'start': 2086.358, 'duration': 2.962}, {'end': 2096.565, 'text': "So if I do that, you'll see that it'll print out 43.", 'start': 2089.86, 'duration': 6.705}, {'end': 2105.931, 'text': 'If I wanted to get the hello from the string, then I could do s underscore array and I want to get the zero index,', 'start': 2096.565, 'duration': 9.366}, {'end': 2108.193, 'text': 'which is going to be the hello string.', 'start': 2105.931, 'duration': 2.262}, {'end': 2118.569, 'text': 'Okay, now in addition to arrays, we have tuples, which are another way to store multiple values.', 'start': 2109.443, 'duration': 9.126}, {'end': 2121.25, 'text': "So let's say var t.", 'start': 2119.009, 'duration': 2.241}, {'end': 2126.233, 'text': "Now with tuples, we have to define the types, but we don't have to define a length.", 'start': 2121.25, 'duration': 4.983}, {'end': 2127.774, 'text': "So it's not as strict.", 'start': 2126.593, 'duration': 1.181}], 'summary': 'Explaining arrays, accessing values, and introducing tuples in python.', 'duration': 65.33, 'max_score': 2062.444, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag2062444.jpg'}], 'start': 1892.466, 'title': 'Arrays and tuples in programming', 'summary': 'Covers the basics of arrays and tuples in c++, javascript, and rust, emphasizing the need to define type and size. it includes examples of creating, accessing values, and handling type errors, providing insights into programming limitations and flexibility.', 'chapters': [{'end': 1991.58, 'start': 1892.466, 'title': 'Arrays in c++ and javascript', 'summary': 'Covers the basics of arrays in c++ and the limitations compared to javascript, emphasizing the need to define the type and size of the array, with an example of creating an array of 32-bit integers with a size of 5.', 'duration': 99.114, 'highlights': ['Arrays are data structures that hold multiple values with a defined type and size.', 'In C++, the type and size of the array need to be explicitly defined, unlike in JavaScript.', 'An example of creating an array of 32-bit integers with a size of 5 is demonstrated.']}, {'end': 2193.271, 'start': 1994.935, 'title': 'Arrays, tuples, and accessing values in rust', 'summary': 'Covers the basics of arrays and tuples in rust, including examples of declaring and accessing values, with a focus on understanding type errors and indexing. it also highlights the flexibility of tuples in handling different types of data.', 'duration': 198.336, 'highlights': ['The chapter explains the type error in name binding when working with arrays and demonstrates the process of rectifying the error by adjusting the values, emphasizing the importance of understanding implicit type conversions and compatibility.', 'It provides an example of declaring a string array and accessing specific values by their index, showcasing the zero-based indexing system and its application in retrieving desired elements from the array.', 'The transcript introduces tuples as an alternative way to store multiple values, highlighting the flexibility in defining types and the ability to accommodate different data types within a single tuple, exemplifying the concept with a tuple containing a mix of integers, boolean, and string values.']}], 'duration': 300.805, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag1892466.jpg', 'highlights': ['Arrays are data structures with defined type and size.', 'C++ requires explicit definition of array type and size.', 'Example: creating a 5-element array of 32-bit integers.', 'Understanding implicit type conversions and compatibility is crucial.', 'Demonstrating zero-based indexing system for array access.', 'Tuples offer flexibility in defining types and accommodating different data types.', 'Example: tuple containing mix of integers, boolean, and string values.']}, {'end': 2786.618, 'segs': [{'end': 2232.16, 'src': 'embed', 'start': 2193.391, 'weight': 1, 'content': [{'end': 2199.554, 'text': "So let's say print uppercase P print and let's take.", 'start': 2193.391, 'duration': 6.163}, {'end': 2201.595, 'text': 'So this hello right here.', 'start': 2200.215, 'duration': 1.38}, {'end': 2205.717, 'text': "That's going to be this is 0 1 2 3.", 'start': 2201.955, 'duration': 3.762}, {'end': 2211.661, 'text': 'So we can do T1 the name of the variable and then the index of three and we should get hello.', 'start': 2205.717, 'duration': 5.944}, {'end': 2216.075, 'text': 'So we access it just like we would with an array.', 'start': 2212.834, 'duration': 3.241}, {'end': 2220.757, 'text': 'So we can also convert tuples to an array.', 'start': 2217.035, 'duration': 3.722}, {'end': 2228.999, 'text': 'So if I say var t auto, set that to just 1 and 2.', 'start': 2220.817, 'duration': 8.182}, {'end': 2232.16, 'text': 'And then we should be able to say var a.', 'start': 2228.999, 'duration': 3.161}], 'summary': 'Using print statements and accessing elements in tuples and arrays.', 'duration': 38.769, 'max_score': 2193.391, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag2193391.jpg'}, {'end': 2298.402, 'src': 'embed', 'start': 2272.679, 'weight': 2, 'content': [{'end': 2278.441, 'text': 'And this is like a JavaScript object or a Python dictionary, basically key value pairs.', 'start': 2272.679, 'duration': 5.762}, {'end': 2281.022, 'text': "So let's get rid of this stuff.", 'start': 2279.041, 'duration': 1.981}, {'end': 2285.783, 'text': "And let's create, we'll say var person.", 'start': 2282.622, 'duration': 3.161}, {'end': 2289.484, 'text': "And I'm going to set the type to auto.", 'start': 2286.923, 'duration': 2.561}, {'end': 2294.119, 'text': 'And the syntax for this is a little weird.', 'start': 2291.798, 'duration': 2.321}, {'end': 2297.461, 'text': "It's going to be dot and then whatever we want the key to be.", 'start': 2294.159, 'duration': 3.302}, {'end': 2298.402, 'text': "So I'll say name.", 'start': 2297.481, 'duration': 0.921}], 'summary': "Creating a javascript object with key-value pairs for a person's information.", 'duration': 25.723, 'max_score': 2272.679, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag2272679.jpg'}, {'end': 2499.441, 'src': 'embed', 'start': 2474.164, 'weight': 0, 'content': [{'end': 2485.268, 'text': "So what I'm going to do here is let's get rid of that and I'm going to go above the main function here and I'm going to create a class.", 'start': 2474.164, 'duration': 11.104}, {'end': 2493.572, 'text': 'So class the class keyword is actually going to be lowercase and then the name of the class will be uppercase.', 'start': 2486.169, 'duration': 7.403}, {'end': 2495.233, 'text': "So I'm going to say class point.", 'start': 2493.612, 'duration': 1.621}, {'end': 2499.441, 'text': 'And then classes are our structures that you use.', 'start': 2496.218, 'duration': 3.223}], 'summary': "Creating a class named 'point' for structures in programming.", 'duration': 25.277, 'max_score': 2474.164, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag2474164.jpg'}], 'start': 2193.391, 'title': 'Programming data structures', 'summary': 'Covers working with tuples and structures in programming, including accessing elements, converting tuples to arrays, creating and modifying structures. it also covers the basics of structs, classes, and methods, including the use of var, struct creation, class instantiation, properties, methods, and static methods, with examples and explanations.', 'chapters': [{'end': 2359.391, 'start': 2193.391, 'title': 'Working with data structures in programming', 'summary': 'Covers working with tuples and structures in programming, including accessing elements, converting tuples to arrays, and creating and modifying structures like javascript objects or python dictionaries.', 'duration': 166, 'highlights': ['The chapter covers working with tuples and structures in programming, including accessing elements, converting tuples to arrays, and creating and modifying structures like JavaScript objects or Python dictionaries.', 'Tuples can be accessed by using the variable name and the index, similar to accessing elements in an array.', 'Tuples can also be converted to arrays for further manipulation and processing in the program.', "Structures, similar to JavaScript objects or Python dictionaries, consist of key-value pairs and can be created and modified using the 'dot' syntax.", 'Example of modifying a structure by changing the value associated with a specific key and accessing the updated value.']}, {'end': 2786.618, 'start': 2360.131, 'title': 'Structs, classes, and methods', 'summary': 'Covers the basics of structs, classes, and methods in programming, including the use of var, struct creation, class instantiation, properties, methods, and static methods, with examples and explanations.', 'duration': 426.487, 'highlights': ['The chapter covers the basics of structs, classes, and methods in programming It explains the fundamentals of programming, including the use of structs, classes, and methods.', 'the use of VAR, struct creation, class instantiation, properties, methods, and static methods It delves into the usage of VAR, the creation of structs, instantiation of classes, properties, methods, and static methods.', 'with examples and explanations The chapter provides examples and detailed explanations to understand the concepts effectively.']}], 'duration': 593.227, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag2193391.jpg', 'highlights': ['The chapter covers the basics of structs, classes, and methods in programming It explains the fundamentals of programming, including the use of structs, classes, and methods.', 'Tuples can also be converted to arrays for further manipulation and processing in the program.', "Structures, similar to JavaScript objects or Python dictionaries, consist of key-value pairs and can be created and modified using the 'dot' syntax.", 'Tuples can be accessed by using the variable name and the index, similar to accessing elements in an array.', 'The chapter covers working with tuples and structures in programming, including accessing elements, converting tuples to arrays, and creating and modifying structures like JavaScript objects or Python dictionaries.']}, {'end': 3149.162, 'segs': [{'end': 2881.312, 'src': 'embed', 'start': 2786.618, 'weight': 0, 'content': [{'end': 2794.813, 'text': "but we're going to say function origin And it's going to have a type of point.", 'start': 2786.618, 'duration': 8.195}, {'end': 2801.474, 'text': "And then I'm just going to return So let's say return dot x.", 'start': 2795.997, 'duration': 5.477}, {'end': 2806.157, 'text': "We're basically going to set x and y to 0, y equals 0.", 'start': 2801.474, 'duration': 4.683}, {'end': 2812.18, 'text': "All right, now this origin function, we don't call on p.", 'start': 2806.157, 'duration': 6.023}, {'end': 2814.141, 'text': "So we're not going to do p dot origin.", 'start': 2812.18, 'duration': 1.961}, {'end': 2817.863, 'text': "We're going to do point, the actual class of point.", 'start': 2814.161, 'duration': 3.702}, {'end': 2825.887, 'text': "So let's come down here and let's say, so this variable of p, let's change that.", 'start': 2818.723, 'duration': 7.164}, {'end': 2828.729, 'text': 'So it is going to be point.', 'start': 2827.388, 'duration': 1.341}, {'end': 2834.698, 'text': "But we're going to set it to the class name of point and then dot origin.", 'start': 2829.895, 'duration': 4.803}, {'end': 2845.826, 'text': "OK, and then if we come down here and let's just print out P.", 'start': 2834.718, 'duration': 11.108}, {'end': 2851.15, 'text': "I'm sorry, PX, P dot X or Y, whichever one you want to print out, they're both going to be zero.", 'start': 2845.826, 'duration': 5.324}, {'end': 2853.831, 'text': "OK, because that's what we set in this function.", 'start': 2851.17, 'duration': 2.661}, {'end': 2858.915, 'text': "If I change X to 300, then that's going to print out here.", 'start': 2853.891, 'duration': 5.024}, {'end': 2860.738, 'text': 'All right.', 'start': 2860.458, 'duration': 0.28}, {'end': 2866.742, 'text': "And again, if you're not familiar with object oriented programing and classes and objects, this is going to be really confusing.", 'start': 2860.858, 'duration': 5.884}, {'end': 2871.665, 'text': 'But but if you are, then I mean, it should be pretty simple.', 'start': 2867.242, 'duration': 4.423}, {'end': 2876.368, 'text': 'OK, so the next thing I want to look at are pointers.', 'start': 2873.106, 'duration': 3.262}, {'end': 2881.312, 'text': 'So a pointer is a variable that holds the address of another variable.', 'start': 2876.729, 'duration': 4.583}], 'summary': 'Explanation of creating a class with a function to set values, and pointers in programming.', 'duration': 94.694, 'max_score': 2786.618, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag2786618.jpg'}], 'start': 2786.618, 'title': 'Python classes, functions, and pointers', 'summary': 'Covers creating classes, defining functions, and initializing variables in python. it also explores pointers in object oriented programming, demonstrating manipulation of variable values.', 'chapters': [{'end': 2853.831, 'start': 2786.618, 'title': 'Understanding class and function in python', 'summary': 'Discusses creating a class in python, defining a function within the class, and initializing variables to 0, while highlighting the usage of the class name for calling the function and the outcome of printing the initialized variables as 0.', 'duration': 67.213, 'highlights': ['The chapter discusses the process of creating a class in Python and initializing variables x and y to 0 within the origin function.', 'The chapter emphasizes the usage of the class name for calling the function, like point.origin, instead of p.origin.', 'The chapter explains that after the initialization, printing P dot X or Y will result in both being zero.']}, {'end': 3149.162, 'start': 2853.891, 'title': 'Pointers in object oriented programming', 'summary': 'Discusses the concept of pointers in object oriented programming, demonstrating how to create and use pointers to manipulate variable values, with examples showing the change in variable values through pointer manipulation.', 'duration': 295.271, 'highlights': ['Pointers can be used to hold the address of another variable, enabling manipulation of the variable value indirectly.', 'Demonstrated the creation and usage of pointers to manipulate variable values, showcasing how changing the pointer value affects the original variable value.', 'Explained the concept of pointers in object oriented programming and demonstrated their usage with examples of changing variable values through pointer manipulation.']}], 'duration': 362.544, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag2786618.jpg', 'highlights': ['The chapter explains that after the initialization, printing P dot X or Y will result in both being zero.', 'The chapter discusses the process of creating a class in Python and initializing variables x and y to 0 within the origin function.', 'The chapter emphasizes the usage of the class name for calling the function, like point.origin, instead of p.origin.', 'Explained the concept of pointers in object oriented programming and demonstrated their usage with examples of changing variable values through pointer manipulation.', 'Demonstrated the creation and usage of pointers to manipulate variable values, showcasing how changing the pointer value affects the original variable value.', 'Pointers can be used to hold the address of another variable, enabling manipulation of the variable value indirectly.']}, {'end': 4005.166, 'segs': [{'end': 3418.993, 'src': 'embed', 'start': 3393.389, 'weight': 0, 'content': [{'end': 3398.494, 'text': "if, though, if it matches one of those, then it's going to say that that is the lucky number.", 'start': 3393.389, 'duration': 5.105}, {'end': 3401.516, 'text': "if not, then it'll say it's not.", 'start': 3398.494, 'duration': 3.022}, {'end': 3404.559, 'text': 'so we do this just just like you would use a switch statement.', 'start': 3401.516, 'duration': 3.043}, {'end': 3407.189, 'text': 'we say match, OK.', 'start': 3404.559, 'duration': 2.63}, {'end': 3410.39, 'text': "so matching, what we're, what we're evaluating here is the number.", 'start': 3407.189, 'duration': 3.201}, {'end': 3412.431, 'text': "So let's say number.", 'start': 3411.15, 'duration': 1.281}, {'end': 3418.993, 'text': 'What is wrong with my keyboard or me? So we want to match the number and then we say the case.', 'start': 3413.111, 'duration': 5.882}], 'summary': 'Using a switch statement to match a number and evaluate cases.', 'duration': 25.604, 'max_score': 3393.389, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag3393389.jpg'}, {'end': 3561.922, 'src': 'embed', 'start': 3533.27, 'weight': 3, 'content': [{'end': 3536.331, 'text': "So next thing we're going to do is a while loop.", 'start': 3533.27, 'duration': 3.061}, {'end': 3538.052, 'text': "We're going to look at iteration here.", 'start': 3536.351, 'duration': 1.701}, {'end': 3539.432, 'text': "So let's get rid of this.", 'start': 3538.292, 'duration': 1.14}, {'end': 3543.287, 'text': 'And get rid of this whole function.', 'start': 3541.565, 'duration': 1.722}, {'end': 3546.449, 'text': "And we're just going to write it in here now.", 'start': 3543.307, 'duration': 3.142}, {'end': 3550.593, 'text': "Again, I can't use greater than or less than.", 'start': 3547.73, 'duration': 2.863}, {'end': 3552.815, 'text': 'So it makes this a little tricky.', 'start': 3550.813, 'duration': 2.002}, {'end': 3558.399, 'text': 'The syntax, though, is going to be pretty much the same as most other C syntax languages.', 'start': 3553.615, 'duration': 4.784}, {'end': 3561.922, 'text': 'And you can look at the examples like explore.', 'start': 3558.559, 'duration': 3.363}], 'summary': 'Introducing while loop for iteration in c-like syntax.', 'duration': 28.652, 'max_score': 3533.27, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag3533270.jpg'}, {'end': 3725.972, 'src': 'embed', 'start': 3705.102, 'weight': 1, 'content': [{'end': 3715.107, 'text': 'So generics are a mechanism for writing parameterized code that applies generally instead of making their duplicates for similar situations,', 'start': 3705.102, 'duration': 10.005}, {'end': 3717.308, 'text': 'using the same code for different types.', 'start': 3715.107, 'duration': 2.201}, {'end': 3723.471, 'text': "So I know that might not make a lot of sense, but let's say we have, for instance, a function.", 'start': 3718.009, 'duration': 5.462}, {'end': 3725.972, 'text': "Let's call, let's say, get int.", 'start': 3724.172, 'duration': 1.8}], 'summary': 'Generics allow writing parameterized code for different types.', 'duration': 20.87, 'max_score': 3705.102, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag3705102.jpg'}, {'end': 3920.975, 'src': 'embed', 'start': 3874.737, 'weight': 4, 'content': [{'end': 3882.461, 'text': "So let's come down here and let's say print and we'll do actually you know what I'll just copy both of these.", 'start': 3874.737, 'duration': 7.724}, {'end': 3891.28, 'text': "And let's change get int to get val pass in an int and then change this to get val and pass in a string.", 'start': 3884.315, 'duration': 6.965}, {'end': 3894.062, 'text': "And you'll see that it does the same thing.", 'start': 3891.881, 'duration': 2.181}, {'end': 3895.103, 'text': 'All right.', 'start': 3894.823, 'duration': 0.28}, {'end': 3900.487, 'text': "So that's the that's the easiest example I could come up with to explain generics.", 'start': 3895.143, 'duration': 5.344}, {'end': 3907.553, 'text': "It's basically like a template so that you don't have to have multiple functions to handle multiple types.", 'start': 3901.168, 'duration': 6.385}, {'end': 3915.932, 'text': "And if you, if you don't have, if you're a JavaScript developer and you don't have experience with TypeScript, which does have generics,", 'start': 3909.048, 'duration': 6.884}, {'end': 3920.975, 'text': "then this might seem a little weird to you, because you don't deal with types in the first place.", 'start': 3915.932, 'duration': 5.043}], 'summary': 'Generics act like templates, simplifying code for handling multiple types.', 'duration': 46.238, 'max_score': 3874.737, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag3874737.jpg'}, {'end': 4003.205, 'src': 'heatmap', 'start': 3962.314, 'weight': 1, 'content': [{'end': 3968.579, 'text': "you click here and go to like overview, And there's a lot of information here.", 'start': 3962.314, 'duration': 6.265}, {'end': 3970.421, 'text': 'So this this is where I learned everything.', 'start': 3968.619, 'duration': 1.802}, {'end': 3973.484, 'text': 'And there were a couple other articles that I looked at as well.', 'start': 3970.441, 'duration': 3.043}, {'end': 3977.909, 'text': 'But yeah, so just just keep in mind, this is experimental.', 'start': 3974.825, 'duration': 3.084}, {'end': 3983.595, 'text': "This isn't something you're going to find a job doing tomorrow or even a few months from now.", 'start': 3977.949, 'duration': 5.646}, {'end': 3985.497, 'text': 'So just keep that in mind.', 'start': 3984.235, 'duration': 1.262}, {'end': 3987.038, 'text': 'I just wanted to do this because.', 'start': 3985.597, 'duration': 1.441}, {'end': 3994.402, 'text': 'i was interested and whenever i jump in and i learn something i feel like i want to you know,', 'start': 3987.939, 'duration': 6.463}, {'end': 4002.285, 'text': "teach everyone else what i've learned in a in a more compact way than having to come here and read over all this.", 'start': 3994.402, 'duration': 7.883}, {'end': 4003.205, 'text': "but that's it, guys.", 'start': 4002.285, 'duration': 0.92}], 'summary': 'Experimental learning, not for immediate job use, but for sharing knowledge in a compact way.', 'duration': 40.891, 'max_score': 3962.314, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag3962314.jpg'}, {'end': 4002.285, 'src': 'embed', 'start': 3974.825, 'weight': 6, 'content': [{'end': 3977.909, 'text': 'But yeah, so just just keep in mind, this is experimental.', 'start': 3974.825, 'duration': 3.084}, {'end': 3983.595, 'text': "This isn't something you're going to find a job doing tomorrow or even a few months from now.", 'start': 3977.949, 'duration': 5.646}, {'end': 3985.497, 'text': 'So just keep that in mind.', 'start': 3984.235, 'duration': 1.262}, {'end': 3987.038, 'text': 'I just wanted to do this because.', 'start': 3985.597, 'duration': 1.441}, {'end': 3994.402, 'text': 'i was interested and whenever i jump in and i learn something i feel like i want to you know,', 'start': 3987.939, 'duration': 6.463}, {'end': 4002.285, 'text': "teach everyone else what i've learned in a in a more compact way than having to come here and read over all this.", 'start': 3994.402, 'duration': 7.883}], 'summary': "The experimental nature of the topic implies it's not immediately applicable for job seeking, but the speaker is motivated to share their learning in a more concise manner.", 'duration': 27.46, 'max_score': 3974.825, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag3974825.jpg'}], 'start': 3149.162, 'title': 'Rust conditionals, loops, and generics', 'summary': 'Introduces conditionals and loops in rust, covering if-else statements, match statements, and while loops, and explains generics, demonstrating how it enables writing parameterized code to handle different types, reducing the need for duplicate functions.', 'chapters': [{'end': 3682.809, 'start': 3149.162, 'title': 'Introduction to conditionals and loops in rust', 'summary': 'Introduces the concepts of conditionals and loops in rust, covering if-else statements, match statements, and while loops, highlighting the limitations of comparison operators and providing practical examples for each.', 'duration': 533.647, 'highlights': ['The chapter covers if-else statements, demonstrating the usage of if conditions, else statements, and the limitations of comparison operators in Rust, with examples of comparing numbers and printing corresponding messages.', 'It introduces match statements as the equivalent of a switch statement in other languages, showcasing how to match different cases and use a default case, with an example of identifying lucky numbers and returning messages based on the input.', 'The chapter provides a practical example of using a while loop in Rust, demonstrating the syntax and functionality of the loop with a decrementing variable, showcasing the process and outcome of the loop execution.']}, {'end': 4005.166, 'start': 3685.167, 'title': 'Understanding generics in code', 'summary': 'Explains the concept of generics, demonstrating how it enables writing parameterized code to handle different types, reducing the need for duplicate functions, with examples of using generic functions to handle different data types effectively.', 'duration': 319.999, 'highlights': ['Generics allow writing parameterized code to handle different types, reducing the need for duplicate functions, with examples of using generic functions to handle different data types effectively.', "Demonstrated examples include creating generic functions 'getVal' to handle different data types like int and string, showcasing the flexibility and efficiency of generics.", 'The speaker emphasizes that understanding generics is crucial, especially for JavaScript developers transitioning to TypeScript, as it provides a way to handle types effectively within code.', 'The chapter encourages further exploration of the topic, suggesting resources for additional learning and clarifying that the concept is experimental and not immediately applicable in job scenarios.']}], 'duration': 856.004, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/MMxbP8ME2Ag/pics/MMxbP8ME2Ag3149162.jpg', 'highlights': ['The chapter covers if-else statements, demonstrating the usage of if conditions, else statements, and the limitations of comparison operators in Rust, with examples of comparing numbers and printing corresponding messages.', 'Generics allow writing parameterized code to handle different types, reducing the need for duplicate functions, with examples of using generic functions to handle different data types effectively.', 'It introduces match statements as the equivalent of a switch statement in other languages, showcasing how to match different cases and use a default case, with an example of identifying lucky numbers and returning messages based on the input.', 'The chapter provides a practical example of using a while loop in Rust, demonstrating the syntax and functionality of the loop with a decrementing variable, showcasing the process and outcome of the loop execution.', "Demonstrated examples include creating generic functions 'getVal' to handle different data types like int and string, showcasing the flexibility and efficiency of generics.", 'The speaker emphasizes that understanding generics is crucial, especially for JavaScript developers transitioning to TypeScript, as it provides a way to handle types effectively within code.', 'The chapter encourages further exploration of the topic, suggesting resources for additional learning and clarifying that the concept is experimental and not immediately applicable in job scenarios.']}], 'highlights': ['Carbon provides bi-directional interoperability with C++ libraries, enabling developers to utilize C++ code and libraries within Carbon, as well as allowing the use of Carbon in C++ code.', 'The syntax of Carbon is relatively simple, making it accessible for beginners who have never written a line of C++.', 'Google aims to address the technical debt and the struggle to meet developer needs in C++ by creating Carbon with a modern generic system, modular code organization, and a consistent and simple syntax.', 'The language goals of Carbon include memory safety improvement, modern generic system implementation, and interoperability and migration from existing C++ code, addressing the challenges faced by C++ as a non-memory-safe language.', 'The compiler explorer allows instant compilation, enhancing efficiency.', "Introduction to creating variables using the 'VAR' keyword.", 'Arrays are data structures with defined type and size.', 'The chapter covers if-else statements, demonstrating the usage of if conditions, else statements, and the limitations of comparison operators in Rust, with examples of comparing numbers and printing corresponding messages.', 'Generics allow writing parameterized code to handle different types, reducing the need for duplicate functions, with examples of using generic functions to handle different data types effectively.']}