I don't know anything about zip trees, but I'd think in a common scenario the memory addresses are reasonably consecutive. Would that be a problem? If not, why not just assign consecutive ranks in the first place?
AFAIK the IP deal with Microsoft only covers development before AGI.
So at any point OpenAI could declare that a sufficient degree of AGI has been achieved and thus return to its philanthropic mission. With GPLed models and all.
However, at this point the employees expect a multi-million cash-out for each of them. So the philanthropic mission seems to be gone out the window.
And probably that’s also the way Sam Altman got back into the CEO role. By maximizing the expected eventual cash-out for the employees which threatened to leave otherwise.
> So it is easy to make changes by system admins/non-developers. Scripting is for glue functionality after all…
You can also use env-vars and flags in Go.
Which many would argue leads to more robust "admin glue functionality", because the admin controls how much non-admins can mess around with instead of allowing them to mess around with the core shell-script functionality.
The recent 2023 version of MISRA C costs just a few pound as PDF. So I got it from $WORK.
I don't have a lot of experience with the previous versions. But the 2023 version reads quite okay.
It is not possible to mandate "though shall write good code" because it is not at all clear what that means.
Instead they needed to come up with rules that can be checked with automated tools.
The rules are classified as mandatory, required or advisory.
Only the mandatory rules cannot be overridden by explicit documentation.
As an example, "The goto statement SHOULD not be used" is an advisory rule.
Given the bad bad spaghetti code that beginner programmers produce with goto, this is quite reasonable.
Even though some code is definitely better with goto. For example to jump to some cleanup before returning.
Similarly, "A function SHOULD have a single point of exit at the end" is an advisory rule only.
The rationale for the rule stated in the standard is the following (slightly rephrased):
1. A single point of exit for a function is required by the IEC 61508 and ISO 26262 standards as part of the requirements for a modular approach.
2. Early returns may lead to the unintentional omission of function termination code.
3. If a function has exit points interspersed with statements that produce persistent side effects, it is not easy to determine which side effects will occur when the function is executed.
I'm also a big advocate for early return. But the points from the rationale are valid.
And I don't have a good alternative rule that achieves the same goal and is checkable with automated tools...
That's the thing. The rationale sounds good. But where is the evidence?
The code base followed all the rules, yet it was worse and had more bugs than any non-conformant code base I have ever seen.
And teaching beginners to strictly follow rules instead of mercilessly rewriting and testing code until it is sufficiently clean and correct is the worst you can do, IMHO.
try/finally in the context of thrown exceptions, sure.
But in a language without exceptions (like portable C), we can alternatively define try/finally in terms of a "guaranteed execution" block no matter how control returns from a guarded try-block (be it `return`, `break`, `goto`, `longjmp`, etc).
...basically, a safer form of goto. It's possible to implement a form of this in portable C using only preprocessor macros, but it's messy and can't handle some cases, like longjmp.
I see, very interesting. Personally, I'd prefer to just have a "finally:" label; I've never liked "try", because it seems like extra boilerplate, and forces another level of indentation.
I like how Swift did it: instead of try/finally, they have `defer`, which (when encountered) pushes a new clean-up task to the guaranteed-execution list in the right order: https://www.hackingwithswift.com/new-syntax-swift-2-defer
The Moore Microprocessor Patent Portfolio was very lucrative.
Eventually it ended up with a patent marketer.
Nearly everyone doing processors had to buy in.
And as the inventor Chuck got his share out of it...
Yes! This is close the explanation I first encountered in Hubbard & Hubbard. One of the nicest math textbooks and going from zero up to differential forms.
There are "bignum" implementations for every language. Though I never tested the performance impact on closed-form Fibonacci when a defined double precision >64bit is used.
Your code has an accidentally quadratic runtime (instead of linear). Since the array is appended to, the code regularly increases the memory region and has to move all the previous data over.
You could pre-allocate the memory as n is known ahead.
Also you don't need all that memory. You only need to store the last two entries.
Well, you can also be a "tourist" as a German visiting Berlin. And be treated as such.
I think speaking English in itself was never a problem to get in. But of course the tourist vibes get stronger if the person doesn't know the "definition of cool" that is expected and appreciated in that particular club.
Take this example [1] of a tourist they probably let in by accident and regretted it. :)
I think that in Europe traditional building materials - like bricks are natural insulators and our modern glass panels are 3 layers by default. So it may come as normal house in Europe is especially insulated in US.
200 kwh is quite a lot ... but also in US it looks like that the houses are bigger.
I have a 7 kWh Vaillant Heat Pump in Denmark, and the highest consumption i saw last winter was just over 60 kWh per day, which was with -16C.
My total consumption for a year with heat and hot water was around 3600 kWh ( 2200 ft2, 4 people).
COP was around 3.7 on average for the entire year, so ~13,500 kWh of heat produced by the heat pump. For comparison, one m3 of natural gas is around 10.5 kWh of heat, so we produced the equivalent of 1,285 m3 of gas.
a lot of heat pumps in usa are air to air and have an electric heater in the heat pump to generate the heate when temperatures get so cold that air to air is not effective. without a geothermal system to extract the heat from, they get very expensive to run in very cold Temps when compared to gas hearing. Hensel why the myth that they don't work. no one thinks they don't work, they just think it's a worse solution than natural gas.
My Air to water heat pump also has a backup resistive heater built in, which kicks in around 0C. It doesn't fully switch to it until -15C, but uses it for assistive heating for things that cannot wait, like hot water.
Still, i use way less energy than i did with natural gas. The original estimate from the installer was that the backup heater would consume around 100 kWh during normal year, and considering my estimated "heating needs" of 13,000 kWh per hear, that's just a tiny fragment of that. Resistive heat is (almost) a 1:1 conversion of energy from electricity to heat, and the heat pump delivers a COP value of between 3.5 and 4, meaning i spend around 3500 kWh on the rest.
For comparison, 1m3 of natural gas contains roughly 10.5 kWh of heat energy when burned in a gas boiler, so to deliver 13,000 kWh of heat, i would have to burn 1250m3 of gas.
Where i live, in Scandinavia, electricity is around $0.13/kWh and natural gas is around $2.2/m3 (both including taxes), so in total it works out to :
- Gas : 1,250* 2.2 = $2,750 / year
- Heat pump : 3,500 * 0.13 = $455 / year
Gas is about 6 times as expensive as a heat pump here.
For a project I made a version that uses the memory location of the entries to construct the (random) rank on the fly.
So it’s a binary tree structure that requires the same memory as a linked list (two pointers) only!
https://github.com/open62541/open62541/blob/master/deps/zipt...