• 2 Posts
  • 57 Comments
Joined 1 year ago
cake
Cake day: July 8th, 2023

help-circle













  • jeffhykin@lemm.eetoLinux@lemmy.mlNixOS for gamedev
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    edit-2
    4 months ago

    Yeah, university is almost certainly going to expect you to be able to install Unreal or Unity, which just isn’t possible AFAIK on NixOS. NixOS is very all or nothing. You can’t just remove the restrictions for one project and hack something together to hit an assignment deadline. Theres still lots of pain points with LD_PATH and 3rd party binaries.

    That said, you can use nixpkgs on non-nixos and still get reliability for Godot and other open source tools. For your case, I highly recommend dual booting, and then using nixpkgs without going full blown nixOS.







  • Despite my love of yaml. I actually think he has a small point with unquoted strings. I teach students and see their struggles. Bash also does unquoted strings and basically all students go years and years without realizing

    cat --help
    cat "--help"
    # ^ same thing
    
    cat *
    cat "*"
    # ^ not same thing
    
    cat $thing
    cat "$thing"
    # ^ similar but not the same 
    

    To know the difference between special and normal-but-no-quotes you have to know literally every special symbol. And, for example, its rare to realize the -- in --help, isn’t special at a language level, its only special at a convention level.

    Same thing can happen in yaml files, but actually a little worse I’d say. In bash all the “special” things are at least symbols. But in yaml there are more special cases. Imagine editing this kind of a list:

    js_keywords:
    - if
    - else
    - while
    - break
    - continue
    - import
    - from
    - default
    - class
    - const
    - var
    - let
    - new
    - async
    - function
    - undefined
    - null
    - true
    - false
    - Nan
    - Infinity
    

    Three of those are not strings. Syntax highlighting can help (which is why I don’t think its a real issue). But still “why are three not strings? Well … just because”. AKA there isn’t a syntax pattern, there’s just a hardcoded list of names that need to be memorized. What is actually challeging is, unless students start with a proper yaml tutorial, or see examples of quotes in the config, its not obvious that quotes will solve the problem (students think "true" behaves like "\"true\""). So even when they see true is highlighted funny, they don’t really know what to do about it. I’ve seem some try stuff like \true.

    Still doesn’t mean yaml is bad, every language has edge cases.


  • Its easy for me to say “just start writing JSON in the yaml. It doesn’t get more simple than JSON”, but actually I do think there’s a small point with the unquoted strings.

    Back before I knew programming, I was trying to change grammar settings sublime 2, which uses yaml. I had no idea what yaml was. The default setting values used unquoted strings fot regex. I knew PCRE regex and escapes, but suddenly they didnt work, and when I tried to match a single quote inside of regex that also didn’t work. I didn’t know I was editing yaml file (it had a .tmLanguage extension). Even worse, if I remeber correctly, unparsable settings just silently fail. Not only did I have no errors to google, I didn’t have any reason to believe the escapes were the cause of the problem (they worked in the command line). Sometimes I edited the regex and it was fine, and other times it just seemed to break. I didn’t learn about quoting in YAML until years later.

    For me that was an unfortuate combination, which was exacerbated by yaml unquoted weirdness. But when you’re talking about “did you read the spec” that’s a whole other story. .nan for nan, tabs vs spaces, unquted string weirdness, etc should just be one error message+google away. I think they’re a small hiccups with what is overall a great format.