HNHacker News
TopNewBestAskShowJobs

Tipewryter

165 karma · joined October 14, 2020

submissionscomments
Tipewryter··on The Greatest Regex Trick Ever (2014)
Interesting. I took the \K solution right from the article without trying it.

Now that I try it, it indeed does not work.

Maybe the author reads this and can look at it.

Tipewryter··on The Greatest Regex Trick Ever (2014)
The solution...

    not_this|(but_this)
... is interesting. But since it returns the match in a submatch I would say the \K approach is better:

    (?:not_this.*?)*\Kbut_this
Because usually when you try hard to accomplish something with a regex, you do not have the luxury to say "And then please disregard the match and look at the submatch instead".
Tipewryter··on Show HN: A simple lazy Python calculation engine, with spreadsheet demo
Here is how to reproduce it in a fresh docker container, so we have the same environment:

    docker run -it --rm debian:10-slim /bin/bash

    apt update
    apt install -y git python3-pip --no-install-recommends
    pip3 install git+https://github.com/bsdz/calcengine.git#master
Result: "This package requires Rust >=1.41.0."
Tipewryter··on Show HN: A simple lazy Python calculation engine, with spreadsheet demo
This outputs many pages of debug information and then dies. The error seems to be this:

    This package requires Rust >=1.41.0.
Tipewryter··on Show HN: A simple lazy Python calculation engine, with spreadsheet demo

    you can use pip install -r requirements.txt
I don't see a requirements.txt file.
Tipewryter··on [dead]
Hmm.. No impact on the Microsoft stock price?
Tipewryter··on Python Best Practices for a New Project in 2021
Additional requirement files for dev and test don't seem like a burden to me.

Can you describe an issue that you had by not locking transitive dependencies?

Tipewryter··on Python Best Practices for a New Project in 2021
Why would I need poetry? Doesn't "pip3 install -r requirements.txt" do everything I need?
Tipewryter··on Python Best Practices for a New Project in 2021
That is a very broad question. Can you mention a specific attack vector? Then I might be able to explain how I do or do not avoid it.
Tipewryter··on Python Best Practices for a New Project in 2021
A Docker container starts in two seconds or so. And gives me everything I need. So no need to dabble with a VM.

There is not much overhead in running a project in a container. The project has a setup file that turns a fresh Debian 10 into whatever environment it needs. And thats it. Run that setup script in your Dockerfile to create a container and you are all set. Want to run the project in a VM or on bare metal? Just install Debian 10, run the setup script and you all set.

Tipewryter··on Python Best Practices for a New Project in 2021
I prefer containers over pyenv and poetry. This way not only python version and dependencies are "in one place" but also all other stuff that comes along with a new project. The OS, the database etc.

The one thing I dislike about Python projects is that Python plasters the compile cache files all over the place. Is there a reason to change that? Currently I use the -B flag for all my scripts. But that makes it slow. I wish Python would have an option to perform like PHP and keep cached compilations in memory instead on disk. Or at least somewhere in /tmp/.

Tipewryter··on Show HN: Sqwok – A low-cruft, minimalist alternative to Reddit and Twitter
Two Tips:

1: Opensource it. The type of person who would be an early adapter probably wants to have the option to improve / self host it.

2: Make a Twitter account to keep interested people informed about your progress.

Tipewryter··on Twitter cut off the ability to read a tweet by fetching its URL with a HTTP GET
If. But so far, no federated system has resulted in good user experience.
Tipewryter··on Twitter cut off the ability to read a tweet by fetching its URL with a HTTP GET
Interesting.

Looking at Minds, I already see a big flaw: All posts are under the /newsfeed/ namespace.

So instead of

    /username/1234
your posts are here:

    /newsfeed/1234
I don't think users want to get "robbed" of their posts like this.

There also is no embed functionality. For Twitter type shoutouts it is absolutely vital that they can be embedded around the web.

Tipewryter··on Twitter cut off the ability to read a tweet by fetching its URL with a HTTP GET
That is a software repo. Not a public centralized service that lets users communicate with each other.
Tipewryter··on Twitter cut off the ability to read a tweet by fetching its URL with a HTTP GET
Can you name some alternatives? I am not aware of any.

Please note that I explicitly said "centralized". Because decentralized solutions like Mastodon have not resulted in viable alternatives for the average user so far.

Tipewryter··on Twitter cut off the ability to read a tweet by fetching its URL with a HTTP GET
Thought experiment:

How hard would it be to write a centralized 1-to-many message pipe that replicates Twitters core functionality?

How hard would it be to run such a thing? The moral and legal needs to censor content would probably be a bigger task then the technical implementation?

Tipewryter··on Ask HN: How long does it take for chronic programmer back pain to get better?
What do you eat in the morning?
Tipewryter··on Ask HN: How long does it take for chronic programmer back pain to get better?
Wow. What do you eat instead of bread?
Tipewryter··on Ask HN: How long does it take for chronic programmer back pain to get better?
You don't consider putting your body above work and marriage?
Tipewryter··on Ask HN: How long does it take for chronic programmer back pain to get better?
I'm not sure if I even eat any food with sugar and refined carbs. Is that stuff in bread?
Tipewryter··on Ask HN: How long does it take for chronic programmer back pain to get better?
And you did not consider to keep on playing volleyball? Isn't getting rid of the "bearable" pain worth it?

Have you considered upping the volleyball to every other day or so?

I would happily invest full 3 or 4 days per week if I can get 100% pain free from it.

Tipewryter··on Ask HN: How long does it take for chronic programmer back pain to get better?

    Do not stretch your spine
What do you mean with this? How does one stretch their spine?
Tipewryter··on Ask HN: How long does it take for chronic programmer back pain to get better?
I have to get off my chair after like 15 minutes anyhow, because work with the computer causes intense pain in my upper back.

Walking on the other hand causes pain in my lower back. Not as much though.

Regarding stuck vertebrae - how would one even know if one is stuck? Is there a way to test it?

Tipewryter··on Ask HN: How long does it take for chronic programmer back pain to get better?
I don't have a boss.
Tipewryter··on With Covid-19 Under Control, China’s Economy Surges Ahead
Is it really possible that China has Covid-19 under control?

If so, how does that work? Constant full lockdown? Apparently not, if the economy surges, right?

Tipewryter··on Chrome exempts Google sites from user site data settings
Nice.

I think --incognito makes no difference if you throw away the data dir anyhow.

Tipewryter··on Chrome exempts Google sites from user site data settings
There are some convenience issues with Firefox that bother me:

- It starts slower then Chromium.

- Right click and "Open in new private window" actually opens in a new private window. I prefer how Chromium does it, grouping all sites opened like this as tabs in one window.

- In Chromium, I can easily set any URL as a custom search engine with whatever parameters I like. In Firefox, I can't.

Tipewryter··on Chrome exempts Google sites from user site data settings
To avoid this type of thing I start Chromium via a script that replaces all settings with their defaults when I quit Chromium:

    chromium-browser           \
        --password-store=basic \
        --enable-dom-distiller \
        %U
    rm -r ~/.cache/chromium
    rm -r ~/.config/chromium/Default
    cp -r ~/chromiumDefault \
          ~/.config/chromium/Default
~/chromiumDefault is the dir as it was created when I started Chromium for the first time and set all settings the way I like it. I update it every once in a while when I tweak a setting.
Tipewryter··on Versus – Find alternatives to a product or service
For smartphones, this site has a cool "similar phone finder" that finds similar phones based on their euclidean distance over the specs:

https://www.productchart.com/smartphones/similar

The charts for other product types like laptops, monitors etc are also cool to discover similar products based on specs:

https://www.productchart.com/laptops/

https://www.productchart.com/monitors/

Page 1 of 2Next →