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

help-circle
  • This could actually be a pretty big deal

    1. The Eclipse foundation has been making alternatives to VS Code’s “killer apps” (Docker, Python, Go, C++, SSH, Live share, etc). AKA the closed source ones exclusive to VS Code offical that make all forks of VS Code a huge downgrade. The Eclipse foundation is also running the extension store that powers VS Codium.
    2. “why not just use VS Codium?” (With the killer extensions made by Eclipse)
      • VS Codium is great, but because of manpower limits, they always have to be “downstream” of VS Code. They can’t rewrite any of the core systems.
      • As someone who contributes to VS Code, and loves VS Codium, many issues I have with VS Code have been open on github for +7 years, with hundreds of comments and thumbs-ups. We can’t even sort the file explorer view by last-edited and folders-first (but we can do folders-first alphabetical). Thats been open since 2017.
      • Theia looks like it could finally be the hard fork I’ve been waiting for. A hackable editor, trying to be open source, where all my extensions work, and the community can actually make a PR, get it merged, and extensions are not excessively sandboxed.
      • Will it be that? Only time will tell, but the Eclipse foundation has a pretty good record. They’re definitely prepared for long term support.









  • Same haha.

    I’ve already started it twice for lemmy, but didn’t put in heavy effort yet. I’ve got a wrapper for nix that helps with common issues, but its on the messy side.

    There are so many small GUI apps I want to make but I refuse until I can get Tauri to build an appimage and macos app within nix. It was more than a year ago since I put a lot of effort on that though. If you’ve got any tips/pointers or examples for tauri I’d be happy to hear them.


  • jeffhykin@lemm.ee
    cake
    toLinux@lemmy.mlNixOS for gamedev
    link
    fedilink
    arrow-up
    10
    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.


  • I think it has to do with how it can be evaluated.

    func1( 1, ()=>console.log("hi")||10 )

    In JS the second argument might be treated as both a computation and a value.

    • console.log(m.toString()) as a value (will print out ()=>console.log("hi")||10)
    • console.log(m()) as a computation

    I think CBPV forces one or the other, which helps the compiler know how to optimize it. If it were just a computation, it wouldn’t need as much overhead as a full function definition I suppose.



  • Sadly it still causes system instability even if you NEVER need the feature.

    You might not need numpy at all, but Pandas needs numpy and Opencv needs numpy. Sometimes pandas needs one version and Opencv needs a different version. Well… python only allows one global verison of numpy, so pandas and opencv fight over which one they want installed, and the looser is forced to use a numpy they were not designed/tested for. Upgrading pandas might also upgrade numpy and break opencv. That causes system instability.

    Stable systems like cargo coupld upgrade pandas, have pandas use numpy 1.29 without touching/breaking opencv (opencv would still importing/using using numpy 1.19 or whatever). That stability is only possible if the system is capable of having two versions of the same dependency at the same time.


  • And FYI to OP, if you can’t install two versions of the same library at the same time (ex: numpy 1.25 and numpy 1.19) then the answer to “has its dependencies under control?” is generally “no”.

    • Deno (successor to NodeJS) is “yes” by default, and has very very few exceptions
    • Rust can by default, and has few but notable/relevant exceptions
    • Python (without venv) cannot (even with venv, each project can be different, but 1 project still can’t reliably have two versions of numpy)
    • NodeJS can, but it was kind of an afterthought, and it has tons modules that are notable exceptions


  • jeffhykin@lemm.ee
    cake
    toProgramming@programming.devIncus and programming
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    4 months ago

    The more reliable/reproducible the container is the more pain/effort it is to setup. If you don’t need reliability, then you don’t need containers.

    • If you want unbeatable reliability, use nix.
    • If you want better-than-nothing use venv/anaconda envs (one or the other, not both)
    • If you want the most reliability-per-effort and don’t care about performance, use distrobox


  • 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.