News for hackers. Stuff that matters.

Tipewryter

Re:The Greatest Regex Trick Ever (2014) on Friday July 09, 2021 @02:17AM (#27780930)
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.

Re:The Greatest Regex Trick Ever (2014) on Thursday July 08, 2021 @03:21PM (#27776551)
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".
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."
This outputs many pages of debug information and then dies. The error seems to be this:

    This package requires Rust >=1.41.0.

    you can use pip install -r requirements.txt
I don't see a requirements.txt file.
Re:Pentagon Scraps $10B Cloud Deal Award to Microsoft on Tuesday July 06, 2021 @12:55PM (#27751175)
Hmm.. No impact on the Microsoft stock price?
Re:Python Best Practices for a New Project in 2021 on Monday July 05, 2021 @10:06AM (#27738140)
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?

Re:Python Best Practices for a New Project in 2021 on Monday July 05, 2021 @09:49AM (#27737960)
Why would I need poetry? Doesn't "pip3 install -r requirements.txt" do everything I need?
Re:Python Best Practices for a New Project in 2021 on Monday July 05, 2021 @09:33AM (#27737799)
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.
Re:Python Best Practices for a New Project in 2021 on Monday July 05, 2021 @07:24AM (#27736767)
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.

Re:Python Best Practices for a New Project in 2021 on Monday July 05, 2021 @07:16AM (#27736701)
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/.

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.

If. But so far, no federated system has resulted in good user experience.
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.

That is a software repo. Not a public centralized service that lets users communicate with each other.
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.

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?

What do you eat in the morning?
Wow. What do you eat instead of bread?
You don't consider putting your body above work and marriage?
I'm not sure if I even eat any food with sugar and refined carbs. Is that stuff in bread?
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.

    Do not stretch your spine
What do you mean with this? How does one stretch their spine?
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?

I don't have a boss.
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?

Re:Chrome exempts Google sites from user site data settings on Sunday October 18, 2020 @10:05AM (#24817968)
Nice.

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

Older »