- 161
- 20 614 342
javidx9
United Kingdom
Приєднався 14 лют 2016
Programming and Technology Tutorials from a different perspective.
Everybody has the ability to write good, useful and fun code.
No hate, no patronising, just tech and code.
Everybody has the ability to write good, useful and fun code.
No hate, no patronising, just tech and code.
DIY Programming Language #2: Tokenising with Finite State Machine
In this video I use a Finite State Machine to parse complicated input into manageable tokens before feeding them to the Shunting Yard Algorithm I developed in part 1.
Source: github.com/OneLoneCoder/Javidx9/blob/master/SimplyCode/OneLoneCoder_DIYLanguage_Tokenizer.cpp
Patreon: www.patreon.com/javidx9
UA-cam: ua-cam.com/users/javidx9
ua-cam.com/users/javidx9extra
Discord: discord.gg/WhwHUMV
Twitter: javidx9
Twitch: www.twitch.tv/javidx9
GitHub: www.github.com/onelonecoder
Homepage: www.onelonecoder.com
Source: github.com/OneLoneCoder/Javidx9/blob/master/SimplyCode/OneLoneCoder_DIYLanguage_Tokenizer.cpp
Patreon: www.patreon.com/javidx9
UA-cam: ua-cam.com/users/javidx9
ua-cam.com/users/javidx9extra
Discord: discord.gg/WhwHUMV
Twitter: javidx9
Twitch: www.twitch.tv/javidx9
GitHub: www.github.com/onelonecoder
Homepage: www.onelonecoder.com
Переглядів: 25 732
Відео
DIY Programming Language #1: The Shunting Yard Algorithm
Переглядів 42 тис.Місяць тому
In this video I demonstrate how the Shunting Yard Algorithm works, and produce a simple implementatin to solve basic mathematical expressions like a calculator would. Source: github.com/OneLoneCoder/Javidx9/blob/master/SimplyCode/OneLoneCoder_ShuntingYardAlgo.cpp Patreon: www.patreon.com/javidx9 UA-cam: ua-cam.com/users/javidx9 ua-cam.com/users/javidx9extra Discord: discord.gg/WhwHUMV Twitter: ...
Embedding Lua in C++ Part 3: Meh... Just use Sol...
Переглядів 26 тис.2 місяці тому
In this video, I show how to use the excelent Sol library/wrapper to integrate Lua in your C program. This is shown in direct contrast to how i did it in Part #1 which was bare bones, from scratch. Source: github.com/OneLoneCoder/Javidx9/blob/master/SimplyCode/OneLoneCoder_EmbeddingLua_Part3.cpp Patreon: www.patreon.com/javidx9 UA-cam: ua-cam.com/users/javidx9 ua-cam.com/users/javidx9extra Disc...
Introducing 2D Geometry Library
Переглядів 49 тис.4 місяці тому
In this video, I introduce a One Lone Coder Community project called olcUTIL_Geometry2D. It's a new open source library that can perform many varied 2D primitive interactions. This video details how to use basic features of the library. Source: github.com/OneLoneCoder/olcUTIL_Geometry2D Live Demo: community.onelonecoder.com/members/javidx9/Geometry2DDemo1/ Patreon: www.patreon.com/javidx9 UA-ca...
Where Has Javidx9 Gone? (and more important things)
Переглядів 43 тис.10 місяців тому
olc::CodeJam 2023: itch.io/jam/olc-codejam-2023 Thanks to all the Discord Server members that post their progress, and help others with theirs. UA-cam: ua-cam.com/users/javidx9 ua-cam.com/users/javidx9extra Discord: discord.gg/WhwHUMV Patreon: www.patreon.com/javidx9 Twitter (or whatevs): javidx9 Twitch: www.twitch.tv/javidx9 GitHub: www.github.com/onelonecoder Homepage: www.onelone...
Coding Quickie: Handling Periodic Numbers with C++ Templates
Переглядів 40 тис.Рік тому
In this throw-together video I handle numbers that wrap, periodic numbers, using some C template trickery. It's not optimal. It's not clever. But it does server to illustrate how complex templates can make your program. Source: github.com/OneLoneCoder/Javidx9/blob/master/PixelGameEngine/SmallerProjects/OneLoneCoder_PGE_PeriodicNumbers.cpp Patreon: www.patreon.com/javidx9 UA-cam: ua-cam.com/user...
Texture Sampling #2: Bilinear & Bicubic Samples
Переглядів 23 тис.Рік тому
Following on from Part 1, I look at two common sampling methods that aim to reduce artefacts, bilinear and bicubic point sampling. The former linearly interpolates between neighbouring pixels, and the latter uses even further pixels to bias cubic splines to give a smoother contour between pixels. Demo: community.onelonecoder.com/members/javidx9/TextureSampling/Part2/ Part 1: ua-cam.com/video/4s...
Texture Sampling #1: Points & Borders
Переглядів 33 тис.Рік тому
Texture Sampling is fundamental to all grahics these days, but I thought I'd have a bit of an exploration of what exactly goes on trying to emulate what we have come to expect of GPUs. In this video, I establish a little framework, and then create a texture sampling class to demonstrate various methods. Demo: community.onelonecoder.com/members/javidx9/TextureSampling/Part1/ Source: Released at ...
Serialising/Deserialising Structured Memory To Disk, AKA Savin' Stuff
Переглядів 83 тис.Рік тому
In this tedious and long video, I talk about an easy to use file format that's great for serilizing and deserializing data, i.e. Saving Things! Source: Coming Soon! Patreon: www.patreon.com/javidx9 UA-cam: ua-cam.com/users/javidx9 ua-cam.com/users/javidx9extra Discord: discord.gg/WhwHUMV Twitter: javidx9 Twitch: www.twitch.tv/javidx9 GitHub: www.github.com/onelonecoder Homepage: www...
olc::AllSorts - Text/Commands/Sounds/Jams
Переглядів 32 тис.Рік тому
A mixed bag video, showing off some cool new features of the olc::PixelGameEngine. A brief look at a new companion sound library olc::SoundWaveEngine, and a reminder that olc::CodeJam 2022 is almost upon us, register today! JAM: itch.io/jam/olc-codejam-2022 CODE: github.com/OneLoneCoder Patreon: www.patreon.com/javidx9 UA-cam: ua-cam.com/users/javidx9 ua-cam.com/users/javidx9extra Discord: disc...
Back To Basics! Fixed Point Numbers in C++
Переглядів 60 тис.Рік тому
In this video I look at a simple Fixed Point Number implementation in C . I use constexpr to let the IDE run the code without even compiling anything! The final result is a small template class that permits arbitrary precision fixed point calculations. Patreon: www.patreon.com/javidx9 UA-cam: ua-cam.com/users/javidx9 ua-cam.com/users/javidx9extra Discord: discord.gg/WhwHUMV Twitter: twitter.com...
Quirky Quad Trees Part 2: Dynamic Objects In Trees
Переглядів 41 тис.2 роки тому
In this follow on video, I modify our Static QuadTree to allow its contents to move dynamically, and build a simple game demonstrating large arenas, with many thousands of moving objects, updated, rendered and interacted with at high speed. Play In Browser: community.onelonecoder.com/members/javidx9/CreepyCrawleyCapture/ Source: Coming soon! Patreon: www.patreon.com/javidx9 UA-cam: ua-cam.com/u...
Quirky Quad Trees Part1: Static Spatial Acceleration
Переглядів 68 тис.2 роки тому
In this video I look at how a simple quad tree can be used to partition space to make searching for objects within that space much much faster. Source: github.com/OneLoneCoder/Javidx9/blob/master/PixelGameEngine/SmallerProjects/OneLoneCoder_PGE_QuadTree1.cpp Patreon: www.patreon.com/javidx9 UA-cam: ua-cam.com/users/javidx9 ua-cam.com/users/javidx9extra Discord: discord.gg/WhwHUMV Twitter: twitt...
Dithering with Floyd-Steinberg in C++
Переглядів 55 тис.2 роки тому
Dithering with Floyd-Steinberg in C
How I Practice Programming: Five Dice
Переглядів 91 тис.3 роки тому
How I Practice Programming: Five Dice
Super Fast Ray Casting in Tiled Worlds using DDA
Переглядів 175 тис.3 роки тому
Super Fast Ray Casting in Tiled Worlds using DDA
Networking in C++ Part #4: MMO - Designing Passivity
Переглядів 71 тис.3 роки тому
Networking in C Part #4: MMO - Designing Passivity
Circle Vs Rectangle Collisions (and TransformedView PGEX)
Переглядів 46 тис.3 роки тому
Circle Vs Rectangle Collisions (and TransformedView PGEX)
Networking in C++ Part #3: MMO Client/Server Framework, Tweaks & Client Validation
Переглядів 61 тис.3 роки тому
Networking in C Part #3: MMO Client/Server Framework, Tweaks & Client Validation
Controlling Elegoo Robot Smart Car with ASIO and C++
Переглядів 39 тис.3 роки тому
Controlling Elegoo Robot Smart Car with ASIO and C
Networking in C++ Part #2: MMO Client/Server, ASIO, Sockets & Connections
Переглядів 120 тис.3 роки тому
Networking in C Part #2: MMO Client/Server, ASIO, Sockets & Connections
In an ecosystem where people generally hate object oriented programming because they've had bad experiences making structures before they know what they need, it's nice to see good videos explaining how to do it better!
31:24 ffs
if i may ask why is the unit vector in x axis sinf(RA) and y axis cosf(RA) shoudn't it be opposite of what it is.
As long as you're consistent it doesn't really matter
Say a specific star is at 'sector (0,0); offset (0,0)', how does the program determine that star is still the same star at eg. 'sector (7,11); offset (X,Y)' when drawing the game? I don't understand how it maintains accuracy when calculating the seed from the sum of sectors and offset. How isn't _that_ star from the first question a totally different star when calculating the seed at a totally different sector and totally different offset? Dying to understand. Does it have something to do with limiting the significant figures to 0xFFFF, or something else pertaining to bitwise, or something in the rendering part after 'if (star.starExists)', or a combination of all of that? Goodness me! Thank you 😆
I don't understand at all you went over everything so quickly not only I understood nothing program is also broken. The view transformation does the Y rotation (yaw) but when I try to move the camera the Object itself moves along the X, Y, Z axis not along cameras X, Y, Z axis. now I'm stuck at this part of the code for a week unable to proceed any solution I try does not work. I wish you did not go over everything so quickly in the episode. (Edit: I SOLVED IT! Apparently when i defined my Y axis inverted so the last row of look at matrix should have been [T.A, -T.B, T.C] and definitely not [-T.A, -T.B, -T.C]
for anyone using c++11, when adding the w field to the vec3d struct, you may have to also add a default and custom constructor so that the vector methods don't throw an error when returning an aggregate initializer for the struct
I understand every single thing that you discuss in your compiler videos, but I know that I would never be able to implement said things on my own. And I’d feel like a total fraud if I tried copying your code just to end up putting it on my resume. This is my dilemma as a programmer. I love your videos. Any tips for this issue?
Firstly, thanks and I appreciate the support! Secondly, people only learn anything through copying or being shown. Once the basics are there, your skills can develop on their own and that's where novel solutions and engineering stem from. In my experience through the community around this channel, I've come to learn that many folk expect to be able to code like someone with 30 years practice in just 2 years. I don't know your experience level, but don't underestimate your abilities right now, the first step is to acknowledge the things you can't do, at least then you know what to work on.
@@javidx9 thank you so much for your advice. I actually recently graduated with a bachelor’s degree in software engineering but I can’t escape this imposter syndrome. I still have yet to land my first professional programming job. Your advice gives me something to surely think about however. I feel like there’s tons of stuff I can’t do. But I guess it also helps to know the type of stuff that I actually want to do. You’re awesome man!
wtf am i watching
Why? I want WHY and HOW
As I tell my 3 year old, I want doesn't always get.
@@javidx9 fair enough, i can still replicate it... but i guess i have to just do it and understand it later?
For this kind of topic, it really does help to treat the matrices as black boxes, especially if you've not done linear algebra yet. This way you can still develop something satisfying without bogging down in the detail. Hopefully once you make your model spin for yourself it may drive a further interest in practical applications of linear algebra, it's win win!
@@javidx9 i actually already understand the linear algebra i learnt it today, i just need to repeat this myself, and thanks for your help this video is amazing!
What is this library ure using? Some graphics library?
It's a command prompt
It's a command prompt
Man, you gotta be young indeed (or in the opposite end of the age spectrum, in which case, respect) to not to know what midi is, ha ha. Banter aside, thank you very much for this, as someone who grew up with many older computer games playing midi (well, really even the NES and other such retro consoles used midi), it's interesting for me to finally look into what the code actually looks like. Ik ik, even games nowadays use midi format, only the quality of the instruments have changed. I'd imagine at least the code of midi nowadays compared to an NES game's midi timing would be different, in much the way versions of C++ are different (but somewhat compatible) from each other, is that correct or is that wrong? Anyways, I always love your videos, even though I barely ever dabble in programming (because I just can't wrap my head around it xP)
Alas this code no longer works for visual studio 2019 or 2022 :/ I love the project and the explanations but with recent changes to the c++ language ...
Sure it does, the language doesn't change, but it does use some features which needs c++17, and by default in both those Vs, it's 14.
@@javidx9 I am using ISO C++17 Standard (/std:c++17) and the code will run (with warnings). What you see in the console window, however, is not anything like a cube. More like a drunk cursor in tryouts for "The Flash" movie...
Are you planning to add line and character counters so that the error reporting can give the exact location of an error? seems like a very simple addition that provides a nice feature many compilers have.
insane 💀
I always thought I had to be genius enough to come up with this only using my head, now I realize I will never learn if I continue thinking like that. Thanks man
love the statement at 55:12 thank you for saying it
Hi i tried following everything you did and i cant even get the rotation right. Im trying to figurenout what im donng wrong watching this video over and over again lol
*Thanks! "OPERAND" though.*
You t-shirt is so cool! I want one! :)
anyone using a linux system and the SDL engine, you are going to have to modify the GetColour method a bit. The CHAR_INFO he uses here is for Windows systems. To work around it, I just made the method return a struct that contains the two data types that are needed (short and wchar_t) and everything worked fine.
I´ve tried this for so long but i keep running into an issue where my player collides with a rectangle for 1 frame and then falls through it like its not even there, im entirely lost on this
I'm not quite sure where I messed this up, but i have a "String Subscript Out of Range" error when I go to run it. I stopped around 16:00.
I fixed an issue, but I still have two warnings. I got it to work though.
Incredible video. Please make more videos about this language, please!
Thank you. You just gave me the idea of adding pixels to my custom vector class. (eg v+px or v+=px)
my sensei
the system pause comment ☠
What about if the data you need is within a struct within the C++ file. How would you reverse the roles of grabbing info from your C++ file to the lua file instead of lua hosting the info. I have a struct called GameData in C++ and I want to just call like player.getCurHp to get the HP from the GameData struct.
9:20 my hungarian ass was real confused for a second.
Great work mate. If I had existed 10 years ago I would have had an easier time writing my compiler in college. I’m glad creators like yourself are out there.
really great video
Don't worry, short form or normal form yt will inevitably show your video multiple times to the same people for no good reason.
How was first compiler compiled ?????
By hand!
@@javidx9 can you make video about it
I know you’re a good person because you put opening and closing braces on their own lines.
I think he’s a good person but I do hate this about his coding style
@@johnbryan1049 Just take it as something else you can (and should) learn
@@maskettaman1488 yeah I used to use that style. I switched one day like 15 years ago and didn’t look back. It was just easier to read for me.
OK ..i agree your tokenizer work well and seems that produce rock solid array of tokens ..or at least array of UDT ...so next step will be parser i guess..it is kind of hard to follow allthis because i dont use C++ i find is hard ... can you btw explain how function with parms can be called multiple times in a recursive call i mean how to 2 or more recursive calls know which call is already executed ,,thanks
You always upload exactly what I’m looking for at the perfect time!
I would like to point out a few things I would do differently: 1) Instead of Finite State Machine you could've just have a lexer class with a nextToken method, which would peek a char and decide what to do, for each variant just call a blocking function that returns a token 2) Maybe this is to keep things simple in the first episodes, but error handling with exceptions... In a programming language you'd probably want to get all errors at once (multiple error reports). So I'd store them in a vector. Note: This may not be very applicable for lexer, but for parsers error recovery is a thing. 3) Indexing char iterator with zero. It's a valid approach, but if this iterator was a stream directly read from a file (or simpler - linked list or set iterator), this probably won't work. Not all iterators implement indexing 4) Considering #1 and #3, I'd not collect tokens into a vector, but rather parse them immediately. This gets rid of memory and performance overhead and to make parsers easily you'd normally only need one token lookahead (peek a token and maybe consume it) 5) Parenthesis - as well as checking after the loop, you really should check for the count to be positive in closing parenthesis, so combinations like ")123(" are not accepted. But I would probably do it in the parser 6) Parser (more related to previous episode). I'd make a recursive decent one, it's normally more applicable for programming languages Yeah, this sounds kinda harsh, but I don't want to hurt. Just pointing some stuff out :)
I've made compilers using Flex and Bison, but this is very interesting. Learning the craft from scratch. If you ever write a book about (game)programming I'll definitely buy it It may be a nice idea to add some learning order in your video's
I am really impressed with the teaching style and choice of difficult but important topics. Any chance you will try automatic differentiation (mainly applied in neural network training)? This is also kind of difficult but also interesting.
BADMAS(বদমাশ) in Bangla(বাংলা) means RASCAL in English
I was looking so long for this
Just spent the day going over your tutorial, using C and SDL, and its brilliant. The projection part reminds me of the code I was writting for a Raycasting demo, a few years ago.
Thanks for the video! It really motivates me to do my job =)
Incredible next le lexer?
Seems fitting to call the language OLC++; OLC# if one feels maverick.
OLCaml
It's plus, MINUS, add, or SUBTRACT. Never heard of "TAKE". Yes I live in the UK. I'm English. I was born here.
You have five apples. Can I take two?
@@javidx9 Nope.😁
@@stuartgibson9755 Two times two.
Did I miss the bit where you explained why you use "digit" as a synonym for "character"?
I did what?!! Oh nooooo!
this made me realize how unclever, stupid, and genuinely worthless i am. ive never organically developed anything without several resources, websites, and other people's code. this is natural selection in action, i am not cut out for this world at all lol.
太好了,这是我一直等待的教程。感谢
your videos make me very happy
Excellent video as always! Loving this series :) May I suggest you check out std::bitset for the look-up table?