logging_strict

joined 2 years ago
[–] logging_strict@programming.dev 2 points 50 minutes ago (1 children)

They should state a justification. Not merely what they are looking for to identify AI generated code.

The justification could be the author is unlikely to be capable of maintenance. In which case the extension is just going to inconvenience/burden onto others.

So far their is no justification stated besides, da fuk and yuk.

your Google account is old enough to go fight Europe's wars

I get satisfaction by designing complex systems and being tortured by static type checkers. So political pr0n, video games, or 2D chart p0rn does not do it for me. Don't expect my motivations to be the same as those listed addictions. In a world covered in smartphone addicts, it's really hard to imagine someone completely devoid of those addictions.

A rage addict is just someone suffering from a design flaw. I recognize they exist just like trees. A tree producing imperfect fruit does not bug me. The rage addict needs to become capable of weening themselves off the juice. I'm a white hatter. Exploiting system flaws is black hatter. Hope de-assembling nonsense arguments has been helpful.

At one time, thought feeding a rage addict would burn out their rage addiction by having them exhaust themselves. All about coming to the conclusion that it's not worth the effort. But that assumes they can learn, want to learn, or want to adapt/change permanently.

Rage addicts need to recognize they are being played. Until then it's just a broken record on a loop.

This works on any negative emotion. It takes heightened energy to sustain. So fight a war of attrition knowing you'll exhaust your opponent.

[–] logging_strict@programming.dev 1 points 3 days ago (1 children)

Actually going to try that. But even then the fish is not designed to wrap the rice like a bag.

Moving a sushi and getting it into the mouth, with two sticks, without it breaking, consistently, is really a mystery.

I could coding anything. But sushi is challenging.

Any coder can decide what sounds are emitted from their phones. Simply edit out the line or turn off the audio output.

Welcome to a world that includes Linux. As justification of my actions, would argue these features of emitting sounds after every action is addictive and since i own the phone can choose what runs on it. The only sound want is from A/V calls. Govts ability to regulate everything is not unlimited and absolute.

Especially if there is a coder involved.

[–] logging_strict@programming.dev 1 points 3 days ago (1 children)

Sure the guy wears the glasses gets some utility out of the glasses otherwise he wouldn't have one. The evidence collected can be resold back to the user, but ultimately it's the user that finds value in them. The corporation is unlikely to find utility out of the footage which they cannot use without violating copyright laws.

I'm not arguing that these glasses do not contain spy tech, the issue with arguing that is, so does smartphones.

[–] logging_strict@programming.dev -4 points 5 days ago* (last edited 5 days ago) (3 children)

Before facebook even existed a Canadian company was producing contact lens which trsnsmitted light onto the retina to create virtual reality interfaces. They of course had glasses form product as well.

So discussing big ugly glasses is 30-40 year old tech.

Keep in mind, VR investment scam has been around forever. But ok tell me why this time is different.

[–] logging_strict@programming.dev 1 points 5 days ago* (last edited 5 days ago)

If you are conservative. That means being ineffectual and whine alot but do nothing.

If these people had any intention at all to act to mitigate the situation their comments would look quite different:

Don't want to bleed metadata so please switch the conversation in the future over to Simplex, not Matrix/Element and definitely not Signal. And if you suggest WhatsApp i'm never speaking to you again. To prevent censorship prefer a forum where the comments have a non-zero barrier to entry thus adding a real cost to spam or gestapo activities. And to avoid being taxed into extinction i ask clients to pay in Monero. You can see exchange methods off kycme.not

Instead we are subjected to paranoia commentary that always lacks any discussion of privacy knowhow. How to actual mitigate risks based on your risk profile. It's so fucking obnoxious why do we have to take this nonsense seriously like it'll ever lead anywhere except in a circle.

Professing to be conservative is as close to being nonexistent that i'm surprised to find out not talking with a Buddhist.

conservatives pfft that's not even a thing. In the US, they don't even have their own party. There is the MIC party and the good intention that end in grift party. Which is like MIC with benefits. Doing nothing but whining and calling it right is nonsense as we learned post-2009 as they keep the same narrative and didn't adapt to changed realities. It was their Biden moment where all doubt was removed and became obvious to all they are completely full of shit.

Btw have consistently and publically voted for bitcoin since 2014. Not cuz price up price down cuz math. I use the term bitcoin so those not in the know recognize the term, i actually mean Monero.

That's guns vs no guns argument.

To which i say your fat ban spoons!

My comment is no less weak than yours.

[–] logging_strict@programming.dev 1 points 5 days ago* (last edited 5 days ago)

Thank you.

Not everyone is forced to think from the one perspective, Uh she's hot so ... creep perv blah blah blah'. People thinking like this are doing so have the luxury of being in a safe place.

Made 2-3 other rollercoaster commentary in this thread. Hopefully entertaining. Presented passionate believable arguments for both perspectives.

For the point of showing both positions could have well reasoned credible arguments. Based solely on the evidence presented rather than possible hypothetical situations that might be applicable given hypothetical evidence we don't have.

Let you in on thinking during this situation as struggled to assess the situation under duress, rather than in a court room. And why choose to react the way i did. Figured the reaction might come off as unbelievable or highly improbable. The entire situation is absurd.

Like with all the mixed reactions to all things that never happened in the article, can see how there could be a rainbow of reactions. Without the explanation there would be a sea of even more wild reactions. From the outset would rather nip those in the bud.

You are welcome to reach the conclusion you have. Although the two comments are mutually exclusive, pain is a theme in both. So that drew your attention. In some parallel universe where i'd be standing over this guy laughing while he's kicking me while encouraging others to also laugh while disparaging them for having laughed. Gotta say your talent is being wasted here. Safe to say Netflix is hiring.

[–] logging_strict@programming.dev 2 points 5 days ago* (last edited 5 days ago) (2 children)

No worse. If they wanted to, structuring a well reasoned argument is challenging. Throwing out psyche bullshit np.

Then if ask, OK now structure an equally strong and passionate argument for an opposing view.

They'd just mentally be incapable. cuz that doesn't fit into pattern of reactions from a rage addict.

Up to now have been strongly defending the guy. But fuck it this is a game. Now i'm her (watch as I get elected to office).

We, as a society, a long time ago have consciously chosen to put emphasis on people feelings and avoid behaviors that predictably lead to conflict, demonization, and/or demoralization of minority or disadvantaged groups. Although in other societies these behaviors are tolerated, here they are not. Outsiders projecting their ideals upon us can go fuck themselves and the application of laws that perpetuate the societies we purposefully and intentionally no longer want to be associated with as well as can ill afford. From just the evidence presented and nothing more, it's plain to see this guy is targeting women on trains and it makes us uncomfortable and scared to ride the trains. The guy must be an out of towner cuz everyone here does not act this way. In Japan, there are separate cars for women. This change occurred from the harrassment culture that was perpetuated by manga anime and media. This change was instituted to make women in Japan feel safe again riding public transport and does not overly inconvenience men folk cuz it's only enforced during rush hours.

Someone claiming they can do whatever they want cuz it's a public space is not acceptable here and shouldn't be. It breeds a confrontational society of self righteous warmongers that throws everyone but them into unsustainable unlivable lives. I'm surprised they don't all live in tents due to unaffordable housing while we find housing from people who really no longer need it. I like a roof over my head thank you.

 

Will commonly see examples of SQLAlchemy or SQLModel Bases that look like:

class DB1Base(SQLModel, registry=registry()):

There are x10^256 examples of this. And so lets take a step backwards and appreciate the prolific nature of

the guy in charge of random database object names

sqlalchemy docs screams to apply a database object naming convention.

alembic docs has a whole section dedicated it.

So what about SQLModel docs or issues? .... (crickets)

Every example ever lacks applying naming convention to the registry metadata!

from sqlalchemy import MetaData
from sqlalchemy.orm import registry

# copy+paste from the sqlalchemy docs. One case don't wanna be creative.
naming_convention_no_schema = {
    "ix": "ix_%(column_0_label)s",
    "uq": "uq_%(table_name)s_%(column_0_name)s",
    "ck": "ck_%(table_name)s_`%(constraint_name)s`",
    "fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
    "pk": "pk_%(table_name)s",
}

metadata = MetaData(
        naming_convention=naming_convention_no_schema,
        schema=schema,
)

reg = registry(metadata=metadata)

class DB1Base(SQLModel, registry=reg):

Why not to -- job security!

Can only imagine that folks wanting to give every single database object a name manually would do that as a form of job security. If that is the case then carry on.

For those of us who don't want to micro manage the micro manage of micro managers, would highly suggest not manually explicitly naming each and every database object. In each and every database. Not ever, but almost nearly ever.

For example, what if the guy in charge of random database object names gets a girlfriend? It could happen and what a disaster that would be. For him, for her, and for all the people who have to try to track down why a foreign key or unique constraint doesn't exist when it's clear as day in the code that it should be there.

Might have exaggerated, there is no agency of random database object names. But that won't stop the guy in charge of random database object names. Numerically, he can snap his fingers and poof, that agency will exist. Don't underestimate the power and unflinching resolve of the guy in charge of random database object names

The take away

Every single SQLModel Base ever neglects, when creating a registry, to apply database objects naming convention. This includes the SQLModel source code.

So why not submit a PR? SQLModel seems to be unmaintained. There are 69 PRs in the pipeline. So the options are:

  • wait for hell to start selling ice cream

  • poke fun at it

Only have enough coin for the boat man. So that leaves ...

 

Python static typing Ludwick hunger games

4
submitted 10 months ago* (last edited 10 months ago) by logging_strict@programming.dev to c/python@programming.dev
 

Market research

This post is only about dependency management, not package management, not build backends.

You know about these:

  • uv

  • poetry

  • pipenv

You are probably not familiar with:

  • pip-compile-multi

    (toposort, pip-tools)

You are defintely unfamiliar with:

  • wreck

    (pip-tools, pip-requirements-parser)

pip-compile-multi creates lock files. Has no concept of unlock files.

wreck produces both lock and unlock files. venv aware.

Both sync dependencies across requirement files

Both act only upon requirements files, not venv(s)

Up to speed with wreck

You are familiar with .in and .txt requirements files.

.txt is split out into .lock and .unlock. The later is for packages which are not apps.

Create .in files that are interlinked with -r and -c. No editable builds. No urls.

(If this is a deal breaker feel free to submit a PR)

pins files

pins-*.in are for common constraints. The huge advantage here is to document why?

Without the documentation even the devs has no idea whether or not the constraint is still required.

pins-*.in file are split up to tackle one issue. The beauty is the issue must be documented with enough details to bring yourself up to speed.

Explain the origin of the issue in terms a 6 year old can understand.

Configuration

python -m pip install wreck

This is logging-strict pyproject.toml


[tool.wreck]
create_pins_unlock = false

[[tool.wreck.venvs]]
venv_base_path = '.venv'
reqs = [
    'requirements/dev',
    'requirements/kit',
    'requirements/pip',
    'requirements/pip-tools',
    'requirements/prod',
    'requirements/manage',
    'requirements/mypy',
    'requirements/tox',
]

[[tool.wreck.venvs]]
venv_base_path = '.doc/.venv'
reqs = [
    'docs/requirements',
]

dynamic = [
    "optional-dependencies",
    "dependencies",
    "version",
]

[tool.setuptools.dynamic]
dependencies = { file = ["requirements/prod.unlock"] }
optional-dependencies.pip = { file = ["requirements/pip.lock"] }
optional-dependencies.pip_tools = { file = ["requirements/pip-tools.lock"] }
optional-dependencies.dev = { file = ["requirements/dev.lock"] }
optional-dependencies.manage = { file = ["requirements/manage.lock"] }
optional-dependencies.docs = { file = ["docs/requirements.lock"] }
version = {attr = "logging_strict._version.__version__"}

Look how short and simple that is.

The only thing you have to unlearn is being so timid.

More venvs. More constraints and requirements complexity.

Do it

mkdir -p .venv || :;
pyenv version > .venv/python-version
python -m venv .venv

mkdir -p .doc || :;
echo "3.10.14" > .doc/python-version
cd .doc && python -m venv .venv; cd - &>/dev/null

. .venv/bin/activate
# python -m pip install wreck
reqs fix --venv-relpath='.venv'

There will be no avoidable resolution conflicts.

Preferable to do this within tox-reqs.ini

Details

TOML file format expects paths to be single quoted. The paths are relative without the last file suffix.

If pyproject.toml not in the cwd, --path='path to pyproject.toml'

create_pins_unlock = false tells wreck to not produce .unlock files for pins-*.in files.

DANGER

This is not for a faint of heart. If you can avoid it. This is for the folks who often say, Oh really, hold my beer!

For pins that span venv, add the file suffix .shared

e.g. pins-typing.shared.in

wreck deals with one venv at a time. Files that span venv have to be dealt with manually and carefully.

Issues

  1. no support for editable builds

  2. no url support

  3. no hashs

  4. your eyes will tire and brains will splatter on the wall, from all the eye rolling after sifting thru endless posts on uv and poetry and none about pip-compile-multi or wreck

  5. Some folks love having all dependency managed within pyproject.toml These folks are deranged and its impossible to convince them otherwise. pyproject.toml is a config file, not a database. It should be read only.

  6. a docs link on pypi.org is 404. Luckily there are two docs links. Should really just fix that, but it's left like that to see if anyone notices. No one did.

4
submitted 10 months ago* (last edited 10 months ago) by logging_strict@programming.dev to c/python@programming.dev
 

Finally got around to creating a gh profile page

The design is to give activity insights on:

  • what Issues/PRs working on

  • future issues/PRs

  • for fun, show off package mascots

All out of ideas. Any suggestions? How did you improve your github profile?

14
Whats in a Python tarball (programming.dev)
submitted 10 months ago* (last edited 10 months ago) by logging_strict@programming.dev to c/python@programming.dev
 

From helping other projects have run across a fundamental issue which web searches have not given appropriate answers.

What should go in a tarball and what should not?

Is it only the build files, python code, and package data and nothing else?

Should it include tests/ folder?

Should it include development and configuration files?

Have seven published packages which include almost all the files and folders. Including:

.gitignore,

.gitattributes,

.github folder tree,

docs/,

tests/,

Makefile,

all config files,

all tox files,

pre-commit config file

My thinking is that the tarball should have everything needed to maintain the package, but this belief has been challenged. That the tarball is not appropriate for that.

Thoughts?

 

PEP 735 what is it's goal? Does it solve our dependency hell issue?

A deep dive and out comes this limitation

The mutual compatibility of Dependency Groups is not guaranteed.

-- https://peps.python.org/pep-0735/#lockfile-generation

Huh?! Why not?

mutual compatibility or go pound sand!

pip install -r requirements/dev.lock
pip install -r requirements/kit.lock -r requirements/manage.lock

The above code, purposefully, does not afford pip a fighting chance. If there are incompatibilities, it'll come out when trying randomized combinations.

Without a means to test for and guarantee mutual compatibility, end users will always find themselves in dependency hell.

Any combination of requirement files (or dependency groups), intended for the same venv, MUST always work!

What if this is scaled further, instead of one package, a chain of packages?!

 

In a requirements-*.in file, at the top of the file, are lines with -c and -r flags followed by a requirements-*.in file. Uses relative paths (ignoring URLs).

Say have docs/requirements-pip-tools.in

-r ../requirements/requirements-prod.in
-c ../requirements/requirements-pins-base.in
-c ../requirements/requirements-pins-cffi.in

...

The intent is compiling this would produce docs/requirements-pip-tool.txt

But there is confusion as to which flag to use. It's non-obvious.

constraint

Subset of requirements features. Intended to restrict package versions. Does not necessarily (might not) install the package!

Does not support:

  • editable mode (-e)

  • extras (e.g. coverage[toml])

Personal preference

  • always organize requirements files in folder(s)

  • don't prefix requirements files with requirements-, just doing it here

  • DRY principle applies; split out constraints which are shared.

view more: next ›