hello everyone and welcome to yet another Recreation programming session with Mr aan so uh today it's too hard to do any serious software development so what I decided to do I decided to do some low effort language or you slop and the target of today's stream is going to be this thing uh that I heard about some time ago but I you know just brush it all because it's yet another so-called SE killer uh but it looks like a pretty good Target for our language review slop so U yeah so let's actually read about it so C3 programming language simple fast safe compiled wow uh for developing maintainable software not readable mind you only maintainable they they said nothing about readable uh so yeah it looks like I don't even know what it looks like is that right what's the point of a fan keyword if you just like using this is basically C but with an unnecessary additional FN keyword like it's just like you can remove FN keyword and have sort of like a backward compatibility with C it's just like okay so it has modules it has modules so you you can have a module system and stuff like that so it's already better than C so it has modules it's already better than C you can have name spaces you can finally separate R into a different name space so it doesn't collide with wind API that's already a win in my opinion that's already a win uh right so let's actually get started get a far why is it bright I specifically requested like a dark mode like why don't you this is what you get when C developers start developing websites right so you get stuff like that anyways so uh okay but how do I install this excuse me uh okay I'm going to go back uh so get started doesn't get you started okay so here is the installation guide okay so you have Dean specifically Debian not just Linux Debian and we are as far as I know on Deon okay so let's actually download so we so it's a Linux star okay so we're downloading uh okay okay so we we got the tar we God Tour okay so let's go so I'm going to go into the downloads uh let me take a look so where are we going to put all that so I think I want to create like a separate sort of like a folder and shis uh so I'm going to call C3 probe uh and I'm going to just move this entire thing in here and let's do unboxing are you guys ready are you guys ready for unboxing experience of a programming language so let's go ahead and just like all right so uh the root folder is called Linux not even a C3 Linux or it's just it's just Linux we just downloaded the source code of Linux apparently that that's what happened uh all right so I'm going to rename it to just something like C3 Linux so I can like distinguish it like I mean the the archive itself is already called C3 Linux you could have like just called it like that at least uh okay so we've got a single executable and msvc build liaries Buy on Linux build I'm on Linux guys I'm I'm on Linux what msvc what the is this okay wait I want to open it like script based on uh this thing uh okay so what is that so it's based on some sort of like a gist uh right so you need msv C for Linux or it's just like what the is going on don't compile Linker Windows SDK without installing full visual studio all right that's fine just like it doesn't affect anything it just like looks a little bit silly right it just looks a little bit silly so we have an executable C3 C right so we can take a look at what it is it is in fact eelf a 69 bit LSB Pi executable x86 64 version one CV dynamically disgusting dynamically link how are you supposed to create a self-contained software if you dynamically link with things absolutely disgusting anyway that that's fine I'm joking actually so let's actually take a look at what kind of dependencies do we have in here not that many not that many dependencies so we have a compiler that depends on lib XML too uh this compiler for whatever reason needs to be able to parse XML files I have no idea why but it it it it needs to be able to par XML files Maybe maybe because it integrates with msvc actually because as far as I know msvc projects there are XML files aren't they I think they are so just in case it does that but I mean we are on Linux again so that's that doesn't explain uh maybe the standard Library sort of has like something but but I mean the compiler doesn't need to have Li XML I don't know maybe it's configured through XL uh Li okay uh you guys are funny you guys are funny okay so let's let's actually try to run this executable and see if it even runs on my machine it seems to be running okay uh so okay it has a system of sub commands so you basically compile a file right you can initialize projects you can build and stuff like that so it feels a little bit like go it feels a little bit like goish right so okay so let's take a look at hello world no no no no no no no so what I'm going to do I'm going to create Hello C3 and I'm going to actually save it as an empty file so let's do an empty file test how this language will react an empty file right so will it give any useful information so uh because it's kind of cool it would be cool to have a language that you just start with an empty file and the error messages are descriptive enough that you can actually figure out how to create an an entry point without even looking into the documentation just by looking at the error messages right so uh it would be kind of cool if there was a language that can achieve that uh right so let actually see oh you're supposed to actually say something like compile okay no main function was found compilation only object files are generated uh okay so sh what the [Music] this this thing that just bared it where the am I even looking at like bro there's so many of them like holy okay so uh if I take a look at what the is this uh it's a almost a megabyte of files like I created an empty file I tried to compile just an empty file and it just barfed into the current folder almost a megabyte of object files of different things I I don't know what's up with that I honestly don't know what's up with that uh but we're going to just keep it right so um it's understandable for like a compiler to just have some sort of artifacts of compilation J does stuff like that but as far as I know J tries to keep them in a separate sort of like a DOT build folder right so it it may barf a bunch of stuff but it will barf it into a separate sort of like a bag right into a separate sort of uh folder so to not dis disturb your current folder right I think it's a little bit more civil uh so anyways uh let's actually see so it wants um a main function so from the promotional material from promotional material I kind of vaguely remember that you're supposed to put FN void we don't even have a highlighting guys we don't even have a syntax highlighting okay so let's actually try to do something like this and let's try to compile it one more time so what is it going to do program linked to executable hello okay so all the object files just like sucked up into the executable right so I suppose there's sort of like an intermediate things um right so everything got sucked up into the executable all right so fair enough let's take a look at the executable that we got in here all right so it's um 64bit Al executable it's dynamically linked and stuff like that nothing particularly special and what does it depend on what is it depend on it depends on lipy it depends on only on lipy um so it's almost statically linked almost they couldn't get rid of lipy which is understandable kind of on Linux it's kind of difficult to get rid of lipy right so it's almost like a it's it's the win API of Linux right lipy is the win API of Linux there's nothing much you can do uh what was there lip C.O if it links with lipy I have no idea like I'm seeing this entire for the first time uh this is literally my first impression of this thing like I don't know anything about it right never tried it locally on the machine only read documentation a little bit in the past but that's about it um okay so it's actually try to run this entire thing and it's not supposed to do anything right so it's not supposed to do anything so remember you do something like IO print L something like your mom right so let's actually see if it's going to compile uh okay so expect it look at that look at that so it tells you precisely where you expect the semicolon props for error messages props for error messages okay okay so let's see uh okay so iint line could not be found did you spell it right asking rhetorical questions asking rhetorical question I don't know like did I do I have to maybe uh import this entire thing yeah so I have to actually do the import okay so let's actually try to do it one more time okay so is it not print Ln it's just oh it's a print n without L okay so all right uh fair enough fair enough all right so I wonder if I if I don't import and just do STD right is it going to no in a module so you have to explicitly import it like that okay so I got hello world seems good seems good she seems tamaguchi but I want to have like a little bit of extension or like mode so let's see if the mode for this thing is available in the in the packages in Mela packages so let me do C3 uh mode there's no mode in here so let me go to melpa is this another rip speed run by the way I I don't know honestly so we can try to link with uh with rip um so I I didn't really know how to link with external libraries in here so we'll see we'll see so C3 uh so there's no C3 mode in here so maybe we can find something uh something on the interwebs something on the interwebs C3 mode emx um so can I by the way have a dark mod in here thank you so much uh yeah apparently we just can't have the editor support for this thing um okay so C3 maybe it's a c3c mode no it it doesn't it doesn't know that what about Google maybe Google can answer that to us no so all right so C3 uh language GitHub maybe they have some sort of like yeah so this is what I'm talking about they have a GitHub so maybe they have an extension somewhere there um so there's a Docker dependencies minion s rappers resources don't really see anything o so there's some like they they ped Quake or something like wait did they rewrite it in Quake or what's up with this screenshot what's up with this like what does it have to do with the this it's a I don't know man it's it's kind of bizarre but anyway so maybe it's in organization uh so editor plugins okay we found something bra bra bra emac look at that look at that we found emac okay so uh obviously I probably want to actually give the link to the editor plugins in here right in the description uh so that's what we found this this is where we found all that so this had simple syntax highlight for yeah this is exactly but the fu am I famous or something it's just like this is the last think I actually expected what the I like I'm I'm glad that it was useful right I'm actually glad it was useful okay uh yeah all right all fair enough fair enough it does look like it it does look like it uh yep yep thank all right so let me quick give it a star uh right and obviously like so far from what I from what I can see this language already deserve the star right it works so you can like write hello world in it like it's a it's a language um so I'm going to give you the star already uh don't know if it's going to become the actual SE killer or anything like that uh none of the languages actually do become SE Killers I don't think it's possible to see to kill uh SE at this point already uh but I mean just augment it just kind of augment it maybe it is possible um all right so let's do W get and let's just W get this entire thing all right so and in here um so here we have where is the g mode we can just simply do require C3 mode right so I can just enable that and when I go to hello see3 and I rever this entire thing look at that look at that we've got the syntax highlighting we got the syntax highlighting so I can already uh work with this language I can already work with this language all right pretty cool pretty cool pretty cool so what kind of stuff we can do in this language right so there's some examples uh what kind of examples okay so you have if conditions you have for Loops which are classical uh classical for Loops uh from C so with like this three part initialization condition and increment okay fair enough honestly it looks like C accept that single FN keyword this is something that they don't understand if you're trying to look like C just go all the way through why introducing that additional keyword I do not fully understand is that to sort of like resolve some sort of like um syntactical ambiguity in SE or something like maybe yeah yeah yeah so this is what I was thinking about maybe for function pointers because function pointers syntax in C is kind of ass yeah people are talking about like there is a four each in here yeah that's actually pretty cool uh so maybe this is needed to resolve some sort of like a asness of the function Point syntax maybe that's the case uh you have enumerations and you can even specify the type of the underlying type of the enumeration that's already pretty cool that's pretty cool so here are the switch cases and stuff like that so that that's a c C++ killer right there the C++ killer right there because one of the killer feature of C++ was what destructors a so basically you can deallocate some resources when you reach the end of the scope and they were always bragging and uh you know acting like they have a they have a moral High Ground overse for that feature not anymore we've got the furbit we've got already better than C++ already better than C++ so yeah differ um okay stru types I mean everybody has stru types function pointers uh yeah okay so you you were right by the way you were right so it just makes it easier to maybe Define function Point def so it's sort of like a redefinition of some sort so you're so maybe it's a type definition or or whatever so error handing oh okay so errors are handled using optional suix denoted with so it's sort of like an in hair or whatever yeah yeah okay I see okay okay okay okay so there's this kind of stuff uh this kind of stuff all right contracts wait a second uh pre and post conditions are optionally compiled into asserts helping to optimize the code o ensure and they're part of like a comment in here what is this Java stuff so you put this kind of stuff into a comment but because it's at it's sort of like an attribute so some external tools may probably inspect that and maybe bake that what is what is this Java what what Java is doing in my SE killer excuse me this is like jav what like imagine like programming CCC all of a sudden Java brother o where's that Meme from by the way it's such a f like I see everyone actually like reposting that like brother uh all right so there's some macros macro arguments may be immediately evaluated okay this is actually super cool wait a second uh so macra and so I suppose it's like literally like substituted in here and macr are not just some stinky preprocessor they're part of the language they're part of the language this is what I this is I can respect actually oo some sexy macros damn some sexy sexy macros all right so methods uh but I mean okay so this is kind of a questionable feature right so but but it works like in go right so I don't really see any like that much point in in methods to be fair uh right there's just like a syntax an alternative syntax to uh to call in a function because at the end of the day right so how something like this is different than something like this it's just like it's just an alternative Sy it's just an alternative syntax and it's just like uh maybe some people like it because you can sort of like chain you can sort of like chain this kind of thing right and it feels cool uh it's almost it feels as cool as for example chaining the commands in bash right so you can have command F then you pipe it into bar into buzz and you you build this sort of like a chain thingy so it kind of feels cool you feel smart and maybe because of that people also like methods I personally just like an alternative syntax right so uh but whatever whatever it's fine it's fine uh compile reflect oo o so wait a freaking second that is sexy mate look at that you have a macro print fields and it accepts a type you take members of that type and you just iterate them at compile time you iterating Fields over type at compile time in the context of a macro and what you're doing in here I suppose since it's like a macro for each right so it has a dollar in front of it so I suppose it's an indication it's it's a macro for each so you're basically generating these ioint fense statements right and basically it's almost like you iterate you like manually printed each individual fi of this thing and and and for each that is kind of bizarre honestly that is honestly a bizarre syntax uh in all fairness in all fairness what's if macro system if a macro system part of your language what's so difficult of doing something like this right what's so difficult of just like doing the why do you have why do you need to have this kind of thing I honestly don't understand like at the end of the day you have curly braces in here but not here so what what's the logic behind this right so why don't just like do that in here and that looks cleaner in my opinion it just looks cleaner looks cooler um it's not a scope ah but I mean it's kind of it's kind of obvious to me that what this Loop does it just generates like emits the Sprint fense statements so I personally would have not been confused by these C braces if they didn't really generate a scope and the generated code I don't know maybe there is some sort of like a deep reasoning behind doing it this way but I mean I'm like looking at this language at a surface level right so I didn't really know the Deep reasoning behind all these decisions but at the first glance as a first impression it kind of looks sus that's what I'm saying it's a cool concept don't get me wrong it's a pretty sexy macro stuff right so some sexy pretty macro stuff but at the surface level this kind of thing looks a bit sus that's what I would say it looks a bit sus it could have been like I think cleaner but whatever uh okay so compile time execution okay so through the macros you can just do compile time execution fair fair we already kind of see that so and again this one actually yeah so it's it follows the same sort of logic all of these compile time constructions they don't use curly braces interestingly hm so it's sort of like a reoccurring uh theme throughout the language right so you have a um runtime language and you have compile time language and compile time language is like it's syntactically distinct sort of speak maybe that's the point of this en St uh compile time touring completeness I mean that's a thing that you want to have actually so you want to have a compile time touring completeness um after decades and Decades of software development we software developers came to a conclusion that yes we want to have a full-fledged touring complete language at compile time we do want to have that but we need to do a lot of complicated at compile time so I see nothing wrong with that sorry I literally see nothing wrong with benefits are overwhelming yeah exactly so this is the reason why we have build build systems literally build systems are a symptom of us wanting to have a ter complete language at compile time so we're just looking for for Solutions yeah it's literally hack for to to having that um so if we just had languages that could do whatever you want at compile time maybe we would have never had such over complicated build systems right so which are basically stacks of generators on top of generators on top of generators on top of generators uh right so because at the end of of the day we just want to do some stuff with compon um yeah so okay generic modules o I forgot that this thing has modules and you can have this is some Camel type look at that some Camel type I can respect that so it's basically modules that are parameterized with some stuff and you can instantiate this modules okay fair fair fair uh Dynamic HS a little bit of a polymorphism a little bit of a polymorphism look at that so that means it it probably creates a v table or something right so you can have a okay so you can even explicitly say that this thing is dynamic uh right so yeah okay so interesting interesting interesting okay so we went through all of the ex prop to the creators um for this page this page is awesome honestly I really like that that they can just like basically have a tour of the language I just go through these examples I just scroll through them okay so and I'm having like a tour like through the through through the language very useful actually uh very useful so now I have a like rough idea what language is capable of uh without reading the entirety of the reference guide or anything it's just like yeah so you can do that you can do that that that that that right okay so so far so so good like I really like this language so far and how everything is organized and everything so they have if IQ maybe we can read if IQ uh what the most fundamental modules in a standard Library s De cor blah blah blah I'm not really interested in that how do string Works Define a native string type string which is a distinct Char because Char is essentially a PO plus length uh some care has to be taken to ensure that the pointer is properly managed okay so not really interested in any of that stuff so this is slies okay so that the examples were not uh the full sort of like um uh tour in here oh I reme I remember this it has builtin vectors it has built-in vectors so this is one of the reasons why I want you to do a review of this language right so it has these built-in type of vectors so you can say so it's a vector of two integers and what's interesting is that it has mathematical operations defined on them and you can do swizzling holy so essentially you can yeah you can do JL cell stuff basically in that language so yep that's pretty cool that's pretty cool so I I don't even need a vector type from goddamn R I don't even need that I don't need that that me uh So speaking of Ray lip right so we need to probably link with r how easy it is to link with RIP by the way how easy it is uh so yeah so save all that stuff save what the is going on so maybe I think my emex huh I think my emex is dying it just got stuck for whatever reason okay I'm inex uh so let me go to probe C3 probe okay oh yeah so I have some weird now because emx died okay so now what I want you to do I want you to take a look at this thing so uh link um so you can pass ahuh Linker built-in CC custom default custom requires a path link with the library provided so it does have some stuff for linking with libraries uh which is kind of cool all right so let me go ahead and just download R uh rayan uh com Ray 5 really so let's take a look at releases so we didn't have releases in this year of R uh linkoln ra let's go I just want to see how easy it it is to just do that right so I wonder if it is easy to just link with some C libraries uh right so I'm going to do W get and I'm going to just download this thing I should have actually done that with uh with the % so I can see you know the background job happening so there's also this sleap thingy right so I suppose this is the standard library and this is the stuff that we have in standard Library we have math we have LEP C uh by the way LEP C is going to be super useful for ffi stuff right so okay I already know how to forward declare R leap functions that was Actually I don't even need documentation so here it is so this is lip c. C3 so if I want it to have an external function this is how I would do that so it's an extern and then just like like this uh that's pretty cool so I'm going to use that as an example to do that um all right so here is the rip and let's just maybe unpack R okay good so this is what we have in here this is what we have uh and what I'm thinking is I want to do compile uh right so hello C3 and I'm going to say just link this entire stuff with uh maybe lib Ray lib uh a right so what does it say cannot process unnown option okay so it's probably is not done like this uh right we have to do it like that okay so that's cool so cannot find library lib a no such file or directory perfect right so it probably needs a path to where find all of that so let's provide the path the path is going to be here uh H that was interesting so it still couldn't find that so that path thingy was not particularly helpful that's interesting okay so but what if I don't provide the path like uh path separately what if I just say Okay link with this full path all right so it it worked so I didn't even need like a capital l i could just say link with that path and it will just link it with with this thing um all right so uh it probably completely eliminated dependency on really because we don't really use anything from that thing and I wonder if I can uh actually link with so dynamically can I link with so Dynam I can and the question is does it depend on anything from it doesn't depend on anything in here anyways so let's go ahead and maybe um you know try to initialize a window or something like that so can I say extern FN void um init window right so we're going to say init window and if I remember correctly if we take a look at the array Libs you know signature init window so the thing about the signature in here is that it accepts the pointer to character and it don't already know uh how to work with C strings in uh C3 but as already said we can actually look it up in the standard library of lip C we can just literally look it up so we can just provide the pointers uh so first of all um integers have to be C in like so so they have to be C in so what about the characters uh okay so gets so we can just say you can just leave it as it is all right so that should work actually that should already work uh okay and I wonder um if now I just call this entire thing init window uh 800 by 600 and hello from C3 will that just work okay so it doesn't work so what does it say um okay there is unexpectedly a type after the return type D mean dot the case probably has some sort of a meaning so probably capitalized name are types right remember the method stuff yeah so capitalize yeah brother brother okay so types let's read about the types as usual types are divided into basic tabes and user defined tabs blah blah blah all tabes are defin the global level naming all user Define types and C3 starts with the upper case go things yeah how you how do you plan to kill C with this kind of stuff how do you plan to kill C but I mean it's fine it's fine we can live with that so I suppose what that means that means we have to there should be syntax that allows us to specify the name of the symbol we're linking with there should be some sort of uh so let me see let me see let me see so I'm going to do init window and uh what is that symbol can I just say symbol uh no so they use add I feel like it's one of these add things right so you see add if oh oh oh this is a conditional compilation guys this is a conditional compilation so you create such declaration if it's not win 32 so you you think it's extern window right so you you think it's extern window but did you did you guess that or do you know that that's that's a real question so extern uh oh you you found that okay so fair enough fair enough so we can actually do it like this uh init window all right all right all right all right so you were right um okay so there's no such thing as const fair enough let's get rid of that and we successfully compiled we successfully compiled and if I take a look at ldd we actually link with r.o but I I don't want to like you know mess with like RADS or anything like that so I'm going to actually statically link with this entire thing I'm going to be statically linking with this entire thing and so the size of the executable is now 1.6 megabyte before it was below megabyte right so and if I try to run hello we just speedrun radi easy peasy dab dab that's a huge plus to language uh that it doesn't stay on my way too much in linking with c as I said in my a video right so if like any self-respect language should not stay on your way uh to link C libraries because that's where the useful code is right so it's pretty cool that you're trying to kill this unsafe language and stuff like that but a lot of useful code is written in C so if I need to link with C please don't stay in my way doing that and I appreciate that so it's already serious language this language takes itself seriously uh right so I can write some stuff in it so that's actually pretty cool um that's pretty cool so when I can just like continue doing this entire process right so continue doing this en process add uh more and more bindings and maybe write some sort of a game right so I can now close the window right so close window doesn't really accept anything in here uh right so let's just say close window close window uh okay so let's try to compile this I think compile seems to be compile cool uh and um so we can now do the other thing so Li see do we have booleans anywhere so there there's just the Boolean um yeah I suppose I can probably do extern FN bull um window should close and this is going to be extern uh extern window should close and the last things I want to Define in here is probably begin drawing begin drawing and end drawing so begin drawing and end drawing all right so then I can define something like this uh not window should close right while window should not close we're going to begin drawing and end drawing so it's very important to organize an event Loop and call these begin drawing and end drawing functions because they contain uh you know draining the event queue and also synchronizing the frames and also swapping the buffers right so you really want to call them on each individual uh iteration otherwise the event Loop is not going to work properly um so vny how really became his quintessential test bench for new language this is because I'm not really creative like what else can I do right so okay I'm presented with the language so how I'm going to test it I'm I'm going to test it on things that I usually do right so I usually use rip to draw things like can I do in this language I can't do R in this language useless useless all right so defer by the way this is a cool idea let's do defer yo look at that sh FR can your C do that can your stupid C do that I don't think so uh right so and the cool thing about rip is that it works with any language right so that's the power of simple languages like C That's The Power of simple languages like C right so you you can write some code and it will work in any language like we Haven not encounter encountered a language yet that would not support RA in one way or another uh because it's just a c code you can link with C code with in pretty much any language so anyways let's try to compile this and is it going to compile I think it is going to compile look at that and if I do hello look at that we've got hello from C window we get a window we already created the window and the window was closed successfully window was closed successfully because it called close window if I remove this thing will it say close window was closed successfully that's a very interesting question actually I'm really curious uh all right it didn't print window was was closed successfully he didn't print that so if I put theer in here and I just run it right so it will create a window I close the window it says window was closed successfully defer actually worked defer actually look at that that's super cool isn't it I think it's pretty cool uh all right so you can do R in this thing that's pretty cool but lately um lately defer and the only reason to do defer and drawing is so I can actually do the actual drawing somewhere here like after like no it's kind it's kind of too much honestly like guys it's too much I I can understand that for closed window but within the you know event loop it's it's it's too it's too much because this is supposed to be like a like a block uh you're supposed to treat it as like a block where you start drawing and then end drawing and so on and so forth right so I think deferring here is a little bit of Overkill um yeah pretty cool language pretty cool language but lately lately I've been working with uh web a lot I basically became a web developer right I lived long enough to see myself becoming a villain right so the question is can I use this thing in in web can I compile this mother flipper to wasm module let's say does it have a wasm support of some sort I wonder uh right so let's actually do c3c and does it mention wasm okay so it doesn't mention wasm anywhere in here disappointed but maybe it mentions something about the target uh so build Target is a current nah I don't mean this kind of Target I mean the compilation Target okay so uh let's say web C3 and for instance I want to create like an external function um that computes a sum right so let's actually say uh it's going to be a so it it has a list targets okay so we'll we'll call it but let me finish it first let me finish this thing first so I'm going to do something like this uh right so least targets can you Bingo Bingo okay so can I right right so comp uh Target um wasm 32 and let's say web assuming non postic environment no main function was found Compilation All the object files are generated I hope it's not going to speed out well okay so yeah it bared again it really barfed again uh so it says something like assuming non environment no main function was SP compilation only object files are generated so I feel like I have to explicitly say that I'm compiling like a module or something like that C3 bomed again yeah C3 bomb uh C3 bomb uh okay so let me let me see if what we can do in here no entry do not generate uh a main function so we can try to do that we can say okay no entry uh-huh linking is not supported for unknown OS okay that's fine mhm look I would like it to just generate like a static wasm module but I feel like it's not going to easily do that um right so maybe it Maps main to web assembly entry point but web assembly doesn't have an entry point that's the thing by itself unless it's some sort of a standard maybe wi has something statically okay so let me actually see what uh static lib has has to do in here so static libbe the word static so doesn't really okay statically compile files without a project into a static Library okay all right all right static lib maybe in this case I don't have to do that okay and it's just an archive it didn't give us anything per se I wouldn't say so it doesn't look like aam either doesn't look like aam either wasm I mean all right so let's take a look at other uh commands in here Dynamic lip compile round compile only all right so I'll put okay so let's give it a try so there was a output uh let me find output H there's there's only output de but maybe I have to do something like help uh output nah I didn't see an output uh all right so maybe there is some something related to wasm in the documentation I I specifically didn't want to use um you know documentation because I wanted to figure it out figure that out myself web assembly uh Dynamic lip yeah they have o okay all right so let's try um static clip and let's say the O is going to be web wasn't uhuh assuming web uh at wasm uh so why do you say at wasm that doesn't tell me anything honestly that doesn't tell me anything all right so do we have anything in lib STD lib or anything like that so I feel like what I need in here is just an example is just an example so maybe we can find some example in the official source code uh or was yeah that's funny actually that is rather funny not going to lie that is rather funny um so unfortunately just like with anything in web it is not obvious how to do that uh right so it is not obvious how to do that so maybe there's some tests uh so there's SRC simple example a simple example uh has um have a support Matrix H support Matrix okay so wasm so what is this native C3 compiler [Music] available no but what is that Target supported yes uh what and I don't really mention wasm that much and just wasm in documentation in here okay there is a wasm keyword I remember somebody in the chat talking about the wasm keyword but again just how do I use that how do I use that I don't know there is a keyword for this thing but there's no example how to use that so I don't know I don't know I don't know so uh I I'm clicking on search it doesn't it doesn't allow me to search again he plus documentation I have a feeling that wasm support is just generally not ready right so it's it's there to some extent like uh dude can you just work uh it's having a trouble to to do anything all right so yeah it's it's kind of there but it feels like a little bit experimental um you use it like extern but how do I compile it that that's the thing okay so cool I can do wasm but how do then I compile my thing how then I compile it I don't know um right so what I need is just an example uh right file wasm file and the command line that compiles it to wasm module as soon as I get a wasm module I can figure out what to do with it right so okay there is a wasm keyword but so what so what I can use it that next turn give me command line uh so see what I'm talking about it's not helpful it's not helpful chat be stop being unhelpful so yeah there's some stuff in here uh there's some yeah I suppose it's incomplete so there wasn't initialize uh yeah I couldn't figure out how to use that I I just straight up couldn't figure out so I can do compile uh I can try to do something like this by the way maybe if I so this is C3 let me try to compile it one more time so no main function was fine compilation let's give it a main function right so if it wants to have a main function let's just give it a main function uh right so here's your main function uh uhhuh and link is not supported for unknown OS um so maybe we have to specify then uh maybe we have to specify OS let me see OS well it's not it's not the OS I wanted um support for particular architecture plus OS Target okay how do I specify OS then um perhaps unknown unknown yeah probably um unnown Unown know but they said that uh probably just unknown yeah couldn't figure out literally couldn't figure out I tried I genuinely tried I'm going to assume that wasm support is just like not ready so it's it's just like not ready so we're going to put it aside we're not going to try to do that uh right so yeah I'm already streaming for 1 hour and I would like to maybe make a small break uh refill my water and stuff like that and then after the break we're going to try to maybe write something Game of Life well at least we can link with ra which is already something uh right so yeah we'll try to figure out what we can do so anyway um all right I'm back so let's actually clean up after the compiler right so I have no idea what the is all of that uh right so but let's just remove the object files and also remove all of that stuff so what we're going to do do boys and girls what we going to do so um let's try to clean maybe the background first of all right so we're going to do clear background uh and so get background clear background and uh so as a color by the way right so since it has such a great uh interrupt with C so that means I should be able to Define color as a structure right if I take a look at the red so clear background right so it is a color and we can take a look at the type Dev St well I mean I could just do color right how can I define this kind of structure also with an intent to do interrup uh with C so do you have a struct okay so this is kind of stuff we can do uh I wonder if there's a c u in uh u in c u i CC Char so there is a usz which is I suppose U size um but I don't see U maybe it's just Char it could be just Char um so let me open the documentation for C3 I already kind of closed the uh the website so let me open it again uh does it have a section for f c interoperability right I should have actually looked into this thing first um okay so there is a extern link in static Dynamic libraries and that's about it right so we don't really have that much stuff C3 cannot use C be fields we don't really need cbit Fields uh fixed interior size that means int and C in does not need to be this does not need to be the same uses fixed integer sizes uh okay I don't really know what that means so that means I can specify the size of this of the integer if I use it I'm really sure what that means right so but that's fine um so so this is a struct so this is a div result uh and do you have like a div function in C library what is Diva I never heard of such C function way the freaking there leap C has fractions I just learned something about just lip c not C3 or anything like that Le C has fractions did you guys know that computes the value of return holy I didn't know that I just learned that through exploring C3 just like what the what the uh anyways anyways anyways so here is we do D time I suppose time T is it's not really a structure unfortunately um so there is a C file but I suppose C file is an opaque type yeah it is an opaque type um I feel like I can just pass structures in there right anyways um I suppose what I want to do I want to just do stct Cola uh and if I take a look at the struction here so I suppose it's going to be Char R uh g b a and I wonder in terms of this structures um so struct uhhuh so I don't see structure so maybe it's something with the types can I have structure literals can I have structure literals uh I'm not quite sure so maybe there was something in examples yeah so so struct okay so I have struct types um and I can have n structs and stuff like that but it doesn't really tell me that much um same syntax see I had to ask in the Des Discord uh you can there AR okay so that's actually pretty cool all right all right all right so that means I can do clear background and I can just do something like are 255 and I I feel like it may not work exactly the way I expect it to work right so because um the characters are signed so I'm not sure if it's going to even compile properly um so this is not what I wanted I wanted to actually do um a r Li where is the r Li yeah here it is so let just do the r okay so that work that work exactly as as I expected okay so that's pretty cool um so we can okay so that was easy that was easier than I expected all right so how about uh heximal literals so can I do something like this uh can I do something like this so I can just do something like uh FF all right so and the background should be yeah so it's it's the same background as my editor uh 18 18 18 in in X so but as far as I know in R liip uh you have a special function get color that allows you to just do that so I could do something like uh get color all right so 80 8080 FF this is the kind of stuff I can do in here um so but color is unsigned integer which makes me wonder so this one returns a color by the way so I can just return a color but it accepts C in does it have CU it does in fact have CU in so it's it's called hex value so and then we can say uh extern extern uh get color so we can do stuff like that all right so we going to compile are you going to work are you going to twerk it is working it is twerking mate all right so we we need to draw something on the screen right so we need to draw the rectangle um so draw rectangle so we need this thing so we's just grab it we'll just grip it just grip it external I'm so sorry uh right so C int and yeah that's about it so we can do draw rectangle so writing bindings for this language is easier because it's almost C so you can just copy paste C declarations and just like you know uh Twi it a little bit and it's basically C3 basically C3 so uh extern extern so draw rectangle so we're going to do draw rectangle and let's just draw it let's just fuing draw it mate draw rectangle uh so position is going to be 0 0 width and height let's say maybe it's going to be 100 by 100 and the color is going to be maybe red let's use get color to to uh you know figure it out so we go um so is it going to work look at that look at that isn't that pogers isn't that wers so and to be fair like I want you to do Game of Life but I don't think Game of Life does the justice of this language one of the things I want you to test for this language specifically is the vectors so let's do something physics related right so where we need like a position vector and velocity vector and we can update it over time and stuff like that uh is it just hair well I mean it obviously fail falls into the same Nas hair um right whether it's you know the same as hair right I don't really know I think it's slightly different semantically and obviously syntactic so one of the advantage of this language I see is that some of the algorithms from C can be directly copy pasted in here and just like used without modifications which is cool right so this is one of the advantages that C++ has right and one of the reasons why C++ became popular uh right so you can just like you have C code base you have C code base and you can just use C+ plus compiler for the code base so and basically Z is trying to repeat this kind of success right but in a more annoying way um so yeah anyway um we have that so let's actually take a look at vectors uh right how do you do Vector types um I suppose yeah so we can just basically Define a position so let's go ahead and Define a position so this is going to be something like this so this is uh the postion right so this is basically the postion and uh it's going to be 0 0 can you actually spread that thing somehow you know what I mean you know what I mean this is basically our case look at that huh look at down look at that look but I'm not sure if it's if you can just like literally do that no I'm not going to use it like that so essentially it will be kind of cool if I could take the position right so take the position and just like sort of spread it like this uh so yeah and by the way it has to be flow thank you thank you so much all right so let me see yeah it's JavaScript damaged my brain I'm sorry so I suppose I can do things like this uh is it going to work uh it's not going to work look at that so how do I access the elements from this thing uh so this is the floats how a float okay float cannot be implicitly converted you must use cust how do you cast things in C3 do we have any professional three C3 developers in the chat Who develops in this language professionally how do you do casts uh we can actually search uh let's do cast uh integer to point a cast uh yeah so let just actually see is it like in in C um yeah it's probably like in C because it tries to mimic so let's let's give it a try I'm going to explicitly say C int and this is one going to be C in let's go all right this is going to comp it seems to be yo look at that okay so what I want to do I want to do float do uh velocity velocity and I'm going to just do 100 by 100 right and now before rendering this enti thing I want to do uh equals position plus velocity multipli by Delta time and Delta time is going to be uh basically get frame time get frame time so is it how it's called in r i don't quite remember get frame yeah it is it is basically that all right so let's put it in here so it's going to be external function get frame time uh I don't think I need that and then I'm going to grab this entire thing get frame time all right all right all right that is very cool feature I really like this Vector stuff I really love this Vector stuff I wonder by the way my friend if I can use the version the advanced version of the draw rectangle from r i draw a rectangle something like a V which accepts the Vector 2 and I wonder if uh the vectors of C3 are compatible with Vector 2 in here so because Vector 3 Vector 2 in here is just a structure so I think it's defined somewhere in Ray math uh is that language yeah it is a language feature right so it has a built-in Vector types um so on which you can do mathematical operations right so you just Define this kind of thing and you do multiplication and it just does componentwise multi multiplication automatically you don't have to overload operators or anything like that it's just like it's it's a feature of the language right so this is by the way one of the like probably primary thing that prompted me to at some point look into this language because this is something that I wanted uh in U in a native language like on the level of c and it implements a couple of like glsl things like swizzling for instance you can do this kind of automatically you don't have to Define anything or anything it's just like straight up swizzling from jail so this is pretty cool how did you discover this language any I think somebody posted it on Discord and I just looked briefly into this thing and it just like what the I really like this thing um is there a spe compile Target that's a good question let me see um so let's do this targets um nah there's no spirit that would be actually kind of cool so there's net PSD well I mean it's llvm right so it supports everything lvm supports basically um right to some extent okay so what do we have in here uh H okay so let me let me see um so I want you to use a more advanced version of draw rectangle that's what I want you to do more advanced thing because I feel like you should be able to just do that um uhhuh so extern FN and in here what I can do can I just do float too uh float yeah float to essentially um and if it's going to work at some point maybe I can use scholar as a vector which is going to be way cooler honestly uh all right so this is a draw vector v draw rectangle V I'm sorry I'm already a little bit tired turn draw uh Vector rectangle V there we go so and that will enable me to just pass this position without any casting or anything like that so in here I would have to do something like 100 100 and here is the get code if this will work that will be absolutely freaking pogers okay it doesn't really work type name was expected but given the variable something something something I don't get it what do you want for me I forgot to put a void in here that's understandable is it going to work dude no way you so that means I can actually use I can just say this kind I can just like use vectors all the way through okay so I can just use the vectors right so that means I can do FF uh well I mean it's not particularly convenient but I mean I can I can just use vectors um well I can say that get Coler returns a vector right so I can probably okay I can probably Define color to be uh like a vector character four or something like that at some point not right now but I mean at some point I will be able to do that so I can finally change all of these small structures into vectors on which I can do sort of like array operations um so okay so that means in here that means in here I can just swap them around and this thing is going to be green okay that's cool so and honestly uh what I can do right as I already said I can just say color right I can just say color and replace this thing with that is it going to come ah yeah some okay that's fine okay so you know what else can I can do I can do Vector 2 and this is going to be float two so I can just have ales for all of these things uh right so this is going to be Vector two this one is going to be Vector two so it looks a little bit closer to rip code but it uses nice stuff from C3 okay I can work with it I can work with it cool very very cool um so versions two did they say version down it's to all right what else can we do in here what else can we do in here we can maybe I don't know add a little bit of the let's just make it bounce around basically right so the usual thing so maybe we can uh make it start from I don't know from like a little bit away from the wall right and by the way if I remember correctly you can actually compile and run simultaneously yeah so here is the compile and run so I can don't have to run it like this I can just run it like this compile and run okay that's cool uh so now if I want to make it bounce around this stuff the way I usually do that is I update the components separately so in here it may become a little bit of a Nas to do um but that's probably fine uh that's probably fine so let's maybe make it a little bit faster first of all so and in here we're going to have a float new X which is position X Plus velocity X multip by DT right so you can just do that for the vectors uh and as far as I know you can even use R and R is an alas for x and I suppose maybe you can also access by IND this but I'm not sure about that so don't quote me that but you can do that since you can do swizzling right so that means you you should be able to do this kind of thing uh right so this is a NX and if uh NX right so we need to be aware of the size of the player how do you define constants how do you define constants right so there was a def right so def so Define death statements in three is intended for aling identifiers and types it's kind of interesting so I suppose it acts like um hash Define in C but actually normal if you know what I mean like actually part of the language not part of some sort of like weird preprocessor or anything like that uh so you can you know alas names oh there's also distinct types distinct in line to create generics times functions and variables oo it's a kind of weird thing so it's a definition it's a thing for defining aliases that's what it is or any kind of alas type alas value maybe value alas like name Alas and stuff like that that's what it is so the reason why I'm like focusing on that can I have something like player size which is basically just uh Define uh Define player size like this can I have something like that uh let's let's find out let's actually find out so I'm going to just comment it out and I'm going to try to run it so it didn't like that expected constant name in here mhm so it doesn't understand the type of this thing uh if I specify the type of this thing as a vector two will it well I mean obviously yeah it's not going to work like because the definition of the types you define first type and then the name right so first type and then name use const um you think const is going to work uh let's give it a try it's kind of it's kind of weird but I mean okay con works okay so it's like in C++ so you okay let me ask you you so you're right now sitting in there Discord and basically asking all of the questions that I have in here so you basically translating them my question so that was going on um H say hi to them no I'm not it's it's thing I found myself one doing the the same thing okay okay okay I see I see uh all right makes sense um okay so if this thing is less than zero or NX plus player size x uh is greater than the you know size of the window we can do like get screen width we can do get screen width in that case what we want to do we want to do velocity X multipied by minus one uh right otherwise otherwise we are committing that new X and then I'm going to replace um x with Y boom but I have to replace this thing so yeah get screen if I remember correctly get screen width returns an integer yeah it's an integer it's a c integer C in get screen uh with get screen with boom cre replace withd with height boom we are Gucci we are tamaguchi let's go b b easy all right so it's pretty cool uh and uh so the next thing I want to probably introduce here is the gravity right so that means I can do Vector 2 gravity and since it points down so that means X is going to be zero and in terms of down it is going to be uh usually like 1,000 works fine for me um so usually it works fine so first thing we need to do we need to modify the velocity so velocity is going to be I suppose plus gravity multipli by DT man like the fact that you just have built in vectors is so goddamn satisfying um so godamn satisfying make it change the color in that sounds like an interesting idea so yeah doesn't lose any energy right doesn't lose any energy so I think every time it collides with something right so we change the these things so we have to do maybe something like this so at some point it will lose enough energy right boom boom boom boom and now it's sliding right so we changing the color so that means we need to keep track of the color somehow right so this is going to be the color and uh the color that I do in here right the color that I do in here it's going to be this but then Rises the question how do we generate the color so I think the easiest thing to do in here would be to use HSV right so color from HSV so we're going to keep saturation and value the same but we're going to randomize the Hue so we're going to pick a random Hue essentially every time we we Collide or something um so first of all let me just pick a random stuff so saturation and value are the values from 0 to one so let's say that it's going to be super saturated and I suppose super bright so the her is available from 3 360 because it's in degrees I also need to have a random value so does C3 has a random number generator so let's actually use uh that thing so we can use it from lip C honestly So Random oh it has its own random okay so I can appreciate that um so you can specify the seed so you accept the random it's kind of a all of that is macros look at that we're looking at macros bra bra br br so we can just do Rand and okay so that's understandable so we can just do Rand and it's a maximum value okay all right so I think I can work with that chat I think I can work with that so I have to probably just like import some stuff so STD math right import STD math we also nice to maybe factor out all of the rip stuff into a separate thing right so maybe something like rip C3 but I don't know how to work with modules uh we have documentation for that so let me see so you can just do module 4 all right so I'm going to just like yolow it um so I created a separate file R C3 uh I suppose I have to put module R in here right I'm going to just try to maybe move all of this rap related stuff into that thing all right so I'm going to just try to do it like that and then I'm going to just import rap and I'm going to hope that maybe that's enough right so I'm going to hope that that's enough so maybe I have to also specify that some of these things look at that I never have to even specify that those things are public or private or anything something like that I really like that um also like honestly there's some annoying aspect of rust and other kind of similar languages is that by default they make all of the names within the module private so it is very unergonomic and I'm going to explain you why essentially you are writing some code you're just like streaming your Consciousness into the code and you write like a huge blob of code okay so now you want to split that code into separate modules you take chunks of this code put into separate modules but now this modules are so interconnected now you have to spend extra time putting Publix and all of these things and stuff like it it's so goddamn annoying so a feel like modules by default has to be always public right so I really had that about n 2 very annoying yeah so it's either they have to be all public or they have to do the J approach in J you I think you have like a scope file or something like that so let me actually find the G um right right right right so I think we can open just a random module and find yeah they have this kind of thing so essentially everything above the scope file is public everything below is private that's it it's that's it seriously it's the simple delimiter so essentially if you don't have a scope file right uh it's going to be all public but then you can add this delimiter and then you can like selectively pick okay make that private that private and that private and that private and it's almost like mechanical it's almost like mechanical and it's really convenient it's similar to C++ like private public and uh and and stuff like that yeah so I really like this approach like it's it's very ergonomic honestly uh right so you're just like you know talking it be kind like private stuff so anyway this is a much better approach uh now uh what we were're doing so this is a rib and uh Yu Yu Yu okay so and now if I try to build is it going to just work okay so it doesn't like uh HSV all right so so so for now I'm going to put it like that and uh I'm going to just say ff0000 Z FF uh right is it going compile okay so what do we have in here uh R could not be found that is concerning honestly that is concerning I wonder if I can say okay search for libraries like in here uh so and this is something that is extremely annoying you have a module rib in the same folder as the other module and it doesn't see that so so add to the compilation command that's a good point so maybe that's exactly what I have to do so just a second C3 and okay so that worked that actually worked uh but now oh it wants me to have like a prefixes for r hm interesting can I say import everything can I do stuff like that so uh by regular Lev case can I just do all right so here's the modules how can I import implicit import the module but [Music] also mhm implicit changeing default visibility oh this is actually kind of cool so I remember somebody asking the chat like isn't it annoying to do private all the time in here uh you can change the default visibility so you can just do this kind of stuff and they're private by default All The Strokes for all the folks right so if you if you're the r guy or girl who likes the private by default there you go here's here's your thing it's pretty cool it's pretty cool so how do I import everything from bu uh so import uh okay okay importing modules uh uh module sum so it always feels like maybe I just need to read that always import subm modules any module will automatically import all the other subm modules uh uhhuh so import Su some f not needed as it is sub module of sum I don't get it I don't get it are you telling me that I must use really prefix everywhere in here now that's what you're telling me brother that is kind of annoying so let me take a look at some of the examples maybe in here I want to just grab for different kinds of imports how do you import I honestly don't see any special syntax to import everything so then Li see yeah so the Imports in lip C and then they explicitly use I feel like this is a thing in the language right so you have to like prefix this [Music] so um I I wonder if there's something useing Nam space yeah exactly I wonder if there's something like using um let me see maybe there's something because that's a little bit annoying uh using place it Imports visibility does yeah already Works Tred star I already try it star so there is a section in the docs using functions and types from other modules uh using functions uh and see there is a section using function oh yeah that's what should say function from other modules it's not obvious name space required to avoid will always pick the current module name name space required serious it feels like they require you to do that uh as a rule as a rule functions macus constants variables and types in the same modules do not uh need any name space prefix for imput modules the foll hold functions macros constant and variables require at least the sub module name sad sad uh use build in wait I saw this thing I saw this thing in the in the standard Library just a second um bu in what does builtin do do do they even explain [Music] builtins Con avilable in a certain targets so I don't think it's a good idea right so I suppose there is a special exception for things that are sort of built in um so n I'm not going to do that right so it's it's an interesting idea but I'm not going to do that all right apparently it is a rule uh we have to literally prefix it can I at least like rename it as N I can't do that so because it's a little bit annoying I would like to maybe rename it um right okay so this is going to be rap uh rap rap okay okay okay okay uh r r but at least now Ray liip is not going to collide with win API or anything like that because that was the major problem with Ray and C uh that was the major problem with r b c okay so I didn't f finish all these things so window should close R okay so get screen R get screen R all right so a get color yeah get color is annoying but yeah it's not that annoying all right that was pretty cool uh and it kind of kind of stuck so what we want need to do we want need to have color from HSV so here's the color from HSV and in a r Li in here in a r b here I'm going to uh just Define it right so color from HSV so there is a c do I have to do c float I'm yeah so here I I just used float and it was totally fine so maybe in Li can I have floats yeah so you can just use floats uh external FN and it's supposed to return just a cola and this is just an external think um color from HSV color from HSV so now in hello uh I just do R liap um color from HSV right that's what I do uh and I need the random stuff so math random math random so I need to import actually something like this I need math random and the function that I want to do want to use actually is rather interesting um so it's um random Rand and I suppose there was just a Rand yeah there we go so it takes a maximum so that means I can do the following thing right uh I can just say the maximum is going to be 100 and then I can divide by 100 so this is how I get can get the value from 0 to one maybe there is a way to use okay [Music] so next float you have to to provide the random in here so that means you need to construct the random um so the ma macro random is there just like a default random so there is a interface random um so we provide the seed so they all except some sort of a random but they have no idea how to construct this thing um oh this is built in this is built in so that means I don't have to prefix this entire thing because it uses the cheating right it uses the cheating okay so let's just try to compile it I don't want to run it right away it compiles right so just like so this is what you you guys were talking about right so you put buil-in in here and you don't have to this is so bizarre honestly it it gives me like a Nim Vibes Nim is actually rid with this kind of undocumented magical things uh but this is because it's probably unfinished language right so it's understandable it's totally understandable um okay anyway so let's just try to run it uh just try to run it and see what it's going to do and it crashed very interesting actually so it's something with a ray leap um so I accepted the yeah illegal instruction holy H UB yeah so we finally got some UB stuff I wonder okay so what if I just like do it like that uh is it going to it's because of the random believe it or not it's because of the goddamn random so what if I put this thing in here um guys your random implementation using and nonexisting instructions maybe Rand needs a seat maybe um I don't know so seed but I mean uh I don't know I know again where do I get this the the random thing so you know what's cool about rip is that it has its own random um uh yep it just has its own random like didn't have to rely on vendors of the languages or anything that think you just use yep um um I don't know what exactly in correctly I did in here but um so this what it is and isn't what is get random value and in hello uh we can do ray leap uh get random value so from 0 to 100 divide by 100 and uh we can just try to run it there we go so it uses the random code and so I suppose I can now in line this whole thing like so so that is going to work uh so some probably see [Music] freaking freaking [Music] when it's sliding it's just constantly actually uh you know CH colliding basically so yeah uh okay so uh maybe we can actually have more of these things uh can we have more of these things how you do do you do arrays uh all right so here's arrays can you have Dynamic arrays so you just specify array size okay understandable pretty O type infert ah it's it's just infert okay so you can have slices can you extend slices uh conversion least okay understandable internals uh iteration okay well vectors is not what I is not C++ vectors oo iteration over arrays so [Music] oo looks familiar so we can just push some arrays and then you can you then iterate them how for each Works in this case so you may toate over slices array vectors using for each uh it is possible to enable for each for any time by implementing Len and uh brackets methods and annotating them using the operator attribute [Music] damn is there any generics right so you have the exat in here but um yeah uh so what is going on why people are pinging me so we need to ban somebody who needs to be banned mods mods b v per so I I don't understand who you guys are talking about ah it's it's that person okay let's actually ban them I see them boom okay you're welcome you're welcome so it's actually very convenient when people who needs to be banned say say that yeah I need to be banned it's very convenient thank you thank you so much um so I'm clicking ban but nothing is happening so you can just uh use the uh the slban command so as far as I know it just Works in web chat as well right so just like ban that person or somebody we want yeah we will Zoom um so it would be kind of nice to have some sort of generics or or whatnot but we can just use static arrays uh right so let's actually Define something like n so it's an integer and let's say we're going to have like a 10 of them but uh so we need to factor out this uh into a separate structure so let's call something like object right and it's going to be a vector so then velocity velocity and something like this uh so yeah and uh let's actually do something like object all right and uh I can probably do something like that uhhuh look that uhhuh so let's try to go to the compilation AR so yeah it's complaining about very much expected stuff so this is object um all right and then so it's going to be 28 POS where is the POS I didn't see POS for some reason but it's a object so also object maybe actually what I have to do is query replace qu replace position with object POS like this like this boom boom boom boom boom and by the way I'm pretty sure I can just do something something like this so yeah wait this is not yeah so this is not supposed to be here right so definitely definitely not supposed to be here so quer replace velocity with object velocity velocity boom not that one that one for sure not that one that one that one there we go cool and the same for the cors the same for the colors um so colors uh this is not that this is not that that that that all right so that's pretty cool all right look at that look at that Isn't that cool I think it's pretty cool okay so one of the things I want to do is probably um maybe randomize an object right uh object oh I can have methods in here can I brao I can have methods on here y so uh and it's it's like yeah you can you can just do a f uh object randomizer and yeah actually it's rather convenient I'm surprised how convenient is so going to be OBG so and can move all of that into randomization of the object so in terms of I suppose since it's a decent language right I don't have to do erors or anything like that I expect it to automatically D reference all of the structures yeah it is the case right doesn't have to do this kind of uh right so we can do it like that and so we can just set a random position uh but the question is like what kind of random position we're going to be doing in here um so let's say it's going to be get random value from Zer to it has to be get um screen with I suppose right so it has to be something like that get screen width uh R get random value zero get screen height uhhuh look at that so and in both of the cases it's also R yeah that's pretty cool so this is semicolon this is semic I'm not going to set random velocity yet uh we're going to set it at some point um um so I wonder can I just create an initialized object and just randomize it later is that something I can do let's find out I can perfect so that's actually super cool so that means now I can have a bunch of objects right so for example 10 so then I can do for each uh so object objects uh let me double check how you do for each right so you just yeah you specify the type uh can I actually specify that I'm you know referring them by a reference or by a point I think it should be able to so after that I can say randomize that is pretty ergonomic not going to lie I like what I'm seeing I really like what I'm seeing so if I try to now compile well I mean something didn't work okay so how do you do arrays uh how do you define arrays yeah so I suppose arrays the size of the array is part of the type understandable um right so what did object it's not possible to cast object okay um what else do we have in here um object oh yeah so now we have a completely different situation does it iterate them by reference so I'm not quite sure um let me take a look at the examples and in examples we had for each I do remember so for each Loop you have index and a value but is it by value I have a strange feeling that it's literally a value and trying to modify this thing is not going to do anything so we'll probably have to do this variant with the index right so we have to do this uh variant with the index so this is the velocity okay so let's do do for each object object objects right and we just like enclose this entire thing in here uh right and let's see if it's going to do anything like I expect it's not yeah it didn't do right because it's not iterated by reference which this is bizarre honestly so people say it has to be object but I mean you didn't specify the type you're giving me incorrect for each for each is supposed to have type in there or is it not I I don't know that is kind of bizarre so let me let me see so this is something like this oh okay that is cool thank you so much all right I really like that so also we probably have to limit this thing by the size of the player do we have a size of the player yeah so we have size of the player uh minus player size X and uh minus player size y uh all right so it doesn't really go outside so what's up with that uh ah I see so the player size well I mean it's not really in floats that's a bit annoying so I'm going to just cast it as like to C in but it's really wrong wrong uh it's really really wrong in here um so casting casting to C in is wrong it would be better to have an RNG that generates floats uh floats 0 to one in the first place so I'm going to put this is it to do which I will never probably finish right so but as a Noe to myself right so this is not what I supposed to do but it's just like whatever all right so we got those things and we're moving around as you can see it's pretty easy to scale the code right so I can now quite easily change the amount of objects what about 20 objects so now I can have 20 of this objects so it's easy to scale uhhuh so we can uh Factor these things so we can say something like uh cusion damp all right and we can maybe make it equal to one again um so we never lose any energy so they keep bump like jumping around never losing energy so that's pretty fun so um yep that is really fun so yeah it's a cool language I can see myself using this language it would be also kind of cool if wasm was easier right so but I suppose they're getting there right so the language is not finished so the wasm support is kind of M uh but they expect it to be better in the future so as for the language itself generally yeah I I can see myself using it I can see myself using it eight out of 10 good language good program again so yeah uh I guess that's it for today I'm already falling asleep unfortunately I'm already falling asleep so it's not going to stream for too long thanks everyone who's watching right now uh I really appreciate that have a good one and I see you all on the next Recreation programming session with who Mr Ain love you