• 0 Posts
  • 14 Comments
Joined 1 year ago
cake
Cake day: June 29th, 2023

help-circle

  • MajorasMaskForever@lemmy.worldtoProgramming@programming.dev...
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    2
    ·
    5 months ago

    Ada

    It has a lot of really nice features for creating data types and has amazing static analysis during compile time.

    But all the tooling around it is absolute crap making using the language unbearable and truly awful. If it had better tooling I could see that it would have taken a decent chunk of development away from C and C++


  • Yes and no.

    Chess bots (like Stockfish) are trained on game samples, with the goal of predicting what search path to keep looking at and which moves will result in a win. You get game samples by playing the game, so it made sense to have stockfish play itself, since the input was always still generated by the rules of chess.

    If a classifier or predictive model creates it’s own data without tying it to the rules and methods in reality, they’re going to become increasingly divorced from reality. If I had to guess, that’s what the guy in the article is referencing when talking about “sanitizing” the data. Some problems, like chess, are really easy. Mimicking human speech? Probably not


  • As someone who is in the aerospace industry and has dealt with safety critical code with NASA oversight, it’s a little disingenuous to pin NASA’s coding standards entirely on attempting to make things memory safe. It’s part of it, yeah, but it’s a very small part. There are a ton of other things that NASA is trying to protect for.

    Plus, Rust doesn’t solve the underlying problem that NASA is looking to prevent in banning the C++ standard library. Part of it is DO-178 compliance (or lack thereof) the other part is that dynamic memory has the potential to cause all sorts of problems on resource constrained embedded systems. Statically analyzing dynamic memory usage is virtually impossible, testing for it gets cost prohibitive real quick, it’s just easier to blanket statement ban the STL.

    Also, writing memory safe code honestly isn’t that hard. It just requires a different approach to problem solving, that just like any other design pattern, once you learn and get used to it, is easy.


  • Whenever I replay OOT I never have a problem with Navi. She rarely hard interrupts, usually just a short tone and flashing C button that goes away after a few seconds. The voice lines only trigger if you press the button to call her, in most cases the hints she gives are genuinely helpful, and stays out of your way for the vast majority of the game.

    Fi from skyward sword though… Far worse because she does interrupt gameplay, often repeats what the last dialogue box just fucking told you, and takes several dialogue boxes to tell you what Navi would have taken one to do. I’m glad they significantly overhauled her interactions in the HD release but I’m still going to be hesitant to play that game again


  • In pure C things are a bit different from what you describe.

    Declaration has (annoyingly) multiple definitions depending on the context. The most basic one is when you are creating an instance of a variable, you are telling the compiler that you want a variable with symbol name X, data type Y, and qualifiers A,B and C. During compilation the compiler will read that and start reserving memory for the linker to assign later. These statements are always in the form of “qualifiers data_type symbol;”

    Function declaration is a bit different, here you’re telling the compiler “hey you’re going to see this function show up later. Here are the types for arguments and return. I pinky swear promise you’ll get a definition somewhere else”. You can compile without the definition but the linker will get real unhappy if you don’t have the definition when it’s trying to run. Here you’re looking at a statement of “qualifiers return_data_type symbol(arg_1_data_type arg_1_symbol,…);” Technically in function declarations you don’t need argument symbols, just the types, but it’s better to just have them for readability.

    Structs are different still. Here you’re telling the compiler that you’re going to have this struct definition somewhere else in the same translation unit, but the data type symbol will show up before the definition. So whenever the compiler sees that data type show up in a variable instance declaration it won’t reserve space right away but it has to have the struct definition before compilation ends. This is pretty straightforward syntax wise, “struct struct_name;” (Typedefs throw a syntax wrench into this that I won’t get into, it’s functionally the same though)

    One more thing you can do with variables during declaration is to “extern” them. This is more similar to function declaration, where you’re telling the compiler “hey you’re gonna see this symbol pop up, here’s how you use it, but it actually lives somewhere else k thx bye”. I personally don’t like calling this declaration since it behaves differently than normal declaration. This is the same as a normal variable declaration syntax with “extern” tossed in the front of the qualifiers.

    Definitions have two types: Function definitions contain the actual code that gets translated into instructions, Enum, struct, typedef definitions all describe memory requirements when they get used.

    Structs and enums will have syntax like “struct struct_name {blah,blah,blah};”, typedefs are just “typedef new_name old_name;”, and function definition “qualifiers return_data_type symbol(arg_1_data_type arg_1_symbol,…) {Blah,blah,blah}” (note that function definitions don’t need a ; at the end and here you do need argument symbols)

    Lastly, when you create a variable instance, if you say that you want that symbol to have value X all in one statement, by the standard that’s initialization. So “int foo = 5;” is declaration and initialization. Structs and arrays have special initialization syntax, “struct foo bar = {5, 6, 7};” where the numbers you write out in the list gets applied in order of the element names in the struct definition. You can also use named initialization for structs where it would look like “struct foo bar = {. element_one = 5, .e_two = 6, .e_three = 7};” This style syntax is only available for initialization, you cannot use that syntax for any other assignment. In other words you can’t change elements in bulk, you have to do it one at a time.

    C lets you get real wild and combine struct definition, struct instance declaration and initialization all into one! Though if I was your code reviewer I’d reject that for readability.

    <\wall-o-text>


  • I’m also curious how many people in this thread have ever been involved in product development and are actual trained/professional software devs. Because not only are some of these comments absolutely ridiculous from a business perspective, they make zero sense in a technical perspective too.

    Proprietary file formats show up because often times the needs of the system don’t line up with CSV, JSON, raw text or they hit some performance problem where you literally can’t write that much data to the disk so you have come to come up with something different.

    There’s also that a computer program in the last 50 years is, except for extreme circumstances, never truly on its own. That microscope control software is completely dependent on how Win95 works, is almost certainly reliant on some old DOS kernel behavior that was left over in early Windows, which Microsoft later completely ripped out starting with Win Vista (tossed back in for Win7 cause so many people complained, then ripped it back out in 8 which no one seemed to care about)

    And it’s not just Microsoft that pulls this, even Lemmy’s darling Linux has deprecated things over the years because even in open source projects it’s unmaintainable to keep everything working for forever.



  • needed to add a mechanic to slow time down

    The devs actually thought of that. There are two auxiliary time control songs. One slows down time by ~50%, the other jumps ahead to the next dawn/dusk. MM3D revised the latter to allow to jump to any top of the hour across the next 12 hours.

    Any of the scarecrows around town teach it to you just by talking to them, but they do so by describing the songs, not teaching you the notes


  • The way I think about Majora’s Mask as a Zelda game is that in addition to exploring the physical world, you’re also exploring time. That does necessitate “backtracking” by forcing time resets and a lot of waiting around if you don’t immediately know what you can be doing in parallel (though the two time control songs make that part easier).

    With the exception of the dungeons themselves, the game typically fast tracks getting you back to where you were when you just reset. Some mechanics like that the game forces on you pretty quickly (song of soaring fast travel), others it lets you figure out on your own (dungeon boss instant warp after beating them the first time).

    Side quests can be a bit more troublesome to deal with if you have to reset part way through, but each interaction point that you have to go through offers you another way to handle things (or to not and let another sequence of events happen).

    To your last point, the game really throws refillable items at you in the overworld, so a lot of times you can skip that (I’m not saying stocking up doesn’t take forever on reset, it does. You just don’t always have to)

    All in all I really love the time mechanic of the game and that let’s me forgive some of the other flaws of the game. If it fell flat, then yeah I can see how the game quickly becomes a chore. But I adore the game, hence the username


  • I believe what toasteecup is referring to is that the federal government isn’t actively going around to individual companies and people telling that what they are doing is or isn’t export controlled. Additionally the regulations apply equally to everyone, with an exception to universities, so the federal government won’t go to Company A and say they must comply but turn around and tell similar Company B they can do whatever.

    For ITAR the list of items is part of the US Munitions List, I’m not entirely sure where EAR gets its list from, but it is the responsibility of the companies and persons to figure out if what they are working on falls under either set of regulations.


  • ITAR technically applies to all US Citizens, the only exception I’m aware of is in a university research setting. The text of the law is pretty short and boils down to anything that the US Government deems military technology or technology that can be used against the US must remain within the US unless written permission to “export” that technology is granted by the department of state. In this case “export” means the information leaving US soil or where you can’t prove that the information hasn’t left US soil. So if you’re talking about some controlled technology in the middle of nowhere Kansas and happen to be next to some German tourist? Boom: Export.

    From there you find yourself dealing with EAR on exactly what counts as an export and how to handle the export process. Exports happen all the time legally but they’re all funneled through the DoS. If you don’t control your exports the DoS starts getting fine-happy and if you do it enough times your company gets disbarred so all those sweet sweet over charged contracts that Musk likes to hide and distract from go away.

    One method of controlling your export is to make sure that US citizens are the only people in your facility. That’s why SpaceX’s policy makes sense


  • I’m no fan of Musk, not by a long shot. Working in the aerospace industry, the vast majority of us have an extreme dislike of the guy, especially for stealing credit.

    But what SpaceX does for hiring is correct. This wasn’t them arbitrarily deciding things, pretty much every aerospace company that does work with ITAR or EAR material gets told that American citizenship is required if the person will be anywhere near that kind of material. Even if your job function isn’t related, if there’s a chance you can see it you need to be able to legally do so.

    Seems strange for the DoJ to go after just SpaceX in this one since I know LHM, Boeing, NG, Raytheon, etc, if you’re in a facility that has ITAR/EAR stuff you need to be a citizen.


  • I feel like Win 10 default apps just waste so much screen real estate. I’ve been using Thunderbird for years and while 5 years ago I would agree the user interface is obtuse the refresh that happened a few years back really improved things. I’ve also never had stability problems and I have thunderbird tracking 7 email accounts with hundreds of thousands of emails total (I’m a data hoarder)

    Evolution on the other hand, hoo boy, I have to use it at work and despise it lol. That program gives me stability problems and frequently fails to interact with Exchange. Gives me a great excuse for missing meetings haha

    All said, Outlook desktop I think is superior to both Thunderbird and Evolution, I just don’t wanna pay for it