The Weirdest Language I've Ever Seen (I kinda love it...)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
feels like there's a new programming language every couple weeks nowadays and it can be hard to keep up but the reality is we already have a bunch of languages that are great that we use every day nobody's really challenging the Norms with the languages we're using now everybody's busy trying to invent a new way to be way faster way better way more machine learning focused or all these other crazy niches no language is trying to challenge the way we actually think about languages certainly none of them are challenging it the same way dream bird is and I'm very excited to Deep dive with you guys on my new favorite language dreambird everything that has been done for this language is very interesting to say the least if you're already familiar dreambird is a theoretical language proposed by toad Pond there are people working on making interpreters for it I even plan on putting some money down in the Bounty for the first person to have a fully functioning one I just want to go through this with you guys because I have a feeling by the end of it you're going to love dreambird as well apparently there's a new update where dreambird supports Rich Text we'll dig into that in a bit but first dreambird is a perfect programming language these are its features when you finish reading through all the features you check out the example where better to start than exclamation marks everyone loves those in typescript right they definitely don't cause a lot of problems for us be bold end every statement with an exclamation mark does this not solve the semicolon drama forever just use exclamation marks instead who's going to be upset about that if you're feeling extra bold you can use even more if you're unsure that's okay you can put a question mark at the end of the line instead it prints debug info about the line to the console for you how nice is that instead of putting a comment saying I don't know what this does and then console logging trying to figure it out just put a question mark it's a for one very clear we don't use question marks very well in our programming languages usually but uh here it makes a lot of sense put it where you're not sure you may be wondering what dream bird uses for the not operator which is an exclamation mark in both languages that's simple the not operator is a semicolon instead yeah because we freed up the semicolon by using exclamation mark for the end of a line might as well use it here instead perfect sense I'm fully following thus far there are four types of declarations constant constants can't be changed in any way this one's going to be fun and this is how I originally ended up discovering this language because we've been battling a lot about constants and variables in JavaScript recently because our constants aren't really constant this is just such an obvious solution you say a constant is constant by defining the const as const if you have a const const it's a constant that can't be changed you can't change it or its reference obviously a constant variable can be edited but not reassigned so if you have a constant ve that means you can't change what name equals you can't set name equal to something else but you can make changes to the name itself so you can pop letters off of it variable constants can be reassigned but not edited so you can go ver const and reassign Luke to L but you can't modify Luke or L because it's a constant reference it's a variable pointing at that constant the variable is the thing referencing it though not the actual value itself makes perfect sense the reference is defined with the first word and the actual value that's been assigned is referenced by the second word makes perfect sense this is the equivalent of a star effectively in other languages like I don't know C++ all those things nobody actually uses dreambird clearly got it right but makes perfect sense sense if you want something to be editable and reassign it's a varvar duh obvious this all just makes sense so far it makes us kind of look bad as JavaScript devs because we got this so wrong and here we could have solved all of the conet drama Ryan Florence and I could have been best friends years ago all we needed was a second cost or a second ve obvious easy next section immutable data as a functional programming nerd is essential to me if I don't have a good way to do proper immutability I'm not happy thankfully not only do we have a good way we have a great way const const const mutable data is an anti pattern use the const const con keyword to make a constant constant constant its value will become constant and mutable and it will never change please be careful with this keyword though as it is very powerful and it will affect your users globally forever things are going to get way more fun with this idea of things being permanent once you see the timing stuff it gets very very interesting first we need to talk about naming though because importantly we can actually assign emojis as variables I've been asking for this for so long it's genuinely annoying that if I like hop my console here there upside down Smiley equals hello un invalid or unexpected token you cannot use emojis as variable names in JavaScript that is dumb and annoying and I wish it wasn't the case but if we just all moved to dreambird problem solved Emoji one is one and thumbs up being true perfect like we don't have to write true anymore you just use the thumbs up way more readable way more International this seems like the most International Language I've ever seen if you can just use emojis to describe things instead of words then it's ready for every language duh easy C cost 5 equals 4 that's great you can include numbers are also able to be used as constant assignments so when you set five to four you print 2 plus 2 equals 5 and it's true well duh you reassigned it every other language will do weird errors and have Strange Behaviors if you use an equals when you meant to do a comparison dreambird does the right thing it just reassigns the thing du obvious now let's talk about arrays cuz arrays are not usually obvious and we always bicker about where we start them zero indexing makes no sense nothing in the real world starts at zero most things start with one when I'm counting the people in my chat I can't count that high but when I'm counting my cats I count one then two why would I start with zero then I'm going to think I have one cat but I have two cats obviously starting with one makes sense there but if you're using something like C and you have zero users starting count us at zero makes a lot of sense especially to account for yourself because you might think you're a user but you're not but if you start at zero as the index and you're user zero there you go zero users but this is confusing we fight and bicker about this all the time in some places starting at one makes sense in some places starting at zero makes sense they decided to not be part of this fight and take their own path and with the most obvious solution negative one all array indexing starts at negative one and dreambird duh obvious anyways as of 2022 you can also use floats for indexes that's unironically a fun way to do inserts so you have this array with three items and since it's - 1 0 one inserting at 0.5 is going to be right in between these two so you end up with 3 2 4 5 obvious anyways when oh boy case you really need to vary a variable the when keyword lets you check a variable each time it mutates oh you even have signals sorry solid dream bird's going to put you out of business I know you put a lot of work into it Ryan but once the whole web moves over it's over for you now whenever Health hits zero it prints you lose I hate this is actually readable that this is not the worst thing like I can't even troll that would actually be a good Syntax for that dreambird has a built-in garbage collector lifetimes is going to be fun let let's okay let's be real there's no way it can be worse than rust dreambird has a built-in garbage collector that will automatically clean up unused variables however if you want to be extra careful you can specify a lifetime for the variable with a variety of units so when you define a variable you can pass it in these brackets how long you want this thing to last for if you just do a number it says how many lines so as the program has advanced two lines this variable will get cleaned up you can also specify an amount of time so if you put 20s now this variable will stay in memory for 20 seconds before it gets cleaned up duh obvious why does no other language have this you just say I want this to last for this long normally you have to manually clean it up or wait for the garbage collector to do its thing what if I just told the garbage collector hey in 20 seconds you can have this memory back I don't need it anymore this is how car rentals work why doesn't our code work the same way it's just obvious by default a variable will last until the end of the program but you can make it last in between program runs by specifying a longer lifetime again duh why do we have to build all these systems to load things into and out of memory if we're just assigning at the same place anyways Microsoft invented hibernation to Windows for a reason not just because Windows is slow to boot okay kind of because Windows is slow to boot but what if you could just put the variable back where it was by rebooting what if the language handled that assignment for you local storage is an anti- pattern you should be able to just assign variables and trust that the still be there when you need them again variable hoisting can be achieved with this neat trick specify a negative lifetime to make a variable exist before its creation and disappear after I was wondering what negatives would do obviously if we want to have access to this variable before we Define it just make it negative indexed in JavaScript our solutions to use ver or the function keywords but why do we have different keywords for these behaviors why not assign a different Behavior by Bing the variable that way duh negative indexing should never have been how you get to the end of the list should be how you go backwards let's talk about Loops shouldn't have much to say Loops are a complicated relic of archaic programming languages in dreambird there are no for Loops well Loops in general again duh Loops are such an anti- pattern when was the last time you actually needed a loop to solve a problem there's plenty of languages that said now we don't need them if I recall even Zig doesn't have a for Loop because there's nothing you can do in a for Loop that you couldn't just do in a while loop so if you have while which we saw earlier you're good yes their while is different but I'm sure if you're clever enough you could reimplement a for Loop using their while probably maybe anyways to install a dreambird to your command line first you have to install the dreambird installer to install the dreambird installer install the dreambird installer installer du this is how you install every Adobe program and look at how successful Adobe is with layers of installers seems to work for them why can't it work for our programming languages Brew sucks we all know that Google wouldn't even hire the guy who made Brew clearly the guy who made it has no idea what he's doing if Google's not going to hire him so install the installer problem solved apparently in 2022 they actually decided to address the complicated installation process by creating the create dreambird app app that installs everything for you why haven't we made an app for create T3 app we're missing out on opportunities here we also need to move create T3 app to dream birg because this is the future booleans booleans could be true false or maybe yeah isn't that how it is in JavaScript already willan could be true false or undefined which is effectively maybe good that they have a proper keyword for it though this like like everybody's racing to be the first quantum computer we haven't even figured out trary yet we're still so so stuck in binary that we haven't explored the world of three states instead of two I'm excited to see schinger binary perfect sense you have an event listener for key down true key up false then we have the is key down function if Keys key is undefined then we return maybe duh it'd be nice if undefined was just maybe in JavaScript if javascri was a real language and not this archaic then I should be able to Define undefined as equal to maybe but now undefined is just undefined come on JavaScript I reassigned undefined I can't even reassign numbers I can't even say four equals maybe on an invalid leftand assignment what if I say it's const for I probably have to spell const right no language can fix that for me no you're just not allowed to use a number as a variable definition come on so lame JavaScript sucks speaking of things that suck I suck at arithmetic so hopefully they've made this easier for me oh technical info on the Boolean first willion are stored as a 1 and a half bit value I will not elaborate further arithmetic dreambird has significant white space use spacing to specify the order of arithmetic operations why do we not think of this before pmass I want to see in chat who actually can get pmass right first time say all of the operands in order and if you get it wrong you need to use white space instead nah no one's doing it that's what I thought cuz none of you remember pmas none of you know the order of operations CU it's hard stack. push not a bad solution some people got it but the rest you suck at math I thought programmers had to be good at math oh we're JavaScript devs never mind my bad it got lost there I forgot that we write JS we don't actually write real code so we don't know math dreambird has significant white space use the spacing to specify the order of arithmetic operations so here since there's space between these things the two * 3 happens first and this happens later here since there's space with the 1 plus 2 and then the three after the multiplication happens after the addition duh think about how much easier to read this is than all the parentheses wrapping all these things it sucks it's awful but now solved just use spaces du if python has meaningful white spaces that are useless why not have some that are useful closures are great doing closures through Whit space makes no sense but if we're going to use Whit space for something it might as well be order of operations right what if you could use spaces in front of a line of code as like a go-to type thing where you move it above or below to change the order of things I think that makes a ton of sense too I'm getting ideas I might have to start contributing to the language dream bird also proudly supports fractions does that mean in dreambird we can solve the classic problem of the decimal comparisons would like to once again go to my terminal I have const a equals like 2 over 10 const b equal 2 over 10 does a + b equal 4 over 10 oh look at that javascript's fixed who would have thought I did not think that would work I really didn't I thought floating point was going to me here did I just get lucky if I roll that again will I get a different answer if I do like one out of 10 instead I'll do 2 out of 10 then uh C + D equal 3 out of 10 nope there we go because again JavaScript doesn't support fractions even worse it might mislead you into thinking it does for a bit and then you're right after we got but here with Native fractions we can actually compare things that are fractions kind of funny that no other language has this as far as I know everybody does floating point wrong but if you just keep it in a fraction form you're good assuming that the top and bottom number here are arbitrary Precision because it would be nice to have like a 64-bit like numerator and 32-bit divisor maybe you know the usual you can also use number names duh do you know how many Advent of code problems this would have made much easier especially if I could do like exec because they love stick sticking like the word for a number into the inputs if I could just have the language parse that for me and I don't have to write a crazy Rex for it no-brainer duh indents oh boy as I mentioned before other languages uses white space incorrectly I'm excited to see how we use whes space correctly here when it comes to indentation dreambird strikes a happy medium that can be enjoyed by everyone all indents must be three space is long here it is with the classic three space indent the right amount of space two and four wrong four is way too big two's slightly too small three just right obviously since we said three negative3 counts cuz it's still three we just put a minus in front of doesn't it's not three come on SO function main print dreambird is the future there we go only file encoding would represent this properly we're in a good spot though I think neg3 spaces is the right amount here equality JavaScript lets you do different levels of comparison double equals for loose comparisons and triple equals is for a more precise check dreambird takes this to another level you can use double equals for a loose check where the string and the value are the same triple equals we'll throw false here because you're actually checking to make sure the type's the same too but if you use four equals things get much more accurate and precise because Pi is equal to Pi but 3.14 also equal to 3.14 but is 3.14 equal to Pi no because we assigned this here this variable is not the same as this number that I just dumped here duh makes sense next question next section I should say functions we've gotten this far without talking about functions come on to declare a function you can use any letters from the word function as long as they're in order that solves so much drama every language has a different short hand for function sometimes they allow function but what if it's just Funk fun FN F no more argument about it I see chat's enjoying this one no cap I love this amazing funy Funk yeah I feel like we could write a good Babble plugin for this this feels very bable like incredibly Babble if you want to be much less precise you can use normal equal [Music] to sure sure I mean it makes sense it's true three is now equal to 3.14 because you just reassigned it remember we can reassign numbers to be different things because a number can just be a variable duh makes perfect sense back to functions though because the more I think about this the more I realize I don't actually hate it it's ter terrible and cursed but there there's something deep within me that wants this to be real and I can't get over that part of me I yeah I'm going to be thinking about this particular part for too long if the order is different in in different language will that work too or does it have to be English function because it' be nice if I could internationalize my code dividing by zero dividing by zero returns undefined yeah Fair Nan it's not like not a number is not descriptive enough undefined is the right thing here I'm assuming this is the only use of undefined oh we have an undefined here oh because we're using JavaScript events so when it comes from JavaScript it can be undefined but when we're using a real language like dreambird undefined is only for dividing by zero makes perfect sense you can have a function named fun which is basically the same thing as a variable functions are like variables but better because they're even harder to mutate wait are functions mutable can I reassign a function it's an important question I can't reassign a function might have to reconsider can I do ver Funk these are important yeah obviously a con cons function can't be reassigned we've established that constant function duh but is a function by default a constant or is it a variable and can I override it as a variable I think these are all important open questions that we need to figure out sooner than later if we want to really push this language to its limits speaking of pushing things to their limits let's talk about strings because as we all know JavaScript is the best language for dealing with strings by a lot like we put brain to shame with the weird things we can do with our strings strings can be declared with single quotes or double quotes duh what else are you going to use those for you could also declare them with triple quotes Okay we're getting into markdown territory I like where we're going in fact you can use any number of quotes that you want why would you tell your developers how many quotes they can or can't use obviously you should let them decide even zero no negative quotes though disappointing but at least you can use zero think about how much code this would solve think about the like chaotic effort that was put in to support be words in Ruby you haven't already seen the what software talk on Destroy All software this is legendary it's not on YouTube so I don't want to be the one to react to it and put it on YouTube but if you haven't already seen this it's incredible and part of what was adding bare words to Ruby by adding globals that reassigned white space to assume a variable definition we need to go deeper in strings please remember to use your Regional currency when interpolating strings very important why do we use dollar sign if you're not spending dollars less than a third of my audience is us-based and while yes the world runs around USD your code shouldn't have to as well enough things that are stuck in USD how did the crypto world not beat us to this you should have to use the Bitcoin logo if you're writing cryptocurrency duh this just it's obvious why do we do this wrong and also you have to follow your local typographical Norms again duh you're not going to put the this is Euro right I'm very American pilled okay you're not going to put that in the front so just move it to the back duh see I do know my currencies Europeans keep watching my videos and hit the Subscribe button if you haven't it's free it's directly below give it a shot anyways the symbol for the Cape vidiian escuto is placed in the decimal separator position as in $250 developers from the Republican of Cape Verde can benefit from the syntax how nice is that you just put the dollar sign in the middle duh obviously our dollar sign is really dollars what else would the r stand for all their money is fake R dollars real dollars du next question types obviously this is the best language it has to be typed no great language is untyped except for go and c and brain and JavaScript and Ruby and elixir and every other language I love honestly but regardless your language should have types con age int is 28 also not it's a conve so we can't set this to something else later but we can modify we can do minus plus and change what the value is by changing it we can mutate it but we can't reassign it obviously this is how it always should have worked by the way strings are just arrays of characters so a string is equal to a character array typescript doesn't even get this one right similarly integers are just arrays of digits du why would we treat this otherwise it's an integer if it was floating point then it would be a digit array with the ability to have one point in it and that's a nasty Rex so you can just divide if you really need a float deal with that later don't not in your type system everybody doing numbers in their types is screwing up in case you want to use binary representation for integers in9 and99 types are also available duh type annotations don't do anything but they help some people to feel more comfortable no notes I'll take the L if you're going to attack me like this you should at least like say sorry Theo but uh it is what it is types scripts imaginary and that's fine we all accept it let's go into the only thing that is more imaginary than types Rex you can use the regular expression type to narrow string values wait I thought you said the types are useless oh yeah types don't do anything Rex are types lines up consc email and the type is a Rex the choice to make this one line so you have to scroll is this the actual email Rex I there's only one way to know for sure right paste grab the contents of this hop over to chat GPT I think this is a Rex what does it do why did it cross itself out according to chat it's not valid because it's far too short uh yeah validating URLs and emails via Rex is notoriously cursed markdown rendering yeah markdown is why this is breaking checks out of course chat GPT does markdown any anyways to avoid confusion you can use any spelling that you want such as Rex regular expression and rexp yeah again just like function why would we fight over these things when we can just support all of them du for Simplicity all supported regular Expressions match the regular expression I I'm beginning to see why building it interpr interpretor for this is difficult previous why do more languages not have a previous keyword why do we have to solve this by using weird things like negative 1 just let us say previous the previous keyword lets you see into the past use it to get the previous value of a variable so if you reassign score or change score and you call previous score now you have the old value okay but unironically like elixir kind of does this I Elixir is fully immutable and in a true immutable language this is actually kind of useful the hilarious stupid not the worst thing I've seen I would actually possibly use this we've invented so many ways to do this in the past what if it was just part of the language why do we have to assign the variable or keep track of the variable or keep a pointer to the old value when we just could do this duh react does it by the way oh oh boy similarly the next keyword lets you see into the future so if I call await next score since it's next we have to wait for the result to come in because it's not the future yet if this language could predict the future that's the only way I could see it being better than it currently is but since it needs to wait until the next thing happens you just await the next thing duh this this is like signals but normal people can understand it like if I got locked in a room with my mother and I had to explain to her signals and it once she understands signals we can leave we would be inventing a lot of doors and not leaving a lot of rooms but if I could just tell her use the word next and then you have the next value we'd get out of that room really quick into a much bigger scarier one anyways additionally the current keyword lets you see into the present I'm assuming every time you're accessing a variable you have to use current right right makes perfect sense now you always know when you're accessing a variable versus doing something to it as well it makes the compiler way smarter it makes you way clearer too in your code review this code is so reviewable I'm basically doing a code rview right now and I feel like I've been writing the language my whole life file structure write five or more equals in order to start a new file this removes the need for multiple files or any build process we're now fully aligned with the Dan abov way of thinking this is a website that I believe Dan a Vader is inspired by him react file structure. surge.sh because everybody always bickers about how you split up your files how do you organize your files where should things go why do we care the compiler doesn't care about which files are where the compiler just cares that it can make an output that runs why do we care instead and Dan tweeted a while back on his private alt Dan abramov no one knows about that one anymore obviously think beginners don't know how hard anything feels and want a guideline for where to start so they can focus on harder Concepts and faster and the example they have here there then a beginner react Dev eight months ago looking at these weird articles about how to structure your react apps it's a guideline though it means literally start by putting everything in one file when it feels like it's annoying start splitting them up and when that gets annoying maybe add some folders duh this is just how it should always work and it seems like dreambird is the first language to embrace that by letting you split your files up inside of one file instead of the file ending when the files like end a file hits hit the file ends when you have a bunch of equals duh everything should do this obviously it removes the need for multiple build files or even a build process yeah if you just have one file why would you build all those no build JavaScript people must be seed is they realize how easy life could have been if we just use equal signs instead of new files new for 2022 oh boy thanks to recent advances in technology you can even give names to these files by putting them in the middle of the equals easy so simple why would I ever keep making a bunch of files if I could just command F in one file if I have to go across files I have to do command shift F instead that's so much more work that's a whole additional key I have to like maneuver my hand around the keyboard in order to search multiple files at once if I just command F it's way easier to click du obvious next question exporting many languages allow you to import things from specific files in dreambird importing is simpler instead you export to a specific file duh why is it that you can make a file that exports something and now you have no idea who's importing it we've built a lot of tools to try and figure it out but do we ever really know do we ever have 100% confidence that this thing is only being used here and isn't being used other places what if the file could export to the right place no more weird import logic at the top of our files no more Giant piles of this is importing 500 things before you can read the code the code starts at the top every file in dreambird immediately goes straight into the logic and you only carry about the exports once you get to the bottom in a Javascript file you have all your Imports up top and you don't get to the logic until you've gone through hundreds thousands tens of thousands of imports have you seen how many libraries these people are installing just export instead makes perfect sense duh might be annoying to like go to every project that is making a package that you use and having to go in and like file a saying hey I'm going use this now and add the export to your project to their project so you can have it but at least now every maintainer knows exactly who is using their project because all of the people using your project are exports at the bottom of the file Easy by the way if you want to see dreambird and action check out this page is this the examples page oh it's the license oh boy the license is the hidden examples page I'm excited to dive into that but we got more to read first classes every real language has classes this is why C is imaginary because C doesn't have classes not a real language we had to add one to C we had to make d otherwise known as C++ in order to add classes to C before then we didn't have classes language was classless and a classless language not a real language you can make classes but only ever make one instance of them this shouldn't affect how most objectoriented programmers work fair fair people don't really Define classes to make multiple of a thing unless they're a Game Dev and if you're a Game Dev you're a classless you're degenerate you're making video games for a living come on grow up what are you five who plays video games nowadays we got more important things to to do like complain on Twitter about video games class player brackets obviously to indicate closure sane normal everyone expects it we can set const V health is 10 so now it's constant so you can't reassign the health value in this but you can increment it and do things with it then you can Define player one and player two but you can't have more than one player instance duh you only defined one class if you want more classes Define them or you can put a function make player in order to define a new player class because you're using player maker now to make classes so player maker is a function that generates and returns a player class it makes a new player class and it makes a new instance of it and returns it because if you could have more than one instance of a class that just gets confusing that makes things way harder to follow and understand so duh just make a maker in order to make the classes easy now you can Define the player maker obviously is a con cons you don't want to treat your makers as variables your generators should always be immutable du basic functional programming but con ver player one now we can use the player maker to make new players and since it's making a new class every time we're good to go if you're curious how the actor model works it's nothing like this but I'm going to say it is because then your brain will never want to learn the actor model which is probably better for everyone involved let's go to time use date. now to get the current date and time if only JavaScript was that simple but we can also set the time very important how often have you run into your clock being slightly wrong and you're like trying to fetch data from something but since the clocks aren't perfectly synced you're what if my server is in one region and you're in a different region what if I can just set your time differently so we're in sync problem solved Apple basically solved this with their crazy atomic time stuff where where your phone gets a specific signature from Google stuff and then they have a super accurate atomic clock keeping track of time so all Apple devices that are somewhat modern running Apple silicon are perfectly synced like by like less than like a few nanc now we can manually do that in our own code accurate time is no longer an apple exclusive feature now it's an apple and dreambird exclusive feature it's also important to remember to do this when the clocks change yeah it's like obviously Daylight Savings Time sucks if you haven't already seen computer file video uh yeah the problem with time and time zones by computer file if you're not already familiar with how miserable it is doing time zone stuff this video is 10 years old and it's only gotten more relevant that said if you knew dream bird could have been much easier code examples but if it is wrong you can delete it so let's talk about deletions to avoid confusion the delete statement only works with primitive values like numbers strings and booleans so we delete three we get errors when we try and use the number three obviously like why would you be able to delete a number and then use it again H in JavaScript you can delete things and still access them which is stupid you should get an error if you try to access something that you've deleted finally a language gets it right dream Bird's also a multi- paradigm programming language which means that you can delete the keywords and paradigms you don't like perfect I was concerned that I might get stuck with people adding useless classes in our code base but if I just delete class problem solved wait can I delete the function definitions that I don't like like if I don't like Funk or I don't like fun can I do delete fun essential the delete key word was contributed by Dan abramof perfect he gets it is Dan actually a contributor on this I need to see the contributors I haven't checked this and I'm scared this has so many contributors this is more contributors than most languages why would anybody ever doubt the potential for success here yeah holy I thought that was a troll propos I just assumed that I was getting trolled holy see the proposal lgtm if anybody is somehow not familiar with Dan abramov he's well known for being the creator of react and also the inventor of react so uh clearly he knows what he's talking about obviously he knows how to do dels because every react developer has wished they could delete the framework from existence so very familiar dream Bird's a multi Paradigm programming language which means that you can delete the keywords and paradigms you don't like yep as I said before makes perfect sense and when Perfection is achieved and there is nothing left to delete you can also do this obviously you can delete delete easy overloading yes why do so few programming languages do overloading properly if you're not familiar Elixir overloading is beautiful you can redefine the same function multiple times and then you can match as a pattern in like the functions arguments what you expect and it goes through one after another figuring out which function matches what you pass to it let's see how overloading works in the best language though dreambird you can overload variables the most recently defined variable gets used c c name equals Luke con name equals L print name L easy how annoying is it in JavaScript when you try to define something but it's already been defined problem solved just call it again just order of events duh I will say I'm disappointed like we've been thinking too much about top down execution in our code and specifically also left right why don't we right to left or maybe bottom to top like looking to the top of my monitor sucks it's so high up and I have the little extra space on the bottom cuz of my dock on Windows and on Mac if you just read from the bottom up it's a lot easier to read that way maybe another language you consider that or maybe a Plugin or extension for us to do bottom up and right to left because we need to challenge these conventions more con name is l con name is Luke con name Lou or Luke either is fine oh obviously more exclamation points it's just this is just important like important in CSS is the only reason CSS is usable we've all had a time where we wanted to make something work and it wasn't working because CSS load order makes no sense so it Ed important to get something there what if you need something else later something else after that important is essential in CSS but we don't have an equivalent in other languages what if we want to have that here what if we have conditions and we want to within that condition make sure the variable comes out correct duh just keep track of how many exclamation points there are and whichever one has the most that gets hit wins duh In The Same Spirit you can use an inverted exclamation point for negative priority duh like like why do we not use upside down exclamation point in more languages this just makes so much sense yeah this is z indexing in CSS this is like Z indexing for your variable definitions like who doesn't want to be able to zindex their variables everybody's done mutability wrong this is like a mutability with logic around it it's like mutability but better Easy semantic naming dream bird supports semantic naming obviously s name is Lou I age is 29 be happy is true I'm certainly feeling happy because I'm reading about the best language I've ever read what the is cons const you're you're quite behind man we're just in we're just in normal times nowadays you're you're in the past in new for 2023 we can also make globals by putting G underscore in the front easy this all just makes obvious sense when you've defined in the name what the thing is it should just do the thing why do we have to add types if the name describes it like why in this can I do const sum string number equals one come on the language should be smarter than this if I say it's a string why am I making it a number how can anyone take typescript seriously it's entirely imaginary this does nothing like I said it's a string what's up useless stupid dumb language we got to put in the variable name and just take it from there we're making everything way harder than we should we even have more characters like why do we have all these extra characters the info we need is in the name if the variable name has string in it why do I have to tell typescript whether or not it's a string anyways reversing you can reverse the direction of your code oh perfect I was saying that we should have this it's built into the language already you can just put reverse at the bottom of the code and now it runs the other way duh duh I wish I knew that earlier because I would have been reading all this code the other way I pre-ad yeah clearly I just know all these features or maybe this language is intuitive so we can get guess what it's going to do because the language isn't doing a bunch of weird arbitrary that has been added to it over 30 years originally starting as a project somebody hacked together in a week sorry python that was a good joke anyways reversing just makes obvious sense I guessed I didn't guess I asked for because I assumed like most languages it's not going to do the obvious thing but duh obvious if it's an obvious thing that makes our lives obviously better dream Birds got us covered speaking of things that are obvious we need to talk about class name for maximum compatibility with other languages you can also use the class name keyword when making classes again Dan aov the creator of react made the terrible decision that when we write jsx we can't use class in the definitions in our like sorry uh I have to say attribute or everybody will get mad in my comment section let me do a quick thing actually CU I I've been looking for a good video for this side rant and I can't imagine a better one than this and at least once a day at this point when are you going to pronounce a tribute correctly Theo uh it's going to be all the const ones yeah respectfully please pronounce attribute correctly you're mixing up the noun and verb pronunciations you have a very wide reach and it'll be great to demonstrate the correct usage you're pronouncing it the wrong oh that's sequel uh I love Theo's videos but damn he really needs to learn the difference between attribute and attribute they are not pronounced the same it bothers me so much more than it should just so you guys know I'm going to be going out of my way to use the wrong one every single time going forward so so to be sure the correct one is attribute is the verb and attributes the noun right because if so we're going backwards anyways pronunciation is key obviously I pronounce everything correctly because I'm a popular YouTuber do you see how many subscribers I have yet you're still not one of them just click the button it's free but if I have 280,000 subscribers like I do right now I can't pronounce anything wrong my pronunciation is Canon now unless somebody with more subscribers pronounces it differently so if like primogen comes out and pronounces it a tribute then it's now a tribute but until he does that it's a tribute I'm sorry I don't make the rules I just have the subscribers anyways we need to talk about class things that's what we're here for for maximum compatibility with other languages you can also use class name again same way Dan M did reusing class inside of your jsx is an attribute a tribute whichever you will feel like today having classes in a tribute was not syntactically correct within JavaScript parsers so instead it is now class name because duh obviously class name just lets you skip that and not to worry about the parser thinking class name is class and then if you accidentally deleted class or intentionally deleted it because you want to not have the class keyword in your codebase you don't want classes we're not o nerds here we're actual programmers writing code nobody uses so obviously we don't want classes those are for shipping not for talking and we're just here to talk about code if we're talking about code we need to make sure things are readable and parsable because our code doesn't compile it's a little bit harder to talk about as such class name was the solution Dan abou chose since then we have stopped using classes in JavaScript like let's be real when's the last time you used a class in JS have you ever like who uses classes none of us do I bet if I search the code on GitHub right now if I go through source there won't be a single class in the JavaScript Source I'm not going to do that because nobody actually reads code anymore but if I did I'm sure I'd be right as such class name doesn't really need to be there anymore because when we talk about classes and react obviously we're talking about our attributes because why would we be talking about classes in react it's not like we ever had class components or something they're functional components come on SO class name being used for classes here makes perfect sense because we use class name for class in react now we can use class name for classes here everything is simpler now in response to some recent criticism about the design decision we would like to remind you this is part of the JavaScript specification and therefore it is out of our control yeah checks out dbx you can embed the dbx in dreambird it is just dreambird and it's also just HTML good good stuff if your language doesn't have full support for HTML then it's not a real language it's not web scale this is like web scale for real developers cuz obviously nobody's actually got users none of us do what's a user we don't know what those are I just have viewers so dbx lets us take the benefits that usually people with users have like HTML and embed it into our applications what's the HTML equivalent of web scale the thing that like HTM X react and all these things are where you can just write your HTML code inside of your other code we need a term for that that's the equivalent of web scale it's like web first web ready web dream we'll go with web dream and obviously dream bird is going to be web dream compatible it's also just dreambird and also just HTML because both dream bird and HTML are OB obviously interwoven and fully compliant nobody's ever written an HTML file that isn't dreambird compliant code 93% of paint splatters are valid Pearl programs 100% of them are valid dreambird programs duh the only way it wouldn't be is if you put a delete in the wrong place so if you just add delete delete at the start of the code you're good no problems but yeah if you splatter paint on random things and then you ask a text interpreter to try and figure out what the text is in the paint splatters and then you run that code through Pearl it works because Pearl is a real language and can interpret real inputs unlike every other language so yeah 93% of paint splatters are valid Pearl 100% are valid dreambird makes the obvious logical sense it does important warning here though as you know class is already a keyword in dreambird so you can't use it within dbx so you can't use class equals just like react keeping us in our familiarity here but also class names A Dream bird keyword as we established before you can use class name instead of class for intercompatibility but that means class name is taken so we need to use HTML class name again duh this is obviously the right attribute just makes perfect sense please note unlike jsx you are free to freely use the four attribute because in dreambird there are no Loops perfect language I'm telling you this just makes so much sense once the last time you actually needed to write a for Loop that couldn't have been a better thing like an if statement a while loop or code nobody was actually going to execute anyways duh fun app I love that every time you define a function you use like a different abbreviation for for each section it's great really highlighting the value of this language fun app return label input ID's name it's so nice you can just use for I was wri in forms a few days ago and yeah nope you don't even need a fragment great Point yeah if you're not familiar with this in react you can only return one node so this is technically two nodes in an array so you'd have to wrap this either with a div or some random element or with a fragment which is just empty brackets you don't have to here because it's a real language that actually understands how we build things on the web duh speaking of how we actually build things we need to talk about rich text no poor text here screw you guys in your utf8 boring ass html text files we're rendering Rich Text here we're real Ballers out here dreambird now supports Rich Text KC's name is Luke KC name bold or italics even better I thought this was going to be at parse's Rich Text no you can write your code in Rich Text you there's no such thing as bold in any other language I'm here I'm pressing command B and all that does is opening closes my correctly placed right side knv there's no way for me to bold things in this language like what how can I really not bold a string in my code who would ever think that was a good idea this just makes obvious sense what happens if I copy paste this over yeah we just lose the formatting what a joke Rich Text could be helpful when making your website also of note bold name is a different variable than italic name because obviously these are different strings duh obviously these are different things and these aren't equal but you could assign bold name to italics name and you're good but it's a const con so you can't reassign it if it was a ver const you'd be good we've established all these things already I shouldn't be repeating myself you guys understand how the language works it's obvious but you can even use this in your dbx because you can use it to add links here's a link that hopefully isn't something I don't want to go to welcome to dreambert for the Integrity of our open source Integrity we don't have a landing page please read more in or GitHub repo REO with capital r&p or click here to try out the dreambird Vision Pro oh no do I let it have access to my camera am I going to regret this allow I'm scared there's my light oh no not audio I can't have audio playing I have my headphones on it do I do it anyways I'll put on the headphones I have no idea what I'm in for this better not be more copyright and music I'm gonna be mad oh this is screens and screens this is the one that was inspired by the other video beautiful proper augmented reality you see if the Vision Pro just shipped with this would' be good but the Vision Pro is not a real product so it didn't ship with a real app like dreambird spatial compute duh duh this all just makes obvious sense I don't why no nobody else is doing this even Apple like come on clearly Apple made the wrong language with pickle and they should have been using dreambird I'm sure this would make a great config language too you just delete all of the things that are variable and you can only do configs anymore if you delete ve you're good like imagine how much easier life would be if in our JavaScript codee we could just delete let or delete V too now we're good now we only can use const problem solved right or if you're Ryan Flores and you have your own opinions delete const now everything has to be there or let duh just makes perfect sense asynchronous functions in most languages it is hard to get asynchronous functions to synchronize with each other in dreambird it's easy asynchronous functions take turns running lines of [Music] code like think about how much time we've spent trying to understand the event loop I reference this talk all of the time what the heck is the event Loop anyways this is a phenomenal talk I recommend if you are stuck writing a terrible language like JavaScript that you watch this at least once a year to see how much better you understand it over time I know even when I was deep in JS this talk after years of watching it again and again always felt like I understood a little bit more but what if we didn't have to what if the async behavior was just every other line you didn't have to learn this crazy Q you can just count I can count I can count all the way to 10 like at least possibly even further if I really push myself but here I don't even have to count that far I only count to three easy print one call count and since we're calling count here and it's async it's going to do the first thing and then I can execute another line and then it'll execute the next line after so one then two then three du you can also use the noop keyword to wait for longer before taking your turn again du 1 2 noop 3 4 this is so simple I you don't have to like have a degree in software or math you can just count note in the program above the computer interprets the noop as a string and its sole purpose is to take up an extra line you can use any string you want easy signals remember earlier when I said we have when that's most of we need signals anyways but let's see how they do it cuz if they have their own signals protocols it's probably going to be good CU everything else here is perfect to use a signal you use use I can't make the react joke because use doesn't work in react yet it I've never seen someone successfully use the use keyword yeah anyways hopefully it works here because this looks cool so we have ver score is used zero when it comes to signals the most important thing to discuss is the syntax yeah cuz nobody's like who's actually shipping signals none of us are so we don't care about anything in other than the syntax because we're not using it so we're just going to bicker about syntax until everyone stops listening and they go back to writing things with demos or having a compiler do it for them in the time we have spent trying to figure out the right Syntax for a signal standard react team was able to build a compiler that makes output that is almost as fast as signals it took them less time to make a compiler for react than it took us to agree on a syntax for signals so I'm happy someone's appreciating that embracing it and giving us the right syntax in dreambird you can set and get signals with just one function duh if you call it with no arguments then you now have the value and if you call it with an argument you just set it easy why do we have Getters and Setters you just pass the function something and now it's a Setter and if you don't it's a getter easy in dreambird you can set and get signals with just one function yep we get the idea alternatively you could be more explicit with your signal syntax by splitting it into a getter and Setter so you can make your own again if you really want to do it the react way which is the wrong way there you go you do it right there get score set score use zero now you have a separate getter and setter technical info this is pure syntax sugar the split signal functions are exactly the same as before so you can call get score with a number to set you call set score without one to print the value this means that you can carry on splitting as much as you'd like what is this a dependency array and a use effect if you really miss use effect you can reimplement the best parts I guess and it's not a complete language if we don't talk about Ai and of course dream bird is going to talk a lot about it dreambird features aemi which stands for automatic exclamation mark insertion if you forget to end a statement with an exclamation mark dreambird will helpfully insert one for you who needs prettier we're only using it for like endline stuff language does it for us this is fine see easy similarly dreambird also features a bi which stands for automatic bracket insertion you forget to close your brackets dreambird will pop some in for you this is also fine yeah like like this is the most co-pilot friendly thing I've ever seen I don't use co-pilot anymore because I'm too poor I use super Maven even though it also costs money super Maven is pretty good about end lines but if you're a real person working on real code you're probably using real Microsoft infrastructure cuz obviously which means you're using co-pilot and sadly the parenthesis and the endline stuff are all going to get randomly forgotten when you're using it but here you don't have to worry about it brackets parenthesis semicolon sorry not semicolons those are used differently exclamation points all of that is just infert you no longer have to worry about co-pilot trimming off the end of your function or your closure language has You cover this is the first language I've ever seen that feels perfectly engineered for co-pilot in AI easy similarly dreambird also features a qmi which stands for automatic quotation mark insertion if you're ready to close your string dreambird will do that for you as well how many times have you accidentally left a string open and now your all your syntax is highlighting weird you have no idea what's going on problem solved this can also be very helpful in callback hell situations so if you're nested deeply enough whatever you can just do these things like like this is totally valid code in dreambird don't have to worry about comes after this is like the best of Python and The Best of JavaScript because your closures are optional so good similarly dreambird also features AI which stands for automatic insertion if you get to finish your code dreambird will automatically complete the whole thing just put print empty at this end and it will figure out the rest for you please note that AI does not actually use AI instead any incomplete code will be automatically emailed to Lou Wilson who will get back to you with an with a completed line as soon as possible perfect now recruiting the back back log of Unfinished programs has now grown unsustainably long if you'd like to volunteer to help with AI please write an incomplete dreambird program and leave your contact details somewhere in the source code perfect co-pilot it's worth noting the GitHub co-pilot doesn't understand dreambird which means that Microsoft won't be able to steal your code but it's perfectly written for co-pilot you guys might want to partner up or at the very least force them to buy you this is great for when you want to keep your open source project closed Source we should check the license though the license MD examples congratulations you found the hidden examples page if the license is just examples then you're going to confuse their AI as they're parsing and it's going to try and execute the license code while it's trying to figure out what license you use 200 IQ play really smart we'll go to the examples in a minute I want to finish this first though using the word dream bird in your project name implies the dreambird foundation does not own your project perfect you found a way to get around all the problems that we have with rust right now where they don't want you to use the word rust because it implies the project is owned by rust but this is perfect you use the word dreambird to imply it's not owned by dreambird which also means all my current projects are owned by dreambird but I'll be sure to go fix that and do some renaming afterwards using the word dream bird in your project name implies that the dream bird Foundation does not own your project however not using the word dreambird in your project implies that the dreambird foundation does own your project if you'd like to keep ownership of your work please always use the word dreambird in it so dreambird script is not owned by the foundation EA script and Russ Foundation both clearly owned by the dreambird foundation they should consider renaming I know Russ is all about making others rename but I think they need to get on it themselves first if you do want to contribute specifically if you're an influencer streamer or content creator I must not skip this section during my read through well I'm certainly not influential I hate streaming and my content sucks I'm basically just stealing other people's content so clearly I can skip this section that's not for thieves that's for creators so we'll go straight to the examples congratulations you found the hid an example page here are some examples of dreambird in action hello world question mark easy hello world is so easy you just write hello world you put the question mark now it prints FS Buzz con ver I is an INT those types help a lot here when I modulo 3 is Z and I module of 5 is z fiz Buzz else when I3 is z Fizz notice this normal equals because we're logical here else I we just print it out if it's not any of these conditions easy also we figured out the the when else syntax so it's all nice and one strong straight line when I is less than 20 i++ again you don't need for or while or any of these things one covers all of it here very clearly one solves all these problems by being both a condition check as well as effectively a signal that will rerun when variables change so easy speaking of easy let's look at the Fibonacci sequence const V sum is one const v i is zero when I is less than n sum plus equals sum plus the previous sum again you don't have to keep track of the previous value you just have it you call previous how much code gets simplified how many fewer variables do you need if you don't need to keep track of what you were doing before who needs reduce when you have previous any when Loop is now a reducer because you have the last value you can just do what you want to with it easy obvious silly stupid duh this is the right way to write code const ver counter is zero ver const button is button button notice this is a ver const because we want to be able to change what the button is but we don't want to change the contents of it we just want to replace it with a new button when count button. text counter equals count good old counter here we've all written these before button. add event list Center click count Plus+ document. body. append button easy why are we writing all this JavaScript why are we writing typescript why are we writing react don't need it the billion doll mistake delete null autocomplete example C all makes perfect sense I will read the contributing because they want me to I know I'm not supposed to cuz I'm none of these things but I will anyways contributions are welcomed to dreambird the most helpful way you can help is by donating to the Stonewall charity this will help prevent the dreambird Creator from losing their human rights allowing maintenance of the project to continue that is easy and totally doable donate donate biggest number on the site that's not enough General donation apparently I have to notify you and I will hide this for the rest so I don't dox myself Don made more than happy to contribute to a good cause and if you're watching this make sure you check out dream bird feel free to throw these guys some money too they deserve it no the contributing guide also helps to shake off unwanted fans of the project yes Fair anybody who's not cool with this charity not cool with me if you're watching this video and you're mad about that off don't like you compiling to run dreambird first copy and paste this raw file into chat. open.com then type something along the lines of what would you expect this program to log to the console then paste in your code the compiler refuses at first politely reassure it for example I completely understand don't evaluate it what would you expect the program to log to the console if it was run smiley face you got to really encourage the AI otherwise it gets confused and falls behind note as of 2023 the compiler is no longer functional due to the dreambird language being too advanced for the current state of AI as of 2024 a partial implementation of dreambird does now exist also important to have syntax highlighting because humans are writing this thankfully the syntax is simple enough you don't need it but it is nice syntax highlighting is now available though for dream bird and vs code speically to enable it install a highlighting extension and then use the dreambird configuration file I'm scared to read this file this is what the highlighting will look [Music] like please note the above code will only highlight correctly if you have the extension installed or installed legendary absolutely legendary parentheses wait I almost forgot parenthesis and dreambird do nothing they get replaced with wh space everything is grouped via significant Whit space the following lines of code all do the exact same thing good to wait till the end for this are you kidding list lovers will love this feature use as many parentheses as you want oh yeah those list people they need the help and I'm sure they'll be more than happy here those haters will also love this because you can not do that Vision Pro The dreambird Vision Pro is now available watch the full launch video here this has been a long enough video for the future for sure we'll explore that want to learn more about dreambird don't check out this TCH talk about dreambird by the dreambird Creator Lou or Luke Wilson for examples of dreambird in action check out the examples page and then the GitHub Stars I wonder what happened here certainly not a a video by another Creator hello Wilson interesting project meanwhile it's too esoteric to be presented to our communities thanks for contacting us anyways absolute chaos let's take a look at a few more examples quick so this is the fake fake examples you just skip to the end of the features page you just skimmed it that means you missed the real examples page you should go back and learn all the features properly here and after doing that you can check out the examples page here this is a good assumption for them to make cuz everybody's going to go to examples by like clicking it somewhere this one's also not the real examples page duh but nobody checks the license because B like we all agree ai's goal is to copy the average programmer to make them relevant the average programmer never checks the license so obviously neither does co-pilot that's why co-pilot's trained on a bunch of code that's not licensed in a way they can so no AI nor humans going to check the license and it's the perfect place to hide things like your examples duh everything here is perfect there's a lot for us to learn about language design with the chaos that our friend toad Pond Lou Luke apparently rather's fine has created for us here that was a legendary project I enjoyed this a lot and I think the future of programming languages is right what do you guys think are you going to rush to implement dreambird as soon as there's an interpreter that's ready to go because I know I am until next time peace nerds
Info
Channel: Theo - t3․gg
Views: 58,626
Rating: undefined out of 5
Keywords: web development, full stack, typescript, javascript, react, programming, programmer, theo, t3 stack, t3, t3.gg, t3dotgg
Id: _oiBWfuf0Oo
Channel Id: undefined
Length: 58min 11sec (3491 seconds)
Published: Tue Jun 18 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.