Readit News logoReadit News
kortex commented on You can now uv run a GitHub gist   github.com/astral-sh/uv/p... · Posted by u/BiteCode_dev
charcircuit · 19 days ago
"uv run" seriously needs a sandbox. Running arbitrary code from arbitrary dependencies with 0 version locking provides no guarantees on what you are actually running.
kortex · 19 days ago
It might be a cool thing for them to provide some kind of container metadata in the `# /// script` block so that e.g. it automatically runs the script in a container.
kortex commented on The death of partying in the USA   derekthompson.org/p/the-d... · Posted by u/tysone
zackmorris · a month ago
Ya I'm shocked by it too, said as a Gen Xer born in the late 1970s, occasionally a Xennial.

I partied for 4 years of college which is something like 30 years in sober adult terms. Our ragers were reminiscent of Animal House and Revenge of the Nerds, all of those old party movies that didn't age well. Scenes from Hackers, Fight Club, The Matrix, Trainspotting, Go, Swingers, Made, 200 Cigarettes, SLC Punk, Dazed and Confused, PCU, even Undergrads (a cartoon) were so spot-on for campus life, living for the weekend. Can't Hardly Wait, American Pie, Varsity Blues, Waiting, Superbad, etc came later, and I almost consider those watered down versions of the feral partying that happened earlier just as the internet went mainstream, but still canon.

A Friday night at my city's bar scene today looks like what our Sunday or Monday was. People half tipsy on 2 drinks, even though they're Ubering home later. The faint scent of ganja now instead of basements filled with smoke and first timers trying laughing gas. Nobody puking or disappearing around a corner to relieve themselves. No sound of bottles shattering. I feel like a curator of a museum now, a derelict from a forgotten time.

In fairness, I went to college in the midwest, where there was nothing else to do. Now the West Coast has effectively legalized drugs, awakening much of the country to the full human experience, and people have done the trips and plant medicine and maybe realize at a young age that alcohol and tobacco are rough drugs that tear you up. Which is admirable, but they also prepare you for getting torn up as an adult. To miss out on learning how to make your way home on drunk logic before you black out seems like a crucial rite of passage has been lost.

And it shows. In our country's embrace of puritanical politics like we saw in the jingoist 2000s, regentrified for the antivax era. In the worship of unspoiled beauty, idolizing of influencers, pursuit of financial security over visceral experience. In the fanboyism, bootlicking and drinking the kool-aid for every new evolutionary tech that cements the status quo instead of freeing the human spirit in a revolutionary manner. I gotta be honest, most of what's happening today is laughable to my generation. Blah I sound like a Boomer. Ok cryable then. We're in mourning. We worry about the kids today. All work and no play and all that. It's killing our souls, and theirs.

I guess my final thought after writing this is that partying is one of the most powerful reality-shifting tools in our arsenal. All of this can't be it. This can't be how America ends. You know what to do.

kortex · a month ago
I had never really considered partying as a reality-shifting tool, but as someone fond of regional burn events, yeah, it totally is.

Humans have partied for aeons. It's not just about letting off steam, it's about building social bonds, it's about traditions and rituals and marking key points in life.

This whole thread makes me rather sad, but in the same breath, makes me feel like there is real, actionable good to be done by promoting and helping run events. Not corporate pay-to-play curated experiences, which keep you on rails and only serve to condition more consumption behaviors, but relatively low cost, volunteer-run, do-it-yourself events. The latter, from my experience, have an absolutely infectious component of wanting to contribute, volunteer, create art, and drag others into the experience. But they are also a lot of work and not everyone is cut out for it.

It really has me thinking about lowering the bar to any sort of experience that gives folks a reprieve from the default world, however fleeting.

kortex commented on uv: An extremely fast Python package and project manager, written in Rust   github.com/astral-sh/uv... · Posted by u/chirau
marifjeren · 2 months ago
Seems a lot of people like this and are happy about it, but I for one am tired of the proliferation of python package management tools.

Many languages have many package management tools but most languages there are one or two really popular ones.

For python you just have to memorize this basically:

- Does the project have a setup.py? if so, first run several other commands before you can run it. python -m venv .venv && source .venv/bin/activate && pip install -e .

- else does it have a requirements.txt? if so python -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt

- else does it have a pyproject.toml? if so poetry install and then prefix all commands with poetry run

- else does it have a pipfile? pipenv install and then prefix all commands with pipenv run

- else does it have an environment.yml? if so conda env create -f environment.yml and then look inside the file and conda activate <environment_name>

- else I have not had to learn the rules for uv yet

Thank goodness these days I just open up a cursor tab and say "get this project running"

kortex · 2 months ago
uv handles most, if not all, of those cases.

> - else does it have a pyproject.toml? if so poetry install and then prefix all commands with poetry run

That's not even correct. Not all projects with pyproject.toml use poetry (but poetry will handle everything with a pyproject.toml)

Just try uv first. `uv pip install .` should work in a large majority of cases.

pipenv is on the way out. bare `setup.py` is on the way out. `pyproject.toml` is the present and future, and the nice thing about it is it is self-describing in the tooling used to package.

kortex commented on uv: An extremely fast Python package and project manager, written in Rust   github.com/astral-sh/uv... · Posted by u/chirau
bunderbunder · 2 months ago
uv is indeed fast and easy. But I'm also finding that the maintainers' efforts to make it work like Cargo mean it can be more difficult to use in more complex project structures. As sensible as Rust's project management ethos is, you're never going to escape Python's underlying design in a Python project, and friction between the two philosophies may not be avoidable.

One possible alternative is Pants. It's also written in Rust for performance, but has more flexibility baked into the design.

kortex · 2 months ago
Pants and uv are two very different tools, with very different use-cases.

uv is basically souped-up pip.

Pants is an entire build/tooling system, analogous to something like Bazel. It can handle multiple dependency trees, multiple types of source code, building and packaging, even running tests.

kortex commented on uv: An extremely fast Python package and project manager, written in Rust   github.com/astral-sh/uv... · Posted by u/chirau
espdev · 2 months ago
> Just a few months back I said I would never use uv. I was already used to venv and pip. No need for another tool I thought

Really? :)

requirements.txt is just hell and torture. If you've ever used modern project/dependency management tools like uv, Poetry, PDM, you'll never go back to pip+requirements.txt. It's crazy and a mess.

uv is super fast and a great tool, but still has roughnesses and bugs.

kortex · 2 months ago
We use uv to compile requirements.txt from pyproject.toml to get the locked versions.

    # Makefile
    compile-deps:
     uv pip compile pyproject.toml -o requirements.txt
    
    compile-deps-dev:
     uv pip compile --extra=dev pyproject.toml -o requirements.dev.txt

kortex commented on Everything Is Down    · Posted by u/daxfohl
Trasmatta · 2 months ago
Down Detector is not accurate
kortex · 2 months ago
When I see a spike in a dozen different services simultaneously, I can be pretty confident something is pretty snafu.
kortex commented on A receipt printer cured my procrastination   laurieherault.com/article... · Posted by u/laurieherault
laurieherault · 2 months ago
That gives me an idea. We could have some kind of random character that comes out with each task from the printer, with different rarity levels. It is an idea that might hook some people and help them stay consistent.

Yes, I have a printer with both RJ45 and USB. I spent a bit more to get that, so I can stay flexible depending on what I want to do with it.

kortex · 2 months ago
"I got a shiny task!"

Absolutely brilliant. It's so stupid (in that it's kind of silly how easy it is to game our mammal brain) but I can absolutely see this giving an extra kick of motivation.

Have you heard of the INCUP model for ADHD? Interest, Novelty, Challenge, Urgency, and Passion. The more factors an activity has, the more drive the ADHD mind has. Rarity system adds novelty and a bit of passion.

Also if you have looked into operant conditioning at all, you know that variable interval reward schedules are the strongest behavior-forming systems (hence, slot machines and every game that act like them).

kortex commented on A receipt printer cured my procrastination   laurieherault.com/article... · Posted by u/laurieherault
laurieherault · 2 months ago
Author here. It’s my first article. I’m a bit nervous but excited to get your feedback. If you deal with procrastination too, I hope this method helps you like it helped me.
kortex · 2 months ago
I love it. Using a thermal printer to print physical tasks you can crumple on completion and throw in a bin is absolute madlad goblin energy and I'm all for it. I think you've actually perfectly distilled the essence of "game-loop" and operant conditioning, and mapped it to the real world. I have been using a whiteboard for tasks, which is better than nothing, but the problem with that approach is the feedback is minor, and once erased, it's like "wtf did I even do this week". So there is limited short-term feedback and zero long-term feedback. You need both the power-up noise and the level progression for a loop to be satisfying.

I have been planning on making a system based on those long scrolls of paper for doodle boards, so at least there is a history, but of course I procrastinated on building the mount for it.

I would love to use your application, I know there's a million to-do apps out there but I get the overwhelm/daunting very easily, so I really appreciate the scope-hiding aspect.

kortex commented on Quarkdown: A modern Markdown-based typesetting system   github.com/iamgio/quarkdo... · Posted by u/asicsp
zzo38computer · 3 months ago
I think Unicode is messy and is not the best way to do i18n and m17n and l10n and a11y and many other things (although there are also problems with existing implementations that do not have to do with the character set, the character set is one of the problems), and I also think that it is not good to insist on using one character set for everything (especially if that character set is Unicode).

UTF-8, UTF-16, UTF-32, UTF-EBCDIC, etc are encodings of Unicode. EUC-JP is not an encoding of a subset of Unicode; it is an encoding of JIS, which is a different character set. The PC character set is not a subset of Unicode; it is the PC character set. Being able to be mapped to Unicode in some cases does not make it Unicode (nor does it mean that these mappings are necessarily "clean", but even if they are, that still wouldn't make non-Unicode character sets to be (subsets of, or even supersets of) Unicode).

kortex · 3 months ago
So how does going back to multiple incompatible character sets help anything?
kortex commented on Understanding the Go Scheduler   nghiant3223.github.io/202... · Posted by u/gnabgib
kortex · 3 months ago
Fantastic writeup! Visualizations are great, the writeup is thorough but readable.

u/kortex

KarmaCake day8225February 1, 2017View Original