 All right, so I'm taking a little break after doing some stuff in my shop for a decent part of the day Sewing table and some stuff up here and some of you know what that shit is others are like what the fuck is going on in there Sort of like insulation just for infrared light instead of through like heated up air it helps and when you've got like Actual floor where you can't really put insulation or put much it is like four inches of space In an area that recommends about 18 inches in the attic And it's a gotta gotta do what they gotta do what I can FYI that shit is actually great strongly suggest putting it in the the whole shop was like $12 of that shit. It's really cheap. It helps strongly recommend it Anyways, this will wind up being a fairly short video What I Want to talk about is another issue with Ida core and that and Part of this is more with Ida in general although considering really the added 95 revision onwards has been Pretty much at the discretion of Tugger Taft who is at Ida Gore I Think anyways pretty sure Hopefully I'm not wrong on that one, but a lot of this, you know, Ida core inevitably has a lot of weight on Where at it goes as a language and They're still in large part at fault for for for this stuff So this has to do with the Ida standard library Specifically we're talking about LibNet because I'm not gonna comment on IBM or PTC is Ida offerings. I'm not sure if there are any others still like active But I'm not I'm not gonna comment on those I haven't really used them in any major capacity I mean, I've had people check Stuff on the other compilers, but I haven't directly used the libraries if you follow that So this one is They don't document their shit and it's fucking ridiculous I'm really big on documenting APIs. You know, if you're doing business logic You know your own internal business logic that Nobody else outside of your business is going to see you can get away without documenting it. That's fine I'm not that level of hardcore But if you are a library writer and your stuff is written for Third-party consumption it needs to be documented the reason for that It is possible to write fairly Self-documenting APIs, this is the thing you can you can do I still recommend documentation comments But you can still largely do it The add a standard library is not set up that way The example I love to give is the head and tail functions inside of Ida.string.fixed head and tail do two different things Depending on the parameters you pass into them And that's just fucking bizarre head can truncate Starting from the left if you if you're if you want like the head three Three characters, it'll take the first three characters and truncate the rest of it That is pretty expected behavior and is what most people would know as head You know some some APIs call it like left truncate and right truncate but head and tail are fine for those but head and tail also pad and There's no pad function and And they add a standard library It's just head and tail Which means two things One is just sort of a bad design choice That if you want to pad Three characters onto a string You have to calculate that and that's not particularly hard to do you can use the length attribute and plus three and it's pretty easy It does make the code a little bit weird-looking That's the kind of thing that should generally be provided in an API It's not it's not hard to do it just cleaner looking and You want third-party code to be as clean-looking and is easy to write as possible This kind of thing also helps create self-documenting code So Yeah You know, it's always good when the function name is as clear as possible and Head with a length that is larger than the string you're passing into it is just not good at creating self-documenting code but the other problem with this is that It's one function doing two different things and That's just not good separation of concerns this is not an isolated Situation within the at a standard library at all. I really wish it was I Really wish it was but it's just it's not None of this is documented within libnat if you want to understand this behavior you have to go straight to the Straight to the add a reference manual Which it is a good idea to know the add a reference manual if you are an added developer I Strongly recommend that But the simple fact is a lot of this stuff You could copy pasta into doc comments into libnat Ida core even offers nat doc for handling Documentation comments within this stuff and they could provide a website similar to docs.microsoft.com to provide all of this for libnat and for their own Nat library would whatever they're calling that but There's another problem More so with the add a standard library itself regardless of who's implementing it that I'll Touch up on now because I really think it should have been Reimplemented something similar to what D did and I do understand a lot not a lot of developers are too familiar with D nowadays but D had a different standard library than it does now and you could probably still use the old standard library, but the community developed a new standard library because they weren't happy with the old one and It's a lot better. I think I didn't needs to do that Say like fuck the old standard library and develop a new one because there are problems with the existing standard library there's a lot of instances of Like a procedure with one output parameter instead of a Just returning that and through a function call and the thing is Passing that through an out parameter Prevent certain optimizations that Ida can take advantage of C++ programmers are definitely going to be aware of what these are Named value optimum named return value optimization and return value optimization Ida can take advantage of those But not if you're outputting through an out parameter you have to output through the return value of a function I Also think for that kind of thing function calls are just sort of better Output parameters have their place. I'm glad they exist in the language C sharp was really bad for a while because it didn't offer output parameters. It does now it helps So I I'm glad they're in Ida But You need to be passing things through a return value As much as possible and the add a standard library does not do that There are a number of other problems, but YouTube is being weird and is sort of encouraging shorter videos now So I'm trying to keep these short and like break them up as much as possible. So that'll be it for this one Until the next have a good one