Hacker Newsnew | past | comments | ask | show | jobs | submit | dbrower's commentslogin

I don’t think anybody thinks or thought it was.


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).


it was a lot simpler in capabilities. much of the complexity is because of feature creep.


What feature creep did the preprocessor have?


How much did the engineering time to make this optimization cost?


Just looked and I'm not seeing ANY 55" 8k around right now. All the ones I'm seeing now are 65" at the smallest, and that seems way too big.

I've found a 43" 4k is about the right pixel size for me; a 49" 4k was too big on a desk. Fortunately, it died and I could get a smaller replacement.

I suspect a 49/50" 8k would be ideal, but I'm not going to hold my breath.


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.


I added support for typespec as an input specification to my openapi 3 based code generator a couple of days ago.

They provide an API to convert to openapi documents so it was pretty painless (https://github.com/mnahkies/openapi-code-generator/pull/158)

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.


The OpenAPI and Json Schema emitters can produce yaml.


How is that not an API?

It’s offloaded the work to an adapter.


Not diversity. Younger cheaper quotas.


I was looking for the chalk v marker on whiteboard shootout, and it was conspicuous in absence.


Chalk is superior. You don't hear about anyone hoarding whiteboard markers. https://www.youtube.com/watch?v=PhNUjg9X4g8


I don't have to hear about people hoarding whiteboard markers, I see it all the time.


Ah, an ancestor of Typescript!


So, at his site, 10+ years ago, his wind produced more frequent power than PV would have, at 3x the cost of a commercial solution.

Even then, PV would have been more cost-efficient. Now with storage probably even more so.

Small wind is a mug's game except in very specific circumstances.


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.


What is the longevity of such a wind turbine? How much maintenance goes into it, both hours and money for parts? 15 years is quite a long time.


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.


How many kwh per day does the 3kw system cost?

2 of those could, theoretically, power all of a typical house's electricity if they got anywhere near 3kw on average.

$14k to not need the grid would be a deal.


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.


If you supplement that with some solar panels and a battery, a generator wouldn't have to run that often.


Big commercial onshore turbines run at something like 20% peak on average. Your tiny system would likely be much worse.


You would need energy storage as well, not to mention spare parts.


sometimes, it's not about the money.


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?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: