skysight-inc/HackerNews huggingface dataset:
Python type hints are such a huge boon to the language.

I worked in what I would imagine was a pretty typical mature medium-size python codebase.

Typically, it was never too hard to figure out what a type was. Sometimes types were passed through several layers of functions and had the same short variable name through all of them - quite a few times I had to click around quite a bit to figure out what "f" was. Especially when I could infer it was some kind of file-ish thing but whether it was a file object, a string, or some composite type that held one of the two as a member, or what?! was sometimes difficult to determine, especially if the actual use of the parameter wasn't immediately obvious either.

When we updated to python 3, I started leaving type hints both in old code as I answered these questions for myself and new code as I created what otherwise would've been new questions for my future self. And I noticed two things happened:

* annoyance went down as I fixed the most well-trod of these problems

* I became less averse to using slightly more complicated types

I think python pushes you to keep things really simple and not use custom types unless really necessary. This is, overall, good? I do think Java developers, for instance (of which I consider myself one), generally reach to create datatypes that are basically just a simpler wrapper or a 2-tuple of collections or other primitives, and it can make the code a bit annoying to grok.

But the trouble is, in un-type-hinted python, I already start getting nervous about things like: [('2022-03-18', "something"), ('2022-03-19', "something else")]. And if your data content doesn't make it obvious (or at least somewhat guessable) what it is, it can make it hard to grok in a slightly worse way than the Java code would be.

In python 2 I'd usually make a namedtuple in these situations, but oftentimes I felt a bit weird there because I'd usually reach for it in lightweight situations when I feared they were becoming more complex.

But finally, in python 3, I feel like I'm generally happy with, in this order:

1. just use plain primitive types. no type hints. we all know what's in dates = ['2022-03-18'].

2. just use a type hint. I feel better about a Tuple[str, Dict[int, int]] if it's type hinted than not.

3. Use a namedtuple. This puts names onto the fields. so maybe my Tuple[str, Dict[int, int]] becomes a MyEntry(token: str, settings: Dict[int, int]) or something.

4. use a fully-fledged custom data type class.
I've been looking for something like this, but it seems to be missing a crucial feature: automatic SDK generation. Writing and maintaining SDKs is a lot of work for a small team. Great documentation is one part of a good developer experience, the other one is creating easy-to-try SDKs. Is this on the roadmap?
I'm not against forks of Firefox but because the browser is one of the most important pieces of software in terms of security, I am unwilling to just jump onto a someone's fork without knowing and trusting their foundation/group...that takes time.
C++ Basics: Pointers vs. Iterators
One decades here. Stopped after that ;)
I wonder how much of our government's deep embrace of corn subsidies might have something to do with the fact that the Iowa Caucuses play such an outsized impact on our presidential elections. That, and how the Midwest has become more and more of a purple battleground region. I know it's not the biggest factor, but I can't help but think it has something to do with it.
Right. There's often a tension between features and ease of use.
This could easily be an iMac Lite, if Apple was amenable to it.
The Bank of England did what it was told - the Conservative Government's were intent on maintaining Sterling within the European Exchange Rate Mechanism currency band (a precursor step to harmonizing currencies into what would become the Euro). This was what allowed Soros to endlessly short the pound.
Alder lake's AVX-512 comes with a significant asterisk. It's only in the P-cores (so can only be turned on if you disable the E-cores), isn't officially supported, and can't be turned on in some motherboards IIRC.

We should be seeing better AVX-512 support with CPUs in the coming years though.
Christopher Alexander Has Died
Christopher Alexander was the author of A Pattern Language, The Timeless Way of Building, and many other architecture books. His work has influenced Computer Science through the idea of design patterns, games by being the main inspiration for SimCity and also influencing Spore, among many other contributions.
Here's a tweet from an account dedicated to his book a pattern language about his passing: https://twitter.com/apatterntolearn/status/15048528809641328...
Definetely one of the giants of the last century, may his memory be a blessing.
I cancelled the other month on impulse, to see if I'd miss it.

The initial wording implied that by cancelling I'd be giving up the remaining duration I had already paid for. After closing that window and starting the process again, I got different wording that made it clear I would keep access until the renewal date. Scumbags.
Fork itself alone is enough since it implies they are not part of the original team. When they put "independent fork" which changes the meaning/intents, I would believe that they means they are forking Firefox and the original code will not the same or something.

This is my assumption/observation that the owner or the members of this forked project is majority ESL. I would understand why they said independent fork because it made sense to them, however it implies different than "fork" alone.
It's not a mod, but as far as I know they simply do not distribute the sprites and content themselves.
While this is a part of the terrible UI/UX of the Kindle, I highly doubt it is for keeping the ad up to date as it this is also the way it exists on ad-free Kindles. Kindle have just always had fairly poor interface decisions.
There's only thing I want.

Let me whitelist a computer/installation to not require 2FA all the time. Blizzard's battle.net client does this and it's wonderful. I only have it installed on a non-movable tower computer at home. Not a laptop that can be stolen or that I might forget somewhere. It doesn't even matter that I value the contents of my Blizzard account less than credentials to some website, because there's a checkbox to "remember this account". I don't often have nothing but praise for a feature (or for Blizzard) but this is THE BEST. I would 100% enable that for some websites. I think Github is the other good citizen where I can usually do all my stuff and only need my yubikey once per week. And even then, touching the yubikey is 10x less work than fumbling with an OTP app on my phone.

I want security and convenience, and I think it is possible.
Don't worry a competitor will quickly swoop into the market and offer such an alternative, forcing Amazon to decouple these services, improve their video streaming or reduce bundled costs. They are in no way in a monoplistic type situation with such high barriers to entry that competition doesnt regulate them. /sarcasm
I'd be happy if something with the priorities Librewolf advertises here becomes to Firefox as Libreoffice is to Openoffice. Firefox needs forking, and I think that people are shopping for a project manager who they trust more than Mozilla's CEO.

I haven't seen one in other Firefox forks and I hope this one does better. Please don't get into online flamewars with people or other projects (including Firefox), try to contribute upstream, accumulate good developers. You can change your priorities, but never change your values. They're foundational, so when they shift, it ripples throughout the product, making the entire thing erratic and undependable. People have enough in their lives to worry about.
Plenty of examples of NPM packages being taken over:

* https://www.whitesourcesoftware.com/resources/blog/npm-packa...

* https://medium.com/@alex.birsan/dependency-confusion-4a5d60f...

* https://blog.sonatype.com/npm-project-used-by-millions-hijac...

* https://checkmarx.com/blog/attackers-write-bugs-as-well/

When was the last time you audited all of the libraries a SPA depended on? If it was during the last build, congrats, you're doing great.

Lots of times it isn't automated and can be neglected, though.
How do you define volatility? How can a market weighted index of the top 500 publicly listed US companies be more volatile than a single company? Which itself is 25%+ invested in a single other company and then the rest spread out over a handful of other companies.

Edit: also, BRK’s outsize AAPL investment is the only reason BRK is even close to keeping up with SP500 index.
According to that link, Zen 4 will only have a very limited kind of AVX-512 instructions, for working with half-precision floats. It won't even have the base AVX-512 instructions (the F set).
I have never been able to figure out the intent of random slow loris attacks I’ve seen and mitigated on small networks I’ve worked on. It’s just random IPs connecting to the webserver for no reason other than to jam it. It’s not even a competition thing it’s like having a super soaker full of superglue and just spraying it up in the air blindfolded.
Honestly I lost all faith in humanity’s ability to adhere to security protocols the day that (as a young tacker, and after me explaining why he shouldn’t ever do so) the senior manager at the place I was working told me his password over the phone because it was easier than me walking him through a reset procedure.
A lot of the posts and comments I see on here are made by people in the dangerous phase between becoming interesting in markets and actually having experience.
“To cancel your membership please send an email to $larger_factor@amazon.com, where $larger_factor is the largest prime factor of 25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784406918290641249515082189298559149176184502808489120072844992687392807287776735971418347270261896375014971824691165077613379859095700097330459748808428401797429100642458691817195118746121515172654632282216869987549182422433637259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133844143603833904414952634432190114657544454178424020924616515723350778707749817125772467962926386356373289912154831438167899885040445364023527381951378636564391212010397122822120720357“
"Special offer: 3 Months for 75% Off!" [CONTINUE] [cancel anyway]
So you mean local bottling at each store with standard bottles? I like the idea, but the challenges are quite tough.
- No branding/consumer information possible on the bottle
- carbonized beverages can‘t just be poured in free air like juice or milk, a large facility is needed
- beverage stores would have to pump dozens of different beverages through one machine, that would always mix a little bit of the last filling
- that facility must follow strict hygiene requirements which makes it expensive
I literally canceled right now and had to confirm several times navigating identical non-cancel buttons, scrolling past several promotions that made it look like the process was over (like the ads at the end of an article) to find one of the confirmations.

I mean it’s ok if you read everything expecting it to be a horrible process. There’s a lot of “if” you cancel instead of you “have” cancelled that provide hints you aren’t done yet.

Fuck Amazon.
Anybody swears by Pytype? I'm puzzled by it existing between MyPy(static) and unit tests (dynamic).
Yeah if it doesn't have a hard off internet/bluetooth switch I don't want it. I don't want some hacker-ish kid next door pwning it in 5 years when the manufacturer no longer updates, I don't want to have to load security updates on my toaster. I just want to push the thingy and then the thing happens. All my kitchen appliances are 15 years old, 5 years old when I bought the house.
You can't hit those 401k numbers without employer cooperation (e.g. being self-employed)... I don't think it's reasonable to say that someone paying the $20,500 annual max isn't maxing it out.

> For example a Series-I bond ... current rate is 7.12%

Entirely from the variable part-- their fixed rate is 0% right now, and since the interest is taxed when you close the bond, this is an investment that is guaranteed to under-perform inflation (even if you don't believe their variable rate systematically understates real inflation).
Grains raised for animal feed or producing ethanol are commonly unfit for human consumption. Every crop is highly optimized for its intended end use. You can't take existing corn stocks beyond what is currently used in food and convert it into food, the varieties planted are not meant to be eaten by people. The supply chain that supports these crops is also optimized with assumptions about the end purpose.

It would be possible to re-plant that land with edible crops but it is not fast or simple.
What an obviously unreasonable position
Correct, yes, I subscribe to the Firebase Cloud Firestore events and update a Svelte store whenever something changes. This way I only need to set up the connections once and every Svelte component can just subscribe to updates to the store.

Writing is more challenging, I haven't found a nice solution so I resort to making calls with the Firebase SDK directly (but those updates are then surfaced nicely again through the store).
And how do you think social security works? You either have a prefunded model, which has to still invest in something (ie. stocks), or a pay as you go model, which is essentially taking money from our children to fund our retirement.
When I’ve had keyboards with numpads, I never used them. Unless one is entering long strings of numbers, the top row is a much easier.
I do need arrow keys for navigation while reading, though.
I find the purple on black to be too low contrast for my eyes and setup.
My mom is pretty adept with her iPad. If she was instructed to download an app, load it, and then stand in the kitchen after doing the button-push on the microwave, it would be completely within her ability. She knows what a wifi network is, she knows the password for hers. She is definitely slowing down a bit with age, but she rarely requires me to come over and help her with such things, at most she just asks for more confirmation these days before she says yes to a prompt.

That last part could also be because I harp on it every time the topic comes up, that under no circumstances should she be answering yes or ok to any random prompts that she isn't very familiar with already, and please call me if she's at all questioning the legitimacy of what she sees.
Ansible in a git repo for the system configuration

Dotfiles with dotbot in a git repo to manage my user configuration.

I've used a few dotfiles managers and this one required the least amount of bootstrapping for me. Needing to install stow or yadm is extra steps I could have the computer do for me

The ansible repo is a submodule in the dotfiles repo because I'm too lazy to pull it separately.
SIMD lines are just a miniaturization of older vector processors as co-processors, a-la CRAY in a box.

As an HPC sysadmin and scientific software developer/researcher, I can confidently say that SIMD can provide real performance gains, however there are trade-offs and decisions to be made.

- First of all, SIMD is very data-hungry. You either need to constantly push data into it, or modify the data you've pushed a lot. Otherwise you just sit.

- Then there comes power and frequency penalty. In Intel's case, it needs humongous amount of power in CPU budget terms, and it creates heat and slowdowns. So you have to test your code with SIMD or without it (-mtune, -march, etc.). If your code is as speedy or faster, use SIMD.

- Moreover, you can't just compile an extremely optimized binary and fan it out. Older processors will just throw "illegal instruction" and halt. You either will provide multiple binaries with specific optimizations for each, or lowest common denominator for a vendor (AMD binary and Intel binary), or just throw all out. The best way is giving the source out and providing a simple makefile to let the researcher/user compile it, but not all code is open, one may guess. Creating a universal with multiple code paths is also possible, yet needs a lot of elbow grease, and may not be always optimal.

- Lastly, your code don't have to be embarrassingly parallel to be able to use SIMD. Matrix/linear algebra libraries like Eigen can almost abuse the processor's all units when compiled with correct flags (-O3, -mtune=native, -march=native). However, if you want to accelerate small data with SIMD, you need to create a parallel loop which needs to saturate SIMD pipelines. Which OpenMP can easily do with parallel_for.

All of this doesn't change that SIMD is a special horse which can't run in all courses, however its not useless.
One of the things that I'm trying to say in the article, though, is that it's not super helpful to lump all blockchains together.

Bitcoin is an impossible-to-dislodge behemoth that in my opinion fails to meet its original goals and has had ample chance to prove its worth, but has largely failed to do so.

Stuff like Solana is still "wasteful" in the sense that leaving a Digital Ocean droplet running in an infinite loop is wasteful, but it's on such a different order of magnitude that it certainly deserves a chance to prove its worth. It's also had much less time to do so than Bitcoin.

As mentioned above: I'm a noob at all of this and reserve for myself the right to flip-flop in the future :-)
Sustasis Foundation –Tools for Transition
and instead, they move to a totally untested unknown fork like LibreFox who is ran by who exactly? Almost sounds like an intelligence operation.
I've used python typing heavily at work and was really useful to detect bugs and helped with developement.

> as evidenced by only 15% of repos passing mypy

That is no evidence. Of course, if you don't have mypy in CI (or pre-commit hooks or whatever), your repo will not pass mypy. But if you have it in CI, then you can rely on them being correct.

> tools like pytype or mypy will never capture all the complicated hacks possible

But they can either enforce everything being correctly typed (if you go to really strict settings), or yes, you will have some code untyped, so you will be careful around that part. It's not like all or nothing.
I use Ubuntu and used to format pretty often (I used to like restarting from scratch every now and then). My approach is keeping the old OS partition and copying data from there when I need them, configurations included. I like this approach because in this way I automatically trash stuff that I added but that I don't need anymore.
I use Nix + home-manager and keep my config in a git repository. Of course, that is less ideal if I need to use a machine on which I can't install Nix.
Ah yes with enough gymnastics one could end up in a paperclip maximiser situation.
I was about to reply something similar but your comment totally covered me.

NPM had some thoughts about providing package.json metadata in order for the customers to know the author intentions but I am not sure what happened to it.

I remember reading about it in this article: https://www.theregister.com/2020/10/28/nodejs_15_michael_daw...

> The [module] maintainers are struggling," he said. "They may have written a module, it was a
hobby they did on a weekend, now they've got 20,000,000 downloads and the people who are
using it
> have expectations which are more than what > is appropriate for something that
they're getting for free. We've worked on something that we call package support which is
adding extra metadata to
> the package JSON, which allows the maintainer to provide information
about their intention in terms of support. So what kind of support is there? Is it best effort? Is there no support at all? Is there
> a company? Is it part of a foundation?

- Michael Dawson
The reasoning here is so tribal, myopic, and US politics centered.

The Chinese Communist Party (not to be confused with the 91% of Chinese humans who aren't able to join it or participate in their own governance) is allied with Russia in this war. As reported by the New York Times, the CCP met with US leadership a few months ago regarding the coming invasion of Ukraine by Russia. They immediately left the meeting and shared all of the details with Putin's deputies. That's NOT the behavior of an ally, that's what enemies do.

The CCP is helping to prop up the Russian economy as well. They have bought up massive amounts of Russian assets, offered alternative banking/financial structures to offset sanctions, and are engaged in deals to purchase Russian energy exports on the cheap that are being blocked by EU/US sanctions.

The CCP (ignore all debate about a lab leak) deliberately attempted to minimize and hide the existence and severity of COVID from its own people outside of Wuhan. That is, after all, what authoritarian governments always do when a domestic crisis emerges, until they can't hide it anymore. The side-effect of hiding it from their own people was that they hid it from the world when the spread could have been halted. Flights continued out of China all over the world, and a virus that could have been contained was not.

The well over 900 million Chinese human beings who are not part of the CCP are the biggest victims of the Chinese government, and the rest of us are collateral damage. The idea that the CCP is not an enemy is absurd to anyone who has actually travelled to or lived in China and heard the common, everyday and casual jingoism and deliberate agitprop that the CCP unleashes and fans in the everyday population towards the US specifically and the West in general.

To the myopic, inward-focused partisans in the US, all talk of this reality is labeled as racially motivated. While a minority of that sentiment is certainly racially motivated, most is not. Most are simply based on the realities of President Xi being as bad as Putin (say what you want, but banning Winnie the Pooh was not the mark of a normal human being in a position of leadership) and the CCP's control of a massive, technologically superior nation-state.
“If it hadn’t been exploited by this person, someone else would have”

I’ve only ever heard this line of reasoning used to justify something unethical.

And in the case of software, we don’t admire the black-hat hackers that take advantage of exploits, do we? In fact, in that case it’s not even legal…
It is a linguistic maze. The readership here is literate and even we endure mental strain navigating this viper's nest. I've went to buy a paperback and found myself signed up with Prime with just one wayward click, and I was being very cautious.

Now imagine how it is for those less familiar with letters. How many folks only notice they've a Prime subscription when the montly bank statement arrives?

It's a shame. I used to think so highly of Amazon.
There is plenty of hate for the Koch Brothers, and they are Jewish too. It's just fashionable to hate a billionaire who finances "the other side" imo. And it's hard to deny Soros is very politically active with his money, probably more so than your average billionaire, just like the Koch brothers are.
The EU countries here include intra-EU imports.

When looking at EU level, trade looks fairly balanced:

https://ec.europa.eu/info/sites/default/files/food-farming-f...
> running codes / features without your knowledge (it's opt-out but only if you know what to opt-out of) and now even bundling adware into the browser.

I'm unfamiliar with these last two things. What code do they run? And what adware?
I think I agree that Prime by itself is not worth it. But if you get the credit card, the extra cash back on $4,500 worth of purchases on Amazon makes it pay for itself. This is being extremely generous by pretending you can get 2% with another card. Personally, even comparing with local stores and buying the cheaper option, it pays for itself. Then there is cyber Monday where I basically get all the Christmas gifts which add up real quick. Plus, I really like not having to minimum spend to get free delivery.