• 0 Posts
  • 11 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle
  • Been forever since I used Haskell, and not used Idris (hi from scaled).

    Currently actively developing in TypeScript with the fp library Effect.

    It essentially has a tryCatch function to lift exceptions into an Effect (like an Either type). Since TypeScript doesn’t expose exceptions in the type system, its the only way to get errors from other libraries into the type system. They come in without types so we wrap them in our own errors types.



  • Been using Nix for just over a year.

    Seconding to go with flakes. No idea wtf channels are or whatever the previous system was.

    Documentation can be confusing due to changes in paradigms. The bare “nix <scope>” seems to be the most modern oppose to “nix-<scope>” (e.g., nix store vs nix-store). That said, not every feature can be found in the newer variants.

    This can make following tutorials difficult if they aren’t using the same paradigm.

    Getting comfortable with the nix language will be helpful. Its a functional programming language, which is very different than languages like bash.

    Not everything has to be done the nix-way. My nvim files are in the same repo, but I just outOfStoreSymlink them instead of wrapping them in a derivation.

    Some useful packages I like not already shared.

    Disk partitioning: https://github.com/nix-community/disko

    Immutable: https://github.com/nix-community/impermanence - Pretty much resets the system to a new install every boot. Discourages manual tweaks via sudo as they get wiped out. You can still mark certain directories to be persistent (logs, personal documents, steam games, etc.).

    Nvfetcher: https://github.com/berberman/nvfetcher - Nix has a concept of overlays. You can pretty much override anything with .override (module args or inputs) and .overrideAttrs (module attribute set or outputs). Nvfetcher helps with checking different sources so you can override a packages src attribute. Why is this useful? So you can install any version you want and are not bound to nixpkgs. That doesn’t mean the install script in nixpkgs will always work on newer versions, but those can be overridden as well if needed.

    Note that disko, impermanence, and nvfetcher all have a flake.nix in the root of the repo. Those provide ready to go overlays so you don’t have to deal with writing your own which is really nice if you want to latest version without much work when available.



  • Toooo real. Its like companies have taken the worst of everything and just call it agile. List out every task and estimate them so we have timelines, but don’t actually architect anything as that’s waterfall. Fake waterfall, with fake dates, but fingers will be pointed like they were real commitments, and spend a month doing it for this executive power point instead of fucking off so devs can build the damn thing.





  • You probably don’t want the entire terminal rendered in your UI for the reason you gave that it is intended for monospace.

    Rather, you want the buffer which is markdown and contextual info like cursor position.

    You might hit some challenges like how to handle style elements. For example:

    <cursor>*bold*
    

    Moving the cursor to the right of the b will take two key presses in nvim but would typically be one key press in a WYSIWYG editor.

    There are probably many ways to handle this in nvim through the plugin system, but both paths of embedding vs emulating nvim has a good chunk of dev work to be completed.

    Emulating will likely be more rewarding at the start as you can get incremental improvements pretty quickly.

    Embedding is a cool idea, but likely a ton of upfront work to get your first tangible results.

    You might be interested in reviewing https://github.com/MeanderingProgrammer/render-markdown.nvim which attempts to render Markdown in the terminal. They have logic for rendering things like the bold example in bold while hiding the markup.

    I personally just use https://github.com/iamcco/markdown-preview.nvim to render in a different window when render-markdown.nvim isn’t enough.



  • Whatever you do, don’t start down the path of customizing a Linux distro.

    Started messing with NixOS in December and it has been the bittersweet curse of a never ending things to do.

    • More and more of my config now tracks 0 day releases with custom bug fixes.
    • Started writing my own Gnome Shell.
    • Started adding support to my favorite TypeScript framework for GJS (Gnome JS) for my shell.
    • Started writing a a parser combinator to parse GJS stack traces.
    • Started writing custom source map library for GJS so I know where my errors are.
    • Started writing a custom test runner because none of the modern ones work on GJS.
    • Started writing widgets for my new shell.
    • My veovim config is now its own software suite.
    • Started writing syntax tree parsers for poorly supported query languages we use at work.
    • Coding style is enforced with huge linter rule configs and custom plugins.
    • Sleep is now at 75% of what it was.
    • My wife is now working double what she did because I’m always busy.
    • My kids think I’m crazy.
    • My work has doubled their expectations because they think I’m some inhuman wizard.
    • The walls of reality are crumbling down.
    • Brb my morning NixOS update is failing to build (again).