HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Tipewryter

no profile record

Submissions

Ask HN: Is the Ask HN page broken?

3 points·by Tipewryter·il y a 4 ans·3 comments

ES modules in production: my experience so far

bryanbraun.com
8 points·by Tipewryter·il y a 6 ans·0 comments

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

6 points·by Tipewryter·il y a 6 ans·22 comments

Google Trends: Trump vs. Biden

trends.google.com
2 points·by Tipewryter·il y a 6 ans·0 comments

An oil tanker with 60M gallons of oil aboard is currently sinking [video]

youtube.com
245 points·by Tipewryter·il y a 6 ans·51 comments

comments

Tipewryter
·il y a 5 ans·discuss
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
·il y a 5 ans·discuss
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
·il y a 5 ans·discuss
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
·il y a 5 ans·discuss
This outputs many pages of debug information and then dies. The error seems to be this:

    This package requires Rust >=1.41.0.
Tipewryter
·il y a 5 ans·discuss


    you can use pip install -r requirements.txt
I don't see a requirements.txt file.
Tipewryter
·il y a 5 ans·discuss
Hmm.. No impact on the Microsoft stock price?
Tipewryter
·il y a 5 ans·discuss
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
·il y a 5 ans·discuss
Why would I need poetry? Doesn't "pip3 install -r requirements.txt" do everything I need?
Tipewryter
·il y a 5 ans·discuss
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
·il y a 5 ans·discuss
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
·il y a 5 ans·discuss
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
·il y a 6 ans·discuss
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
·il y a 6 ans·discuss
If. But so far, no federated system has resulted in good user experience.
Tipewryter
·il y a 6 ans·discuss
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
·il y a 6 ans·discuss
That is a software repo. Not a public centralized service that lets users communicate with each other.
Tipewryter
·il y a 6 ans·discuss
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
·il y a 6 ans·discuss
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
·il y a 6 ans·discuss
What do you eat in the morning?
Tipewryter
·il y a 6 ans·discuss
Wow. What do you eat instead of bread?
Tipewryter
·il y a 6 ans·discuss
You don't consider putting your body above work and marriage?