Readit News logoReadit News
depressedpanda commented on Gaming on Linux has never been more approachable   theverge.com/tech/823337/... · Posted by u/throwaway270925
ehnto · a month ago
I am seeing that number increasing soon with The SteamDeck and SteamMachine (and clones/home builds). Even the VR headset although niche, is linux.

The support in this space from Valve has been amazing, I can almost forgive them for not releasing Half Life 3. Almost.

depressedpanda · a month ago
There are strong indications that Half Life 3 (or at least a Half Life game) is coming soon. Of course, Valve might decide to pan the project, but I wouldn't be surprised seeing an announcement for 2026.
depressedpanda commented on Your smartphone, their rules: App stores enable corporate-government censorship   aclu.org/news/free-speech... · Posted by u/pabs3
jauntywundrkind · a month ago
I respect PWAs, but they take away so much that I personally want. No address bar, no tabs, no history, no extensions. It's a reversion from the glorious amazing user agency of the web to the sad state that computing had held us victim to for decades.
depressedpanda · a month ago
I have good news for you: if you prefer running a PWA in your browser of choice, you can. Nothing forces you to install the PWA.
depressedpanda commented on Your smartphone, their rules: App stores enable corporate-government censorship   aclu.org/news/free-speech... · Posted by u/pabs3
pbmonster · a month ago
uBlock can stop those, if your device is allowed to have it.
depressedpanda · a month ago
How? Do I need to configure something in uBlock Origin? If I go to, e.g., Reddit I still see the annoying "Open app" button.
depressedpanda commented on Show HN: I built a local-first timeboxing app that never leaves your computer   focusbox.dev/... · Posted by u/akarnam37
depressedpanda · 2 months ago
I am very much interested in local-first/only (backend-less) PWAs, and have built a couple of them myself.

Unfortunately, I don't think I have any use for a time-boxing app. Nice work though.

Is there a reason you went with localStorage rather than indexedDB?

One useful thing is supporting 3rd party sync services. One of the apps I built allowed syncing data across devices via Dropbox. I never got Google Drive working, though, their API was horrible to work with in comparison. Is sync support something you've considered?

depressedpanda commented on KDE launches its own distribution   lwn.net/SubscriberLink/10... · Posted by u/Bogdanp
wraptile · 3 months ago
> Operating systems feel like a solved problem

Even desktop environment is not solved. I'm typing this from a relatively new metod of displaying windows - a scrolling window manager (e.g. Karousel [1] for KDE). It just piles new windows to the right and it infinitely scrolls horizontally. This seems like a minor feature but changes how you use the desktop entirely and required a lot of new features at operating system level to enable this. I wouldn't go back to a desktop without this.

The immutable systems like NixOS [2] have been an absolute game changer as well. Some parts are harder but having an ability to always roll back and the safety of immutability really make your professional environment so much easier to maintain and understand. No more secrets, not more "I set something for one project at system level and now years later I forgot and now something doesn't work".

I've been on linux desktop exclusively for almost 15 years now and it has never been as much fun as it is today!

1 - https://github.com/peterfajdiga/karousel

2 - https://nixos.org/

depressedpanda · 3 months ago
Nifty.

I've long wanted a scrollable/zoomable desktop, with a minimap that shows the overall layout. Think the UI of an RTS game, where instead of units you move around and resize windows. This seems like something in that direction, at least.

How does Karousel work with full screen applications, e.g., games?

depressedpanda commented on Unexpected productivity boost of Rust   lubeno.dev/blog/rusts-pro... · Posted by u/bkolobara
socalgal2 · 4 months ago
That is not a repo of the code in the article. The article's code is effectively

    set_href('/foo');

    let future = doSomethingElse()
    block_on(future)

    if (some_condition) {
        set_href('/bar');
    }
This code makes the bug clearer. doSomethingElse is effectively allowing the page to exit. this would be no different in many apps, even in rust.

The browser does not start a process when you set `window.location.href`. It starts a process after your code exits and lets the event loop run other tasks. The `await` in the example code is what allow other tasks to run, including the task to load a new page, (or quit an app, etc..) That task that was added when you set `window.location.href`

If that's not clear

    // task 1
    window.location.href = '/foo' // task2 (queues task2 to load the page)

    let content = await response.json(); // adds task3 to load json
                                         // which will add task4
                                         // to continue when finished

    // task4
    if (content.onboardingDone) {
        window.location.href = "/dashboard";
    } else {
        window.location.href = "/onboarding";
    }
task2 runs after task1. task1 exits at the `await`. task2, clears out all the tasks. task3 and task4 never run.

depressedpanda · 4 months ago
No, I think you misunderstand how it works. The problem is that task 4, as you call it, runs after the navigation triggered by the redirect value.

The the author expects the side-effect -- navigation to a new page -- of the window.location.href setter to abort the code running below it. This obviously won't happen because there is no return in the first if-statement.

depressedpanda commented on A German ISP changed their DNS to block my website   lina.sh/blog/telefonica-s... · Posted by u/shaunpud
zosima · 4 months ago
Russia has attacked Ukraine. Not Europe.

Neither Ukraine nor Israel is part of EU or NATO.

depressedpanda · 4 months ago
> Russia has attacked Ukraine. Not Europe.

Ukraine is most definitely a part of Europe.

depressedpanda commented on 4chan will refuse to pay daily online safety fines, lawyer tells BBC   bbc.co.uk/news/articles/c... · Posted by u/donpott
FirmwareBurner · 4 months ago
> AIUI, the UK is a democracy and these policies are generally supported by the voters.

When were UK citizens polled on these policies before politicians started enforcing them? And I think after Brexit, the UK government learned never to ask the opinions of their citizens again, because they will vote in direct opposition of the political status quo out of sheer spite of their politicians.

There are huge flaws with our current democratic systems: like sure we can vote, but after the people we vote for get into power, we have no control over what they do until next election cycle. So you can be a democracy on paper while your government is doing things you don't approve of.

Most people I talk to in the west, both here in Europe and in North America, don't seem to approve of what their government is doing on important topics, and at the same time they feel hopeless in being able to change that because either the issues are never on the table, or if they are, the politicians do a 180 once they get voted to power or forget about them because political promises are worthless and non-binding, meaning they lied themselves into power.

So given these issues ask yourself, is that really a true democracy, or just an illusion of choice of direction while you're actually riding a trolly track?

depressedpanda · 4 months ago
> the politicians do a 180 once they get voted to power or forget about them because political promises are worthless and non-binding, meaning they lied themselves into power.

Why is this allowed? Why aren't there laws in place to hold politicians accountable for the promises they make to get elected?

depressedpanda commented on Scientists just found a protein that reverses brain aging in mice   sciencedaily.com/releases... · Posted by u/stevenjgarner
trhway · 4 months ago
quick reading on that protein suggests to me, a layman, that more aerobic exercise and less red meat should be helping here against such a brain aging. Sounds so familiar.
depressedpanda · 4 months ago
How is red meat connected to it?
depressedpanda commented on Crimes with Python's Pattern Matching (2022)   hillelwayne.com/post/pyth... · Posted by u/agluszak
quotemstr · 4 months ago
> > While potentially useful, it introduces strange-looking new syntax without making the pattern syntax any more expressive. Indeed, named constants can be made to work with the existing rules by converting them to Enum types, or enclosing them in their own namespace (considered by the authors to be one honking great idea)[...]

Yeah, and I don't buy that for a microsecond.

A leading dot is not "strange" syntax: it mirrors relative imports. There's no workaround because it lets you use variables the same way you use them in any other part of the language. Having to distort your program by adding namespaces that exist only to work around an artificial pattern matching limitation is a bug, not a feature.

Also, it takes a lot of chutzpah for this PEP author to call a leading dot strange when his match/case introduces something that looks lexically like constructor invocation but is anything but.

The "as" thing works with primitive too, so why do we need int(m)? Either get rid of the syntax or make it general. Don't hard-code support for half a dozen stdlib types for some reason and make it impossible for user code to do the equivalent.

The Python pattern matching API is full of most stdlib antipatterns:

* It's irregular: matching prohibits things that the shape of the feature would suggest are possible because the PEP authors couldn't personally see a specific use case for those things. (What's the deal with prohibiting multiple _ but allowing as many __ as you want?)

* It privileges stdlib, as I mentioned above. Language features should not grant the standard library powers it doesn't extend to user code.

* The syntax feels bolted on. I get trying to reduce parser complexity and tool breakage by making pattern matching look like object construction, but it isn't, and the false cognate thing confuses every single person who tries to read a Python program. They could have used := or some other new syntax, but didn't, probably because of the need to build "consensus"

* The whole damn thing should have been an expression, like the if/then/else ternary, not a statement useless outside many lexical contexts in which one might want to make a decision. Why is it a statement? Probably because the PEP author didn't _personally_ have a need to pattern match in expression context.

And look: you can justify any of these technical decisions. You can a way to justify anything you might want to do. The end result, however, is a language facility that feels more cumbersome than it should and is applicable to fewer places than one might think.

Here's how to do it right: https://www.gnu.org/software/emacs/manual/html_node/elisp/pc...

> If needed, the leading-dot rule (or a similar variant) could be added back later with no backward-compatibility issues.

So what, after another decade of debate, consensus, and compromise, we'll end up with a .-prefix-rule but one that works only if the character after the dot is a lowercase letter that isn't a vowel.

PEP: "We decided not to do this because inspection of real-life potential use cases showed that in vast majority of cases destructuring is related to an if condition. Also many of those are grouped in a series of exclusive choices."

I find this philosophical stance off-putting. It's a good thing when users find ways to use your tools in ways you didn't imagine.

PEP: In most other languages pattern matching is represented by an expression, not statement. But making it an expression would be inconsistent with other syntactic choices in Python. All decision making logic is expressed almost exclusively in statements, so we decided to not deviate from this.

We've had conditional expressions for a long time.

depressedpanda · 4 months ago
Agreed.

After starting my new job and coming back to Python after many years I was happy to see that they had added `match` to the language. Then I was immediately disappointed as soon as I started using it as I ran into its weird limitations and quirks.

Why did they design it so poorly? The language would be better off without it in its current hamstrung form, as it only adds to the already complex syntax of the language.

> PEP: In most other languages pattern matching is represented by an expression, not statement. But making it an expression would be inconsistent with other syntactic choices in Python. All decision making logic is expressed almost exclusively in statements, so we decided to not deviate from this.

> We've had conditional expressions for a long time.

Also, maybe most other languages represent it as an expression because it's the sane thing to do? Python doing its own thing here isn't the win they think it is.

u/depressedpanda

KarmaCake day960July 27, 2017View Original