Skip to content

Instantly share code, notes, and snippets.

View ShalokShalom's full-sized avatar
🐉
Garuda

ShalokShalom ShalokShalom

🐉
Garuda
View GitHub Profile
Pick the low hanging fruits first
(dotnet conversion to cupid and lucid)
@ShalokShalom
ShalokShalom / gist:2cb93c34ea42d5fb25e3f0eb754d03f1
Created November 5, 2025 22:40
Comparison Pacman and Pixi
rattler-build | makepkg
recipe.yaml | PKGBUILD
pixi run rattler-build build --recipe recipe.yaml
╭─ Finding outputs from recipe
│ Found 1 variants
│ Build variant: rarfile-4.2-pyh4616a5c_0
│ ╭─────────────────┬──────────╮
│ │ Variant ┆ Version │
│ ╞═════════════════╪══════════╡
# Maintainer: Matt Quintanilla <matt @ matt quintanilla .xyz>
pkgname='winboat-git'
_pkgname='winboat'
pkgver=r215.eac9a7f
pkgrel=1
pkgdesc='Run Windows apps on Linux with seamless integration'
arch=(x86_64)
url='https://www.winboat.app'
license=('MIT')
provides=(${_pkgname})
glewinfo
---------------------------
GLEW Extension Info
---------------------------
GLEW version 2.2.0
Running on a AMD Radeon Graphics (radeonsi, renoir, ACO, DRM 3.63, 6.15.9-zen1-1-zen) from AMD
OpenGL version 4.6 (Compatibility Profile) Mesa 25.1.7-arch1.1 is supported
GL_VERSION_1_1: OK
@ShalokShalom
ShalokShalom / dot.net
Created July 24, 2025 23:38
All dotnet languages
This is a list of all dotnet languages that I could find

Schrödingers error handling

The Problem: The ceremony of unwrapping errors by hand

In common error handling systems like Swift's options or Go's error tuples,
the types that are used to represent missing data or potential errors, are just passive containers.

The standard operators like + for addition, or > for comparison, don't know how to work with them. This forces the programmer into a constant, repetitive ceremony when error handling;

To change Value<'a> to Value<'v> in the return type, you need to ensure that:

  1. The struct has a lifetime parameter 'v: The struct implementing this method must be defined with a lifetime 'v, e.g., struct MyStruct<'v> { ... }.

  2. 'v outlives 'a: The lifetime 'v of the Values must outlive the reference lifetime 'a (i.e., 'v: 'a). This ensures the Values remain valid for the duration of the returned slice.

Here's the corrected signature if your struct is MyStruct<'v>:

impl&lt;'v&gt; MyStruct&lt;'v&gt; {
To change `Value<'a>` to `Value<'v>` in the return type, you need to ensure that:
1. **The struct has a lifetime parameter `'v`**: The struct implementing this method must be defined with a lifetime `'v`, e.g., `struct MyStruct<'v> { ... }`.
2. **`'v` outlives `'a`**: The lifetime `'v` of the `Value`s must outlive the reference lifetime `'a` (i.e., `'v: 'a`). This ensures the `Value`s remain valid for the duration of the returned slice.
Here's the corrected signature if your struct is `MyStruct<'v>`:
```rust
impl<'v> MyStruct<'v> {
Can I change this code:
```rust
pub fn peek_frame<'a>(&'a self) -> Option<&'a [Value<'a>]>
```
into​
```rust
pub fn peek_frame<'a>(&'a self) -> Option<&'a [Value<'v>]>