throwaway2037
Joined 5 years ago
Joined 5 years ago
> MISSING = sentinel("MISSING")
> def update_email(user_id: int, email: str | None | MISSING = MISSING) -> None:
> if email is MISSING:
> return # nothing to update
> elif email is None:
> db.delete_email(user_id)
> else:
> db.set_email(user_id, email.lower()) # narrowed to str
I see this style frequently from long time Python programmers. The language is so dynamic that people begin to think this is a good way to program. Hot take: It is not. Why not two different functions called delete_email() and set_email()? That would be more clear. > to using the larger screen instead of Mac
I wonder if the Apple product development team considered this canabalisation risk. > Screen ratios make reels-like addictive content less appealing which is great for me
This is interesting feedback! Can share more? Is it not possible to rotate the double screen vertically?What happens to these returned phones?
> lots of tools ship their own CA bundle.
Can you give an example for Homebrew? And did the package maintainer explain why?With the exception of Java, on a modern enterprise Linux box, all packages use the same CA cert pack.
This part was an interesting requirement:
> ssize_t is a POSIX thing so you'd have to define it yourself on windows.
That seems like a lot of mental gymnastics to avoid this very simple macro: > #if defined(_WIN32) && !defined(ssize_t)
> #define ssize_t SSIZE_T
> #endif
Read about the Win32 macro SSIZE_T here: https://learn.microsoft.com/en-us/windows/win32/winprog/wind...To me, this solution is more readable and maintainable:
> for (ssize_t i = count - 1; i >= 0; i--)
> {
> if (haystack[i] == needle)
> {
> *where = i;
> return 1;
> }
> }
> return 0;
Alternatively, you can use a while loop where the condition appears at the end of the loop: > size_t i = count - 1;
> while (1) // true
> {
> if (haystack[i] == needle)
> {
> *where = i;
> return 1;
> }
> if (0 == i)
> {
> return 0;
> }
> --i;
> } > Homebrew ships its own CA bundle
No trolling by this question: Can you explain your decision? I can see some pros and cons of this decision. Was it simply removing dependency upon Apple if there was a disagreement on which CA certs to trust? (You can act without permission from Apple to add/remove CA certs?) Also: How does Homebrew decide which CA certs to include/exclude? Do you get a CA cert pack from Oracle/Mozilla/Google/Microsoft/Amazon/Apple?Outside of an enterprise environment, I never thought about having multiple "golden sources" of CA certs on a single host. (I have no experience working outside of classic enterprise environments, so please do not read my surprise as immediate dismissal of this idea!) For those unaware, in enterprise environments, it is very common to use a common CA cert pack from Oracle/Mozilla/Google/Microsoft/Amazon/Apple, but add 2-5 CA certs from your own company that act as trust roots.
I did some Googling on this matter. It looks like the "Big Four" of CA cert packs are: Mozilla, Microsoft, Apple, and Google. (I guess there is one or two in China also, be leave that alone for the moment.) What happens if they are in disagreement? This is a complex problem! If anyone is involved in this process, I would like to learn more.
... says:
His tweet says: I don't get it. To me, it sounds like he is training a competitor. Do I misunderstand? Is there a Chinese equivalent LLM that he can use instead?Also, give the national security sensitivity around AI/LLMs, I can understand why Anthropic wants to be especially cautious with mainland Chinese researchers, including those from blocked regions (Hongkong, in this case).