I thought it would be, given that C is designed in such a way that a single pass ought to be sufficient. Single-pass compilers were not uncommon in that era.
Was it really designed this way? I keep hearing this claim but I don't think Ritchie himself actually confirmed that?
Also, notice how the functions call each other from wherever, even from different files, without need of any forward declarations, it simply works, which, as I have been repeatedly told, is not something a single-pass compiler can implement :)
I mean, I don't know if it was ever explicitly stated, but consider: parsing requires at most one token of lookahead - assuming that you use the lexer hack to disambiguate declarations; and in earliest versions of C without typedef, you don't even need the hack because all declarations must start with a keyword. You cannot reference any declarations - not types, not variables, not functions - until they are defined, with a special exemption for pointer types that is precisely one case where the compiler doesn't care because a pointer is a pointer. Altogether, C design permits and even encourages a naive implementation that literally does a single pass parsing and emitting highly unoptimal, but working assembly code as it goes (e.g. always use stack for locals and temporaries). There's also stuff like "register" which is incredibly useful if you're only doing a single pass and of very dubious utility otherwise. I find it hard to believe that it is all a happy coincidence.
Regarding functions, it only works if the function returns int and you match the types correctly for any call that doesn't have the prototype in scope. I believe this to be one of the relict B compatibility features, BTW, since that's exactly how it also worked in B (except that int is the only type there so you only had to match the argument count correctly).
Will it translate to yaml for toolchains that want that?
I'd be delighted to have a high-level IDL that gave the same sort of thing that CORBA IDL gave us 25 years ago -- schema and stub generation for multiple languages.
My focus is on doing both client sdk and server stub generation, though only typescript so far - will hopefully add other languages eventually, when I'm satisfied with the completeness of the typescript templates.
I sooo want a wind turbine to supplement my solar, but as you say, I just can't make the economics work.
For starters, wind is a lot more mechanical. Meaning moving parts. Meaning maintainence, storm care, and so on.
For another it's more obtrusive, large, high, creates some degree of noise etc.
It's not exactly cheap. My inverter could handle it, but between the mounting and turbine, it's some real cash.
The argument for it just falls apart when I do the math. For less money and waaay less hassle, I could just extend the solar.
So I love the -idea- of wind but the economics of it just don't work at personal-scale (yet?)
Personal Hydro also looks interesting (but alas I have neither the elevation, nor river for that). For a while I researched ocean wave (especially shore wave), but I dont live by the sea.
Ultimately we use what we can get, which for me is solar. I get plenty of wind here, which is why it seems a waste to not use it, but again, economics...
There are commercially available wind turbines, rated for 1-20kW.
My partner's parents installed such a system in Oregon, they live off-grid and use it to minimize their propane generator's use. A 3kW system was around $7k in total.
It doesn't make much sense if you have a grid connection, the payback time will likely be at least 15 years or so. But it makes sense for an off-grid system.
The maintenance needs to be done about once every two years or so. It requires lowering down the mast and inspecting the bearings. Both are pretty easy to do.
It's a simple system without a gearbox, the only moving parts are the rotor and the brakes.
The turbine is supposed to last for 20 years, and it can probably exceed that.
You won't really be able to power a house consistently with wind turbines because there are long periods (many days) without enough wind. No amount of storage can compensate for that, you'll need a generator or a grid tie-in.
The average capacity factor over the last year was about 30%, and they live in a rather windy location.
Indeed. It is a fascinating journey and he even notes it in the article:
"...even though from an economical point of view this project was an absolutely terrible loss the amount of satisfaction of seeing a dream like that come true is truly amazing"
I hope he sees the post hit the front page and shares any updates on it.
Note that the original uses (pumping, grinding) of windmills were for high-torque, low-speed applications.
In principle, gearing should make the low-torque, high-speed motors that one can drive via PV their equivalent or better. I'm no MechE; what's the situation in practice?