Skip Navigation
How are exceptions handled in Idris?
  • 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.

  • NixOS is weird... I love it
  • 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.

  • How software projects are managed
  • 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.

  • Google Play Protect cannot be disabled during phone and video calls
  • As a final thought, why is protection from malicious apps from the play store being performed on the phone instead of in the store?

    In addition, why is known spyware on the top of the recommended list if I were to open the play store: temu, snapchat.

    Or getting pissy if I use an ad blocker when their platform has served malicious ads.

  • objected rule
  • Object Orientated Programming Structured query language (OOPS-ql).

    For non-techies, SQL (Structured Query Language) is used to interact with databases and is often pronounced as sequel.

    Was the first thing that came to mind looking at this.

  • *Permanently Deleted*
  • I ended up just building a box after looking for the perfect NAS and finding it didn't exist. The software is usually just crap or the hardware is underwhelming. Got a Node 804 case to slap in plenty of HDD space. Running NixOS so I'm in control of the software. In retrospect I wish I had gotten a rackmount type case. Tossed in an Arc GPU for better transcoding shortly after the initial setup.

  • Masculinity
  • If half your employees aren't acting the way they do in private, they're putting on a mask and not being their true selves

    But you're making this point in defense of someone aligning themselves with a group who targets trans, women, and whoever else they can bully not like them for being their true selves... Do you not see the hypocrisy of such a point given the context of the quote?

  • switching from windows to linux, can you give some advice?
  • Major desktop environments are KDE as you mentioned and Gnome.

    Arch wiki is a good resource even if not running arch. You may want to look into their dotfiles page to back up your settings: https://wiki.archlinux.org/title/Dotfiles.

    NixOS ended up being my distro of choice for reproducible installs but it has a high learning curve and poor documentation so I wouldn't recommend to start with. That said you can still use Nix on other distros with home manager to manage dotfiles and install non-system apps.

    Distros just pick the default things to install. You can always use the package manager to install something else like a better file manager.

    A lot of choices are simply subjective so its hard to recommend any one distro. Mint is close to windows, based on Ubuntu and uses Gnome. Ubuntu based on Debian I find to be user friendly. Not used a Fedora based distro in ages but there is also Silverblue I've heard mentioned positively.

    Distros like Arch and NixOS are more design your own system setups. Pick what you want. I used arch for a bit, but got annoyed at keeping all my systems in sync. Had a huge wiki of all the tweaks I made. Then scripts to automate some of it. I started looking at automation tooling like ansible when I found nix.

  • Creating a WYSIWYG GUI markdown editor - Bad idea to emulate vim features vs. embed neovim?
  • Best of luck! Sounds like a cool project.

    Not sure if NeoVim uses tree-sitter as the default syntax highlighter, but it will give you Abstract Syntax Tree info if you can jack into it for the document so you don't have to parse the markdown. Your WYSIWYG view just has to translate the AST which may help with removing style symbols.

    One of many ways to tackle I'm sure.

  • How do you backup your configuration files?
  • I won't lie, it was a learning curve. That said you don't have to go full blown nixos. I use nix + home manager to manage my macOS and Ubuntu user dotfiles.

    You can also use nix per project with dev shells and direnv to automatically load the dev shell when in the repo.

    I maintain a nix config for my work's repo and it keeps everyone (Mac or Linux) on the exact same version of our tooling (node, python, bash, etc.).

  • Creating a WYSIWYG GUI markdown editor - Bad idea to emulate vim features vs. embed neovim?
  • 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.

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)SL
    sloppy_diffuser @sh.itjust.works
    Posts 0
    Comments 386