Hacker Newsnew | past | comments | ask | show | jobs | submit | _flux's commentslogin

From the style of this article I expected that https://github.com/hyprwm/hyprwire and https://github.com/hyprwm/hyprtavern would have documentation, specification and perhaps a bunch of tests, but they're not really there (other than smoke tests).

Those would have been a great starting point as well! But maybe we'll see them later.


I believe the sole author is doing finals for their last year of university at the moment.

tbf they stated in their article that those are not there YET multiple time. We'll wait and see once they're done

Doesn't this just move the bucket: which processes should the OS grant access to that API?

In any case, if the purpose is to make a backup of the system, it seems the possibility to read all and every file as original as possible seems rather critical, in particular if we want to take advantage of e.g. content-based addressing -based deduplication in the backup application. And we in any case want to restore that backup to an empty computer, so there really are no places to hide the encryption keys in such a way that they cannot be read from the backup.


You don't need to backup every file. It's a reasonable compromise to require users to login to their bank again when switching to a new computer.

The key difference is what the GPT outlined: tuples have order for the fields and named tuples are not indexed by the name, but instead a field accessor is used, i.e. foo.bar vs foo["bar"]. In addition namedtuples can be indexed using that order like tuples can (foo[0]), which clearly isn't possible with dicts and would be quite confusing if dict had integer key.

So I think the differences aren't great, but they are sufficient. A frozendict is not going to be indexable by an integer. Python already has an abstract type for this, for mostly the use of type checking I imagine: https://docs.python.org/3/glossary.html#term-mapping

Documentation for namedtuple: https://docs.python.org/3/library/collections.html#collectio...


Wouldn't ref-counting CPython already know that a has a single reference, allowing this optimization without needing any particular smart JIT?

I think GP was talking about optimizing away the O(N) call on the last line. The GC will take care of removing the reference to the old (mutable) dict, but constructing a new frozendict from a mutable dict would, in the current proposal, be an O(N) shallow copy.

There are also potentially other optimizations that could be applied (not specific to dict/frozendict) to reduce the memory overhead on operations like "a = f(a)" for selected values of "f".


First thought: I would very much expect it to be able to do this optimization given the similar things it does for string concatenation.

But actually, I suspect it can't do this optimization simply because the name `frozendict` could be shadowed.


Indeed, the Tcl implementation does this so e.g. `set d [dict] ; dict set d key value` can modify d in place instead of creating a copy (since everything is immutable).

I suppose it would be possible to design the ring so that any pillowing would occur only in outwards expansion.

How much rechargeability really requires from hardware point of view?

I suppose the problem is that there are no standard for tiny magnetic chargers/cables. Every watch comes with their own, and they need be custom designed. For a device this large as much of the charging electronics should be outside the ring.

And another (small?) problem is that you'd need to electrically protect those external pins.


I'm with you, a little pogo-pin connector with all the charging circuitry in the external dongle would add, I don't know, ten dollars to the BOM. Very cool product but I won't buy a gadget I know I'd dispose in two years.

If you really want to do this, you should probably ask for a plan first and review it.

I don't think it would be typical to depend on exception handling when dealing with boundary conditions with C++ containers.

I mean .at is great and all, but it's really for the benefit of eliminating undefined behavior and if the program just terminates then you've achieved this. I've seen decoders that just catch the std::out_of_range or even std::exception to handle the remaining bugs in the logic, though.


Natural language does not have a specification, while both C and assembly do.

The C specification is orders of magnitude more complex and is much less defined than assembly. Arguably, the same could be said comparing natural language with C.

I admit that's mostly philosphical. But I think saying 'C can autogenerate reliable assembly, therefore a specification can autogenerate reliable C' is also about two different problems.


Looking Glass displays (not the "hololuminescent" ones) solve many of the same things (multiple viewers, no glasses) while looking good, and in principle you could build a cube out of them, although the display can't be seen from the full 180 degrees.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: