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

I was confused by this at first since `&T` clearly allows aliasing (which is what C's `restrict` is about). But I realize that Steve meant just the optimization opportunity: you can be guaranteed that (in the absence of UB), the data behind the `&T` can be known to not change in the absence of a contained `UnsafeCell<T>`, so you don't have to reload it after mutations through other pointers.

Yes. It's a bit tricky to think about, because while it is literally called 'noalias', what it actually means is more subtle. I already linked to a version of the C spec below, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf but if anyone is curious, this part is in "6.7.4.2 Formal definition of restrict" on page 122.

In some ways, this is kind of the core observation of Rust: "shared xor mutable". Aliasing is only an issue if the aliasing leads to mutability. You can frame it in terms of aliasing if you have to assume all aliases can mutate, but if they can't, then that changes things.


I think it makes some sense to allow leeway for intelligent "signal processing" using AI (separating out individual tracks, clean-up, etc) vs generating new content with AI.

Similarly, say, for video editors, using AI to more intelligently rotoscope (especially with alpha blending in the presence of motion blur - practically impossible to do it manually), would be a great use of AI, removing the non-creative tedium of the process.

It's not clear where the line is though. I was quite impressed with Corridor Crew's (albeit NVidia+Puget-sponsored) video [1] where they photographed dolls, motion-captured human actors moving like the dolls, and transferred the skeletal animation and facial expressions to those dolls using GenAI. Some of it required nontrivial transformative code to accommodate a skeleton to a toy's body type. There's a massive amount of tedium being removed from the creative process by GenAI without sacrificing the core human creative contribution. This feels like it should be allowed -- I think we should attempt to draw clearer lines where there are clearly efficiency gains to be had to have less "creative" uses be more socially acceptable.

[1]: https://youtu.be/DSRrSO7QhXY


It may be a tedious job to spend days rotoscoping but I personally know people who get paid to do that, and as soon as AI can do it, they will have to go find other work (which they already do, on the side, because the writing is on the wall, but there's a ton of people worldwide who do this kind of work, and that's not the only process being delegated to AI).

So, I'm not pretending that certain kinds of jobs aren't going to be obsoleted. Lots of responsibilities went by the wayside as a lot of things were automated with technology and algorithms - I mean, this is not just an AI thing. But I also see it as many people not even executing certain creative visions that would be out of reach due to the mechanical (not creative) cost of doing things. That's where Jevons Paradox really shines and I do think that's where the explosion will happen. Of the (very few) people I know who do editing and have to rotoscope, rotoscoping is one of the things they really don't enjoy, but they do it anyway.

That's why we don't use machine to dig ditches, we use spoons, because this planet is a work program.

We also used to pay people to manually copy books. It's not a good argument.

Can people register a subdomain of fl.us willy-nilly though? Isn't the root domain owned by the state?


From the RFC (note the "or businesses"):

   Name Space Within States:
   ------------------------

   "locality" - cities, counties, parishes, and townships.  Subdomains
   under the "locality" would be like CI.<city>.<state>.US,
   CO.<county>.<state>.US, or businesses. For example:
   Petville.Marvista.CA.US.

   "CI" - This branch is used for city government agencies and is a
   subdomain under the "locality" name (like Los Angeles). For example:
   Fire-Dept.CI.Los-Angeles.CA.US.
So you'd be counting on the sub-registrar of jacksonville.fl.us not to allow a registration for the fraudulent "business" of Sheriff, Inc. -- multiplied by every municipality across the country.


If the past is any indication, it's more likely that it'd get reset to "Office One".


Knowing the vendor, it’s Office Series X.


Office X series X 2


Office Forever


Agreed about POP Shop being slow. I recently learned that they were working on its replacement: "COSMIC store" (written in Rust + Iced), and it's super-fast. You can try it with `sudo apt install cosmic-store`.


Reference counted pointers can deference an object (via a strong pointer) without checking the reference count. The reference count is accessed only on operations like clone, destruction, and such. That being said, access via a weak pointer does require a reference count check.


This sounds different from common refcounting semantics in other languages, is it really so in Swift?

Usually access increases the reference count (to avoid the object getting GC'd while you use it) and weak pointers are the exception where you are prepared for the object reference to suddenly become invalid.


> Usually access increases the reference count

Taking shared ownership increases the reference count, not access.


When you have a strong pointer, you already have a positive ref count. Only once the strong pointer is destructed, is the reference count decremented.


And also the issue with checked exceptions is that one can't be generic over the checked exception, at least in Java. So it's impossible to write out a universally useful function type that's strictly typed on the error. This definition of `ThrowingFunction` for Java [1] needs just have `throws Exception`, allowing just about anything to be thrown.

Most functional-inspired languages would just have a single `f: T -> Result<U, E>` interface, which supports both (1) a specific error type `E`, which can also be an uninhabited type (e.g. never type) for an infallible operation, and (2) where `U` can be the unit type if the function doesn't return anything on success. That's about as generic as one can get with a single "interface" type.

[1]: https://docs.spring.io/spring-framework/docs/current/javadoc...


There are further bugs:

`for path in paths`

should be

`for (const path of paths)`

JS will immediately error on the lack of parens, but the `in` vs `of` iterates over indexes, not values, and those indexes are unfortunately converted to strings (since `for-in` is object field-name iteration). So even TypeScript would not have caught it when the (stringified) index is used as the first argument of `fs.watch()`.


I've found this to be a common Americanism, but it's still incorrect, I believe. When I moved to the US in my teens, I was surprised at the sheer disregard of English grammar rules in common vernacular here, to the point that some folks (though not my English teachers) think their incorrect use is correct. :) The most marked case I saw was in a Dodo video where the person correctly said "lying", but The Dodo's captions "corrected" it to "laying".

But I digress.


The fun thing about grammar is if enough people do it and think it's correct, it's correct. Languages change.


Linguistics should seek to be descriptive rather than prescriptive. The field should, primarily, seek to describe language as used. Prescriptions can be useful and should be made if they improve a language's ability to provide clarity (please mind the theirs and toos, and sometimes an Oxford comma would clarify your sentence) but they should be held to be mere suggestions and not authoritative mandates.

The idea that there is only one correct way to use a language and that it is determined in academic circles and should be enforced on the masses is inherently based in illegitimate authority and social exclusion and is not a social force for good.


Languages evolve over time. Someone's rules from 200 years ago need not apply, just as they likely didn't apply 200 years prior to that.


I could care less about your explanation!

> When I moved to the US in my teens, I was surprised at the sheer disregard of English grammar rules in common vernacular here, to the point that some folks (though not my English teachers) think their incorrect use is correct.

You noted a common feature of incorrect Americanisms, which is that many of its speakers proudly and ignorantly proclaim their usage is correct. Disregarding descriptive linguistics, all it takes is one second of logic to realize why an incorrect saying doesn't make sense at all, but even that is asking for too much without getting into an argument sometimes.


> I could care less about your explanation!

Maybe you should care less about it then.


bait?

It's *couldn't care less my dude


Maybe reconcile in your mind the first line with the follow-up explanation to see whether it's bait or not and if it should be taken seriously.


Major subsidiaries within a large company can and do have separate CEOs. For example, YouTube also has a separate CEO (previously Susan Wojcicki, and now Neal Mohan) under Sundar Pichai.


It’s also common within Microsoft. I can’t speak to when/why they decide to do it, but the leads for the Microsoft Gaming (Phill Spencer) and LinkedIn [acquired 2016] (Ryan Roslansky) are both CEOs in the org chart at Microsoft.


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

Search: