Plutus, Haskell, Nix, Purescript, Swift/Kotlin. laser-focused on FP: formality, purity, and totality; repulsed by pragmatic, unsafe, “move fast and break things” approaches


AC24 1DE5 AE92 3B37 E584 02BA AAF9 795E 393B 4DA0

  • 2 Posts
  • 71 Comments
Joined 1 year ago
cake
Cake day: June 17th, 2023

help-circle




  • I’m glad you asked!

    Formal verification is an automatic checking methodology that catches many common design errors and can uncover ambiguities in the design. It is an exhaustive methodology that covers all input scenarios and also detects corner case bugs.

    One of the most futuristic companies I know of is Runtime Verification that uses formal Methods in industry. They have a list of accomplishments that seem like vaporware including a semantic babel fish called the K framework that can translate between languages based on formal, semantic definitions of each.




  • This is why I decided to learn Nix. I built dev environment flakes that provision the devshell for any language I intend to use. I actually won’t even bother unless I can get something working reliably with Nix. ;)

    For example, here’s a flake that I use for my Python dev environment to provide all needed wiring and setup for an interactive Python web scraper I built:

    
    {
      description = "Interactive Web Scraper";
    
      inputs = {
        nixpkgs.url = "github:NixOS/nixpkgs?ref=nixpkgs-unstable";
        utils.url = "github:numtide/flake-utils";
      };
    
      outputs = { self, nixpkgs, utils }: utils.lib.eachSystem ["x86_64-linux"] (system: let
        pkgs = import nixpkgs { system = system; };
      in rec {
        packages = {
          pyinputplus = pkgs.python3Packages.buildPythonPackage rec {
            pname = "pyinputplus";
            version = "0.2.12";
            src = pkgs.fetchPypi {
              inherit pname version;
              sha256 = "sha256-YOUR_SHA256_HASH_HERE";
            };
          };
    
          pythonEnv =
            pkgs.python3.withPackages (ps: with ps; [ webdriver-manager openpyxl pandas requests beautifulsoup4 websocket-client selenium packages.pyinputplus ]);
        };
    
        devShell = pkgs.mkShell {
          buildInputs = [
            pkgs.chromium
            pkgs.undetected-chromedriver
            packages.pythonEnv
          ];
    
          shellHook = ''
            export PATH=${pkgs.chromium}/bin:${pkgs.undetected-chromedriver}/bin:$PATH
          '';
        };
      });
    }
    
    



  • I agree with this assessment for the most part but one side of me plays devil’s advocate on this:

    I sort of came to realize in the end that it was possibly purchased to push all leftists off the platform, allowing Musk to compete with Google and Facebook in heavily manipulating and censoring discourse in American society (and let’s be clear, they did. Just because it was an attempt to help “the good guys in the DNC” by Google and Facebook doesn’t make it not an open and shut case of treasonous manipulation of discourse.

    As an absolutely prolific Twitter user pre-2016, I was very quick to leave….but at the same time, I eventually came to the sad conclusion that Xitter (pronounced Shitter) actually does need leftist voices as long as it exists. IMO, it (and Google and Facebook) should be dissolved, open sourced, decentralized, and socialized for the crime of treason/undermining democracy.

    We (people of the fediverse with a strong sense of integrity) basically fled to our own decentralized, open source platform where we have 1 millionth of the reach with our voices. Being around such a cesspool where astroturfers working for Progressive think tanks and their conservative buddies would gaslight me about the popularity of things like Single Payer or student loan reform…which was not great for my well-being…But let’s not pretend that leftists that remain on the platform are bad people for doing so. An echo chamber has a way of brainwashing people. So, conservatism would be even stronger had more of our brethren not stayed.

    Just a small counterpoint. I strongly dislike conservatism and the conservative ethos of “fuck you, got mine”…but perhaps they were playing 4D chess with us a bit.






  • 🙄

    Did you just post a license for your humblebrag soapbox rant about NixOS?

    Edit: I’ll leave some points where I agree since you’re very fixated on/preoccupied with who won this debate (or something). In the long run, most Nix users are wishing for a complete rewrite of NixOS with Nix’s modern approach codified as standard. After all, to your point, Nix is just a massive pile of Perl and Bash under the hood. It could unquestionably be more capable if they had the benefit of hindsight (or a proper type system built into the language) like GUIX which uses Scheme as their DSL has. AFAIK, though, Nix flakes are a feature that GUIX badly needs.


    For GUIX: Does anyone know about content-addressed derivations in GUIX? I figure that might also be a place where Nix bests GUIX but perhaps some GUIX(pronounced geeks) can correct me before I search for answers.




  • It’s finally ready for mass adoption, IMO. Also, things take a long time to catch on and now that flakes are fairly stable and a lot of pedagogy is popping up in the form of other people’s configs (and the documentation is being actively improved to hopefully someday meet the high standards of Arch), people feel empowered to try it out.

    IOG uses it for their entire stack which is packed with incredibly solid (IMO) software engineering decisions from top to bottom.

    I tried it because I wanted to run a Cardano stake pool and develop DApps for the Cardano ecosystem. Their build-from-source instructions made me realize how much better it would be to install it with Nix instead of the cargo cult/curse of the current era, a Docker container.