HNHacker News
TopNewBestAskShowJobs

tandav

490 karma · joined November 5, 2016

Music Nerd https://rodionov.cc
submissionscomments
tandav··on uv: An extremely fast Python package and project manager, written in Rust
Still no option to store virtual envs outside projects after a year

https://github.com/astral-sh/uv/issues/1495

tandav··on Uv's killer feature is making ad-hoc environments easy
I'm waiting for this issue to be done: Add an option to store virtual environments in a centralized location outside projects https://github.com/astral-sh/uv/issues/1495

I have used virtualenvwrapper before and it was very convenient to have all virtual environments stored in one place, like ~/.cache/virtualenvs.

The .venv in the project directory is annoying because when you copy folder somewhere you start copying gigabytes of junk. Some tools like rsync can't handle CACHEDIR.TAG (but you can use --exclude .venv)

tandav··on Using Cloudflare on your website could be blocking RSS users
As an admin of my personal website, I completely disable all Cloudflare features and use it only for DNS and domain registration. I also stop following websites that use Cloudflare checks or cookie popups (cookies are fine, but the popups are annoying).
tandav··on BorgBackup 2.0 supports Rclone – over 70 cloud providers in addition to SSH
The lack of s3-like remotes support was the reason I switched from borg to restic
tandav··on Show HN: Full Text, Full Archive RSS Feeds for Any Blog
Also Atom feeds supports pagination https://www.rfc-editor.org/rfc/rfc5005#section-3
tandav··on Ask HN: Do AI-generated images ruin technical posts for anyone else?
Yes, dystopian soulless vibe of AI images is unpleasant.
tandav··on Python Has Too Many Package Managers
There is also virtualenvwrapper. It’s quite handy to create, list, remove virtual environment. I prefer to store all venvs in ~/.cache/virtualenvs instead of .venv in project directory, makes it more clean, no need to exclude for backups or git repository.

https://virtualenvwrapper.readthedocs.io/en/latest/

tandav··on Blog posts, sorted by sleep
It's annoying that there's no easy way to export data from the Apple Watch. The only option is to export complete data from the Apple Health app, which results in a large ZIP file. This file takes about 10 minutes of preprocessing before the whole archive becomes available. It would be much better if I could export only the new records, like those from the last day.
tandav··on Show HN: Free Plain-Text Bookmarking
It would be nice to have some sort of demo
tandav··on Google helped destroy adoption of RSS feeds (2023)
Imagine Google removes RSS for YouTube channels
tandav··on Pipeline-Oriented Programming [video]
shameless plug: I maintain a small library to do functional pipes. You can write:

    (
        range(10)
        | Map(lambda x: x * 10)
        | Filter(lambda x: x % 2 == 0)
        | Reduce(lambda a, b: a + b)
    )
and more. https://tandav.github.io/pipe21/

most operators are basically oneliners: https://github.com/tandav/pipe21/blob/master/pipe21.py#L17

I also maintain a list of libraries which uses pipeline/chain syntax: https://tandav.github.io/pipe21/similar-tools/

tandav··on I quit my job to work full time on my open source project
You can also use

    HISTCONTROL=ignoreboth
to use both ignorespace and ignoredups
tandav··on Evaluating new software forges
I found it difficult to find documentation on how to run gitlab in docker without nginx (I use caddy for reverse proxy) and enable the registry. For anyone having the same problem, here's a working Dockerfile. https://gitlab.tandav.me/tandav/notes/-/issues/5516

I've tried github actions, drone, woodpecker and gitlab. In my opinion gitlab has a much more flexible CI system.

tandav··on GitHub Copilot loses an average of $20 per user per month
Does anyone know vscode extension that can use OpenAI API to perform code completions like Copilot?

There are several ChatGPT-like UIs that you can self host and pay only for API and not for ChatGPT plus. For example, I'm using https://github.com/Yidadaa/ChatGPT-Next-Web. It would be nice to use Copilot in the same way.

tandav··on Python 3.12
I wish they make it possible to use any, callable builtins for type annotations
tandav··on Nginx Unit – Universal web app server
If you need just reverse proxy, Caddyfile syntax looks simpler:

    myapp.company.com {
        reverse_proxy localhost:3000
    }
tandav··on Git-appraise – Distributed Code Review for Git
TIL there's git notes https://git-scm.com/docs/git-notes
tandav··on Easy HTTPS for your private networks
Side question: Does anyone know a simple caddy-like solution, but for non-HTTP traffic? For example, I want automatic SSL certificates for redis, mongodb, postgresql.
tandav··on News is bad for you – and giving up reading it will make you happier (2013)
(2013)
tandav··on Functional Python Programming
My library solves 2 problems.

1. It does not require to wrap your iterable into some wrapper to use functional methods. It takes an iterable/object and returns another iterable/object. You don't have to unwrap it after transformations.

2. it uses oneliners (library is 80LOC single file) for most of the methods. You can just copy-paste it to use instead of install and import. E.g map, filter, reduce is just:

    class B:
        def __init__(self, f): self.f = f
    class Pipe  (B): __ror__ = lambda self, x: self.f(x)
    class Map   (B): __ror__ = lambda self, x: map   (self.f, x)
    class Filter(B): __ror__ = lambda self, x: filter(self.f, x)
    class Reduce(B): __ror__ = lambda self, it: functools.reduce(self.f, it, *self.args)
tandav··on Functional Python Programming
shameless plug: I maintain a small library to do functional pipes.

You can write:

    (
        range(10)
        | Map(lambda x: x * 10)
        | Filter(lambda x: x % 2 == 0)
        | Reduce(lambda a, b: a + b)
    )
instead of:

    x = range(10)
    x = map(lambda x: x * 10, x)
    x = filter(lambda x: x % 2 == 0, x)
    x = reduce(lambda a, b: a + b, x)
and more. https://tandav.github.io/pipe21/
tandav··on Pure Sh Bible
I recommend shellcheck and shfmt pre-commit hooks:

  - repo: https://github.com/shellcheck-py/shellcheck-py
    rev: v0.9.0.2
    hooks:
    - id: shellcheck
      args: [-e, SC2154, -e, SC1091, -e, SC1090]

  - repo: https://github.com/scop/pre-commit-shfmt
    rev: v3.6.0-2
    hooks:
      - id: shfmt  # requires Go to build
        args: [-i, '4', -ci, -sr, -w, -s]
tandav··on Show HN: Killport – CLI tool to kill processes running on a specified port
To support multiple PIDs: killport() { lsof -ti :"$1" | xargs kill -9; }
tandav··on Google Search URL Request Parameters (2016)
I wrote a script to clean Google search url and keep only q param https://github.com/tandav/blog/blob/master/posts/clean_googl...
tandav··on Boring Python: Code quality
also try mamba which is much faster than conda https://mamba.readthedocs.io/en/latest/index.html
tandav··on Ask HN: Programs that saved you 100 hours? (2022 edition)
* https://virtualenvwrapper.readthedocs.io

also alias to create jupyter kernel for activated environment:

    mkkernel() {
        if [ -n "$1" ]; then
            KERNEL_NAME=$1
        elif [ -z "$VIRTUAL_ENV" ]; then
            echo "Pass either kernel name as argument or activate virtualenv"
            return 1
        else [ -z "$1" ]
            KERNEL_NAME="$(basename $VIRTUAL_ENV)"
            echo "No kernel name provided, using name from virtualenv $KERNEL_NAME"
        fi
        pip install ipykernel
        python -m ipykernel install --user --name=$KERNEL_NAME
    }
tandav··on Spotifyd
I use https://github.com/navidrome/navidrome and it’s great
tandav··on Explore some of the finest open-source software out there
Gitea will support federation soon https://github.com/go-gitea/gitea/issues/18240
tandav··on I wish my web server were in the corner of my room
termux (android) can run python, node, docker and more, but you should have static IP or some tunneling like cloudflare/tailscale/zerotier
tandav··on Meli – email client in the terminal, in the spirit of mutt
> And since I get asked this a ton, these federated features like federated following are (obviously) not in Gitea right now, but will probably be released in Gitea 1.18 in October.

According to this blog post https://a.exozy.me/posts/gitea-actually-joins-the-fediverse/

Page 1 of 6Next →