> A version of this that uses tree sitter grammars to map a codebase, and does it on every startup of an agent, would be awesome.
This was a key feature of aider and if you're not inclined to use aider (or the forked version cecli) I think a standalone implementation exist at https://github.com/pdavis68/RepoMapper
It's because `a` is not a pointer to the result of badfunc; it is a copy. So the return value of `badfunc` might be overwritten if func2 is non-trivial, but the copy will not.
I think that when you find arguments that GC can be competitive with manual memory management, they always rely on the assumption that it is in the context of idiomatic code. For a GC language, idiomatic code allows the use of a generational collector which can automatically operate in a manner similar to an arena allocator. I suppose this is a matter of opinion, but I think that using arena allocators in a language like c++ is not strictly idiomatic - you should only add them when you find they are required for optimisation, and they have a cognitive overhead. If you make the wrong choice with your arena allocator then either you can make performance worse or you can introduce memory safety problems.
So this is the way that a GC might be competitive with manual memory management - if the benefit of arena-like allocation offsets the additional tracing performed by the GC.
Absolutely, but I think the "in most cases" of the original quote was meant to imply simple malloc/free style memory management rather than the use of tailored arena/region allocators.
As far as it goes I think it is a pretty fair statement. However it is important to know of other decisions in the language which make it easier for the GC. Particularly, the use of tagged values and a GIL. Tagging makes it simpler to distinguish heap values from other values, and the GIL means that the GC does not need to operate concurrently.
To get :cd to behave more like vim, you could add https://github.com/gbarta/evil-noautochdir which in addition to behaving like :set noautochdir, also allows :cd to take an argument the vim way.
Relating to #3, if you expect to be overseas long term and you are in a situation where foreign tax credit will cover your US tax liability, it can be advantageous to use the foreign tax credit instead of the FEIE even if your income is less than the ~100k FEIE limit. This is because the unused credit can be rolled forward and used as a buffer for cases where you do something tax-advantaged in your country of residence which is not honoured by the IRS. Most commonly this could be capital gains on the sale of a primary residence which is tax-free in many countries but only partially so in the US. But there are many other such possibilities, like retirement savings not covered by totalization agreements, special treatment for redundancy payouts, lump sum retirement payments, etc. There is this general idea that tax agreements eliminate double taxation, but they only do so imperfectly because the legislation is tailored for people temporarily working overseas, not people who make their home overseas.
These cases are perhaps not relevant to the typical digital nomad when they set out, but things happen and you may choose not to return to the US. In those cases, it is good to have chosen to file your taxes in a way that maximises future choices.
In my view the FEIE should only be used if you KNOW you will go back to the US soon and want the easier filing it provides, or if your foreign tax credit is simply not enough.
But if you're going to abandon your green card, you need to do it before the eight year because doing it after that makes you subject to the exit tax where abandoning your green card requires giving up a nice chuck of your net worth.
I think you are confused about foreign residence and foreign taxation. Most countries will tax all foreign income if you are a tax resident of their country. But not many tax foreign income of citizens who are resident in a foreign country, and Australia definitely does not do this. If you are a resident of another country then Australia doesn't make any demands on you at all. The only catch is that a temporary residence overseas might mean they still consider you to be an Australian resident for a time.
If you can avoid it by spending a certain amount of time out of the country then surely it is not what is meant by non-resident taxation in the context of this article?
The parent may have been confused about when a transaction takes place. They would only have a taxable event for their currency at the time they converted between different currencies. However, the advice you give about calculating capital gain in foreign currency is VERY bad. You may have been given bad advice. In particular, the IRS helplines are completely inaccurate for issues arising from foreign residence. If you get a personal letter ruling then their advice is binding. Advice over the phone is not binding.
Basis must always be converted to US dollars using the exchange rate at the time of purchase, and sale price likewise converted to US dollars using the exchange rate at the time of sale. The US capital gain is then the difference between these two US dollar values.
This can easily (and frequently does) lead to having to pay a capital gain on a transaction that lost money in the currency in which it actually took place. Particularly the last decade was bad for this with the falling US dollar.
Many expats (if they are aware of their obligation to worldwide taxation which most are not) may calculate this incorrectly. This will often be ignored by the IRS, because they have no matching information to use to flag the foreign transaction for audit. However, with FATCA coming, the IRS will finally get some matching information and it is a strong possibility for nasty surprises in the future.
This was a key feature of aider and if you're not inclined to use aider (or the forked version cecli) I think a standalone implementation exist at https://github.com/pdavis68/RepoMapper