Redefining what sustainable fishing means - <AUTHOR> http://oceans.nautil.us/article/600/its-time-to-redefine-what-sustainable-fishing-means <comment><USER2> The authors seem to want to redefine "sustainable" to match their moral values and policy preferences. They should get their own word — this only muddies the discussion.

"Sustainable fishing" means just that the populations do not decline. "Zero tolerance for marine mammal bycatch" has nothing to do with this. Taken literally, it's also a completely unattainable goal, which makes me doubt the authors' intentions. What's next? No mammal killing in agriculture? Good luck. Even biological agriculture farms have snake shelters to keep the vermin numbers in check.

<comment><USER3> > "Sustainable fishing" means just that the populations do not decline. "Zero > tolerance for marine mammal bycatch" has nothing to do with this."

Environmental sustainability doesn't "scope creep" for the same reason as other morality terms (eg justice). It scope creeps because of the nature of environmental sustainability. Affecting non-target species (bycatch etc.) tends to have unpredictable effects on target species... and longer time horizons yield more complexity. That's what ecosystems are, interdependent sets of population dynamics.

Anyway, at this point, "sustainability" means environmental decency in the general sense. Like the term "literally," it has evolved with usage. If a beef farm is poisoning a nearby lake and all its neighbors' farms, but could theoretically continue doing so without a decline in beef production... we wouldn't describe this as sustainable.

There's also a practical sense to it. Commercial fishing (and aquaculture) gets away with a lot of environmental harm, for relatively little economic size. This isn't oil & gas. In some places, even recreational fishing is a bigger industry. This is not sustainable politically. Eventually, people will just want to ban it... like most commercial hunting was banned, inland fisheries retired, etc.

That's unsustainable in the literal sense. It will lead to the end of commercial fishing.

<comment><USER4> > _Anyway, at this point, "sustainability" means environmental decency in the > general sense. Like the term "literally," it has evolved with usage._

The problem with this is, that now there is no way to talk about the original meaning of "sustainable". Since that is an important concept, much is lost when it can no longer be talked about.

<comment><USER5> What would you like to talk about under the original definition of sustainable, then? It seems to me like we're still discussing all this stuff just fine. In fact, this whole subthread seems to be a deliberate attempt to sidetrack discussion of important ecological policy with a pointless war about linguistics.

Even taking all that, I don't see how we're breaking with the spirit of the word anyway. If you have a fishery that preserves the population of one target species, but is steadily depleting that of another (the bycatch), why should we call that "sustainable", exactly?

<comment><USER4> We're not discussing things fine if different people mean different things with the word.

That is how communication dies and people misunderstand each other.

<comment><USER3> Exactly the opposite.

This is how human language works. Our brains are specifically designed to work out these ambiguities. That's why NLP is hard. It's what the "L" means.

This is why you did not have any trouble understanding the author.

Humans are also good at creative problem solving. In your case, the problem is that the article is well reasoned and hard to argue against. Semantics are always easy to argue though. So, you argue that we must use the term "sustainability" in in the way it was used back when no one used it.

I wonder why this even works. The author's usage is obviously and demonstrably correct. It is a far more common usage than yours. Homonyms exist. Somehow this nonsense makes top comment on half the threads on HN, and everywhere else... derailing actual conversations about actual stuff.

I reckon it's the same brain bug that makes reality TV popular. The conversation about nothing adjacent to the conversation about something.

<comment><USER4> > _In your case, the problem is that the article is well reasoned and hard to > argue against. Semantics are always easy to argue though. So, you argue that > we must use the term "sustainability" in in the way it was used back when no > one used it._

It's fascinating how you made all that up. The inner motivation of someone you've never met. The claim that I argued against the article. What I'm supposedly arguing for.

None of that is in what I wrote. It all happened in your mind.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> There is a frustrating catch-22 with "sustainable" fishing methods. Methods that are more careful about bycatch in generally lead to less fish per gallon of diesel, which is the primary driver of CO2 emissions for fisheries.

MSC certified line-caught fish will on average have double the CO2 emissions of seine caught fish, see: [http://awsassets.panda.org/downloads/estimating_the_carbon_f...](http://awsassets.panda.org/downloads/estimating_the_carbon_footprint_of_tuna_fisheries_9may2009.pdf)

It is confusing to me that MSC is fine with being the forcing function to double carbon emissions - which is expected to have large effects on ocean habitats - while ostensibly being interested in ocean habitat.

I guess the complexity is that.. there doesn't seem to be a good answer, currently.

<comment><USER7> > I guess the complexity is that.. there doesn't seem to be a good answer, > currently.

Encouraging people to eat less fish might be the easiest (and thereby best) solution.

I'm not saying humans should eat /no/ fish – indeed there are many human communities which rely on fishing, and for which fishing plays a key role in their culture. Similarly, some people may need to eat fish for health reasons. However, it seems to me that /reducing/ consumption by cutting consumption of fish for pleasure/taste would likely benefit both the environment and people; for example, indigeneous groups which traditionally rely on fishing would face less competition from industrial-scale fishing. From an environmental standpoint, most things, even whaling it seems, are inherently sustainable in smaller scales.

Again, I don't mean to say that everyone needs to comsume zero fish. But if those of us who can, which likely includes many HN readers, cut down our consumption it may benefit everyone at quite a small cost to ourselves; as a middle class Northern European, I can testify that me not having consumed fish in the last 5 years has had 0 immediate impact on my health or happiness levels.

Note: Of course this is all assuming that there are more eco-friendly alternative protein/fat/omegas sources available. Again, I do not mean to say that this is applicable for everyone.

<comment><USER8> I was under impression that it was a green policy to recommend people eat _more_ fish, acting as a replacement for e.g. beef which (if I recall correctly, I'm not certain) has more harmful environmental effects than fishing.

<comment><USER9> It often feels like we _think_ fishing is less environmentally harmful but we don't actually _know_ it, because the ocean is extremely opaque to us, and has very high buffers both ways.

Numerous stocks have crashed and most times the collapse has been extremely brutal, similar to the passenger pigeon, going from "it's everywhere" to "it's nowhere" in a few years.

And even with what we _know_ at least 1/3rd of current stocks are being overfished.

</comment></comment></comment></comment><comment><USER10> I agree with the sentiments expressed by the author, however redefining sustainable fishing before it's been implemented widely seems a bit premature. Not that we can't pursue that implementation alongside efforts to raise the bar, but, at current rates of exploitation, many parts of our oceans may not even survive long enough to see the impact of that redefinition.

</comment><comment><USER11> I'm not vegan or anything, but I just didn't eat any fish or meat since at least a year, I have more than enough with fruits and vegetables (locally foraged - I've no garden, even if I live in an urbanized environment, there are plenty figs for example currently, or at local producer), and some rice

<comment><USER12> Join the dark side. Drink some oat milk. Eat some soy.It gives you special powers.

</comment></comment><comment><USER13> I don't think hunting wild fish is sustainable at all, just the same as hunting bison, etc. It's maybe OK as a hobby, but not as mass a industry.

For food, we should be farming fish, in indoor, controlled environments.

<comment><USER14> This creates severely "de-nutrinized" food, so much that it one might argue this kind of food is junk.

Many fishes are fed with grains, this destroys their nutritional value, which begs the question if it even makes sense to eat fish who are fed with food they wouldn't eat at all in a natural environment.

<comment><USER13> This may be the case now, but it's not intrinsic to 'farmed fish'.

We can craft nutritious, similar-to-natural, or even better, fish foods. If the incentives are correctly aligned.

<comment><USER15> > We can craft nutritious, similar-to-natural, or even better, fish foods.

Citation needed. There have been trillions spent on meal replacements/supplements for humans and it never beats eating a variety of raw, unprocessed foods, like fruits and veg.

<comment><USER3> you are right but "citation needed" isn't a polite way of responding to a comment. This isn't a wikipedia editing battle.

</comment></comment></comment></comment></comment><comment><USER16> I am in favour of the immediate cessation of all commercial fishing worldwide until such a time as the world can come together to build a system with the primary goal of protecting the fish and ancillary goals of providing a fair allotment, executing poachers, & educating children about extinction.

<comment><USER16> It's an extreme position, I know, but the collapse of ocean ecosystems is the collapse of mankind.

</comment></comment><comment><USER17> Has fishing ever struck anyone else as plain weird.

Imagine we farmed cattle by flying about in Zepplins, lowering giant nylon nets and dragging across the ground.

Fish Farming seems more sustainable. Maybe less economic but then perhaps just don't eat the fish if we cannot do it economically.

<comment><USER18> It doesn't seem all that different from scaring a herd of buffalo into running off a cliff. No reason that we need to by flying to spring the trap on wild resources.

> Fish Farming seems more sustainable.

It does seem like any major market should be required to farm their resources rather than taking from the commons.

</comment></comment><comment><USER19> There won't be sustainable fishing unless illegal Chinese fishing fleet is banned and destroyed.

</comment><comment><USER20> Aquafarming is an amazing emerging trend and will help us create a sustainable environment for fish and reduce collateral damage on marine wildlife.

[https://en.wikipedia.org/wiki/Aquaculture](https://en.wikipedia.org/wiki/Aquaculture)

<comment><USER12> This has a ton of its own massive problems, including large impacts to ecosystems. Hotbeds of fish diseases and algal blooms, for example.

It's not necessary to eat fish. We can just do without.

<comment><USER20> It's not necessary to be alive either yet here we are. I am not sure what happened to rationals about humans and the environment but it's taken a really dangerous twist into something very very antihuman. Thanks but not thanks. I'll eat my fish with pleasure.

<comment><USER12> I think we can all agree that whether a human lives is not comparable to jamming fish in one's gullet.

<comment><USER20> its part of it and a reality for many.

</comment></comment></comment></comment></comment><comment> lota-putty Accept previous generations messed up(greed & pride). Even now, most powerful & wealthy are respected more than most wise people. Often power/wealth is mistaken for wisdom.

\- Precise definition of territorial waters depending on mainland's size & population \- Hands-off fishing in international waters; farm & eat marine food within mainland marine territory

No international body out there is strong enough to protect sea-life.</comment>


Hemingway's World War I savior is anonymous no more - <AUTHOR> https://www.washingtonpost.com/outlook/hemingways-world-war-i-savior-is-anonymous-no-more/2019/01/18/d3dbbb32-0ea0-11e9-831f-3aa2c2be4cbd_story.html <comment><USER2> I ponder the reason Hemingway never mentioned him, and I imagine - which is not to excuse him - that acknowledging the person who died in your place is a trauma to be revisited. Instead of celebrating Fedele Temperini's death, it seems that Hemingway felt guilt and shame. Even though that's an easy reading of silence; I may be wrong.

<comment><USER3> Maybe because he saw so many die, and that one more death coincident with his trauma was not any more or less important than the anonymous millions.

</comment></comment><comment><USER4> What a sad story. I wonder what other great books, movies, companies weren't made because someone died tragically without a savior.

<comment><USER5> Many excellent French authors died during WWI; their death deprived us of new works.

Charles Péguy, Henri Alain-Fournier, Louis Pergaud, to name just a few...

(Guillaume Apollinaire shouldn't be part of this list because, while he was wounded during WWI, he died of the flu after the war.)

<comment><USER6> Technically Guillaume Apollinaire died during the war, 9 November 1918 according to wikipedia. That's just a nit tho, a little fact I came across looking up these authors, but it got me thinking...

Theres a couple of interesting questions in there though - during the war he sustained wounds he was still suffering from at the time of his death. Did these weaken him in a way that made him more susceptible to the flu? Did the subpar conditions everyone in Paris was dealing with due to the total war (and fronts not too far away) contribute?

In the broad scale - WW1 and the Spansish flu pandemic certainly had effects on each other. Many of the early outbreaks are linked directly to troop movements, and the living conditions in barracks, camps and trenches certainly aided the spread of the flu. Governments were keeping quiet about the potency and spread of the disease for morale reasons. Basically the question of "Is a soldier dying of spanish flu during ww1 a war-related death?" is much deeper than just sorting on proximate cause of death (e.g. flu, or gunshot, etc).

<comment><USER5> Okay, but in that case many people who died during the war, but not at the front lines, died because of the situation the war had created (lack of food, missing doctors, etc. etc.)

You have to draw the line somewhere. Maybe Apollinaire is a WWI casualty, but not everyone is -- or else it wouldn't mean anything anymore.

</comment></comment></comment></comment><comment><USER7> "Strict Italian privacy laws prevent us from learning more about him."

Is privacy really an issue 100 years after the person's death?

<comment><USER8> I can't believe you're suggesting that a person's privacy is less important than their copyright terms.

<comment><USER9> That assumes that he views copyright timelines as reasonable.

</comment></comment></comment><comment><USER10> Probably no American writer has been more heavily researched than Hemingway. Amazingly we're still learning new things about his life.

<comment><USER11> It would take a life to tell someones life completely ..

</comment></comment><comment><USER12> Archived copy without GDPR nag screen:

[https://web.archive.org/web/20190118162959/https://www.washi...](https://web.archive.org/web/20190118162959/https://www.washingtonpost.com/outlook/hemingways- world-war-i-savior-is-anonymous-no- more/2019/01/18/d3dbbb32-0ea0-11e9-831f-3aa2c2be4cbd_story.html)

<comment><USER13> Thanks! I was about to comment that I can't read this article.</comment></comment>


Memory Issues for AI Edge Chips - <AUTHOR> https://semiengineering.com/memory-issues-for-ai-edge-chips/ <comment><AUTHOR> What's the best memory for these apps?</comment>


I Have Read Prop F - <AUTHOR> https://medium.com/@emeyerson/prop-f-is-worse-than-you-think-17e395ca8761 <comment><USER2> I saw some campaign propaganda today.

One side of the flier has a guy named Aaron Peskin imploring me to vote yes on Prop F and Prop I. Prop F is the mess thoughtfully critiqued in this write-up, Prop I is a moratorium on building new market-rate housing. Oh, and he's on the "more affordable rent" campaign platform, because if you want to make rent more affordable, clearly the best way is by preventing construction of market- rate housing. It's like SF voters are brain-dead.

The flip side of the flier derided another candidate. If the point of the flier was to make me aware of which candidate to not to vote for, mission accomplished.

<comment><USER3> >Prop I is a moratorium on building new market-rate housing

Are these people completely insane? Shouldn't there be propositions for denser zoning, land reclamation, or other measures that would increase the SF housing stock? Houston has famously lax zoning laws, and as a consequence has seen much greater population growth (31% vs 18% from 1980-2010 per wikipedia) yet experienced none of these same problems.

<comment><USER4> Lax zoning laws has created its own set of problems for Houston -- infamously horrible sprawl, for one.

<comment><USER5> Not sure why you are getting downvoted.

Houston's lack of zoning laws (there are HOAs, mind) has certainly created its own set of problems. A friend of mine once described it as less of a city and more of a vast collection of suburbs connected by strip malls - and that isn't entirely unfair.

Whether you view it as "horrible sprawl" or "affordable housing" sort of depends on where you sit, I guess.

</comment></comment></comment></comment><comment><USER6> I Have Read this Medium Post.

The author makes a great case against Prop F, prop F seems like a totally shitty law and isn't going to fix the housing problem. It sounds like that isn't what the law is about anyway, but there is a great way to fix the housing problem. The argument he seems to allude to in his notes, is that people seem to choose sides based on their sentiment surrounding the current resedential/housing market.

In economics there are 2 forces at the heart of most problems. These are called "supply" and "demand" and they govern price. SF has not been keeping up with it's infrastructure, is a decade behind in new construction, and building new resedential properties will take ~5-10 years to complete. They are not actively building properties that will sufficiently meet demand even now. So this won't go away.

Unfortunately, people who paid a lot for houses have a vested interest in not raising supply, and the amount of regulation surrounding new construction creates massive amounts of friction. It will be interesting to see how this problem get's solved. I agree with the author though:

It is not going to be Prop F.

<comment><USER7> Of course, California also interferes with the market to discourage selling real estate. Proposition 13 disconnected property tax rates from the value of the property (by capping the increase in assessed value at 2% per year, far below the increase in actual market value).

Which created a massive incentive to hold real estate as long as possible without selling, since the only time the tax rate can reset to being based on market value is at the time of sale.

<comment><USER8> Proposition 13 didn't do that; the various governments who petulantly refused to adapt their tax regimes to the Prop 13 limits did. The bizarre incentives created by almost 40 years of attempting to strong-arm voters into giving power back to legislatures could be fixed by legislatures without doing anything to Prop 13.

<comment><USER9> What exactly should they do?

<comment><USER10> Don't make all of your money from a property tax that does not increase as your costs to provide services increase.

There are options besides property tax for raising tax revenue. City-level local income tax is the first thing that comes to mind.

<comment><USER11> Are you proposing abolishing property tax? Because nowhere in ubernostrom's post did he talk about city revenues, just about the perverse incentives to land-owners by Prop 13, and those will exist unless property tax is eliminated.

<comment><USER10> I didn't respond directly to ubernostrom, and my comment doesn't discuss whether prop 13 creates a perverse incentive for landowners in any respect (although: it does).

I'm saying that if you tie your revenue stream (i.e. taxes) to something that is essentially fixed at 1970's levels, but you have to buy things with it in 2015 money, you are going to not have a good time.

You can still keep property tax as part of your revenue stream, but these governments need to diversify. I would personally rather they diversified into income tax than some of the alternatives, such as red light cameras.

<comment><USER12> Nothing is fixed to 1970s levels. Property taxes get reassessed when there's a sale on the property. How many properties in CA have not changed hands since 1970, ie more than 40 years? Probably none, since that's almost 2 generations of families.

<comment><USER10> I think you might be surprised. There are a ton of exceptions to reassessment [1]. A notable one is that transfers from parent to child are typically excluded, meaning that you can indeed pass down low property taxes from generation to generation.

Commercial property is also covered under the same rules, and there are ways to keep it from being reassessed [2][3].

Improvements to the property will trigger reassessment, if the changes pass a certain threshold. This incentivizes owners not to improve their property (particularly externally). Look around San Francisco, and you can see the effect this has had (along with other factors like rent control). Anecdotally, I've heard of people replacing one window a year because they didn't want to trigger a reassessment. That is just flat out absurd.

There is a cottage industry dedicated to avoiding property tax reassessment, entirely because of prop 13. This isn't how it works elsewhere in the country. There are other, better solutions out there. However, it is virtually impossible to alter or repeal prop 13 because it was a ballot proposition -- it will outlive all of us.

[1] [https://www.boe.ca.gov/proptaxes/faqs/changeinownership.htm](https://www.boe.ca.gov/proptaxes/faqs/changeinownership.htm)

[2] [http://closetheloophole.com/history](http://closetheloophole.com/history)

[3] [http://www.sacbee.com/news/politics-government/capitol- alert...](http://www.sacbee.com/news/politics-government/capitol- alert/article23689426.html)

<comment><USER12> Prop 13 is across California, not just San Francisco. You're saying that home sales in CA have been suppressed because of Prop 13? You would be wrong.

There are about 6M housing units available in CA, and about 500k sales per year. That's an entire turnover of inventory in 12 years. Your anecdotal evidence is interesting but wrong.

<comment><USER10> I did not state that property sales have been suppressed, I said that property tax revenue has been suppressed. My particular anecdote was around property improvement, not sales. And once again, a property sale does _not_ mean that reassessment definitely occurred.

However it is hardly groundbreaking to state that prop 13 has created a "lock in" effect [1][2][3][4].

[1] [http://econweb.ucsd.edu/~miwhite/wasi-white- final.pdf](http://econweb.ucsd.edu/~miwhite/wasi-white-final.pdf)

[2] [http://taxprof.typepad.com/taxprof_blog/files/2008-19151-1.p...](http://taxprof.typepad.com/taxprof_blog/files/2008-19151-1.pdf)

[3] [http://www.doctorhousingbubble.com/prop-13-california- housin...](http://www.doctorhousingbubble.com/prop-13-california-housing- lottery-new-home-sales-no-2011-summer-bounce-real-estate/)

[4] [http://www.nytimes.com/2006/05/07/realestate/07california.ht...](http://www.nytimes.com/2006/05/07/realestate/07california.html?ex=1182830400&en=3831f57bb981c487&ei=5070m)

<comment><USER12> Yes, actually you did say that property taxes are fixed to the 1970s, which I said was wrong.

Based on the level of home sales and the current median home prices, it's safe to say that there is more than enough turnover to reset property taxes, and the idea that property taxes are fixed to the 1970s, which was your initial statement, is utter nonsense. Linking articles that are 10 years old and from the middle of the housing bust is also nonsense.

No one is talking about prop 13 now because there is more than enough housing turnover across CA, and more than enough hungry home buyers willing to pay whatever price, regardless of the property tax.

And since I know you just skimmed the articles you posted and didn't read it, here's a finding that pretty much talks about today's environment, and it completely invalidates what you are saying about Prop 13:

"Rapidly rising housing prices may also have contributed to reduced tenure by increasing home sales, including speculative home purchases. Low mortgage interest rates over that period may have also increased home sales, especially for first-time home buyers, which in turn, would decrease average tenure."

<comment><USER10> Sorry that you're so fixated on prop 13 not contributing to any issues with local revenue collection or housing shortfalls. I continue to disagree. Either way though, neither of us are likely to get to express our opinions by voting in our life times.

To your point that "no one is talking about prop 13": a constitutional amendment to modify it was proposed 3 months ago [1]. Obviously that will never go anywhere -- the state can't even pass a balanced budget with regularity. But then, that's the whole problem with propositions, isn't it?

Otherwise, I think that you can rest easy, your point has been made. You prefer to make accusations (article skimming! anecdotes that are anecdotal!) rather than constructive dialogue. Welcome to the Internet, it's full of people you won't get along with.

[1] [http://www.sacbee.com/news/politics-government/capitol- alert...](http://www.sacbee.com/news/politics-government/capitol- alert/article23689426.html)

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER13> Wow:

 _This is where it's clear the authors overreached and created a toxic spill waiting to happen.

If the City finds you did indeed host someone or assisted someone else as such, even for one night, then the City can take action against you.

But then it gets absolutely bonkers. If you didn't host anyone, or it was just your Aunt Rose visiting for the weekend, then your cranky neighbor can still sue you anyway, and the City has to help them do it. And we're not just talking about filing suit so the City can collect its fines and fees, but filing for "special damages" that the neighbors get to keep for themselves._

This sounds incredibly bad.

<comment><USER14> It's a bit overblown. Civil lawsuits cost money to prosecute, so they're unlikely to be pursued unless there's a good chance of winning.

<comment><USER15> Have you ever lived in a community with an HOA? Some of the people there take finding violations, infractions, and actionable offenses as their second job, and will not hesitate to sue you just because. So enabling these people by requiring the city to help them sue is like dumping a tanker full of kerosene on a forest fire.

<comment><USER14> No doubt the point of the law is to tap into community activism. But it's different from suing your neighbor over the hedge you don't like. Prop F is much more objective and substantive about what constitutes a violation than your typical HOA covenant: illegal hosting. Neighbors and their legal teams are unlikely to sue over that unless they think they can really prove a violation.

</comment></comment></comment></comment><comment><USER16> This is a really laudable write-up, whether or not you agree with prop F. The problem of "sounds good in principle" propositions that are terribly or deceptively drafted is one that makes every California election a minefield.

<comment><USER17> That's why a strangely sound election strategy is to just vote no on every proposition. Most of them have heavy corporate sponsorship and are written to deceive the public.

<comment><USER18> I don't know why this guy is being downvoted. I've heard the exact same thing from many friends of mine who have or still do live in SF: just vote no on all of them, and force the city to do it's job by legislating the usual way.

<comment><USER19> Downvotes on HN are... strange and capricious. Things that are downvoted for no apparent reason do tend to get voted back up, though.

(I wish there was a meta.n.y.c where we could discuss things like this. Alas.)

</comment></comment></comment></comment><comment><USER20> AirBnB needs to step up and suggest what it thinks are some of the right ways to handle this. The fact is, many/most leases and HOAs forbid short term rentals, and for good reasons. As well, many areas are zoned non-commercial, again for good reasons.

But people certainly should have some degree of autonomy when it comes to their personal property. The question is, what is it?

What I never understood is why short term rental regulations aren't modeled more closely off BnB laws than hotel laws. Many jurisdictions have BnB laws and AirBnBs obviously compare much more closely to BnBs. BnBs typically have lighter regulation, different taxes, are frequently in residential areas, etc.

<comment><USER21> > But people certainly should have some degree of autonomy when it comes to > their personal property. The question is, what is it?

That is why we _elect_ people. To answer these kinds of hard questions.

> What I never understood is why short term rental regulations aren't modeled > more closely off BnB laws than hotel laws.

Part of the whole kerfuffle is because AirBnB was encouraging people to break the laws _that actually existed_.

For example, if I buy a house in an area zoned "residential", I don't expect to have someone next to me running different people in an out every week as part of AirBnB. If you want to do that you should have to be zoned "commercial", thanks. Then, we'll get to discuss this at the next council meeting when you ask for a zoning exemption. If it's your hunting lodge, probably nobody is going to object. If it's right next to the elementary school, people are probably going to complain. etc.

<comment><USER22> The heart of your argument is that there is some clear distinction between residential and commercial which doesn't actually exist. Residential properties have always been used for profit - its called an apartment. These visitors are renting in a residential area precisely because they want a residential experience.

The "burden" on your neighbors from short-term visitors is highly overblown. What actual impact on the elementary school is short-term visitors going to have? Is their driving to & from the home ever so more frequent than a full- time occupant? Do you think they are having rowdy parties despite self- selecting to stay in a residential neighborhood? Or that they would be a pedophile (which federal laws already ban from staying within a short distance from an elementary school?)

<comment><USER23> "The heart of your argument is that there is some clear distinction between residential and commercial which doesn't actually exist. Residential properties have always been used for profit - its called an apartment."

That's a completely different situation, and not at all relevant to this conversation.

"These visitors are renting in a residential area precisely because they want a residential experience."

And I want a pony. Why should I care what they want?

"The "burden" on your neighbors from short-term visitors is highly overblown."

You're gonna have to prove that.

<comment><USER24> What is the burden of short-term visitors? I've heard that said before, but I've never heard any actual examples of problems that occur from short-term visitors that aren't present with long-term residents.

<comment><USER21> Bedbugs are one of the big ones that I have heard reported where landlords had to pump a lot of money in. The risk obviously goes up linearly with the number of unique visitors. A very genuine problem when one tenant of a multi-unit decides to do AirBnB.

As for detached dwellings? If you're hosting out of country people, how do I, as your neighbor, prosecute them if they damage my property (bust a fence, hit my car, swim in my pool)?

I can keep going, but our current laws were set up with the recognition that transiency does represent a risk. Clearly people _DO_ recognize this as a risk or it wouldn't be explicitly banned by so many HOA agreements.

<comment><USER25> The fact that something is banned by HOA agreements hardly proves its risky or even seen as such. I've seen many HOA agreements that ban painting your house a non-approved color.

I'm not sure I follow your comment about detached dwellings and foreign visitors. The biggest issue will be identifying who harmed your property which will be significantly easier if your neighbor used Airbnb as their identification will be on file. Whereas if they just drove by and damaged your property or stayed at your neighbors house through a less formal rental system that will never be as well regulated (Craigslist, local word of mouth, etc.) or a hotel a mile away then it would be much harder to track them down.

</comment></comment></comment></comment></comment></comment></comment><comment><USER26> Serious question: has subterranean housing ever been considered for SF? If you can't build out or up, may as well build under.

Feasibility aside, the only problem I see is it'd create a literal underclass—as opposed to the proverbial one that exists now as a result of absurd rent prices.

<comment><USER12> It's either bedrock you'd have to drill through, or sand. I don't think it's a good place to have underground dwelling.

</comment></comment><comment><USER27> >I have been a part-time homesharer

You have not. You are a rentier. You are running a business. Please stop this violence against the English language.

I use hospitality exchange websites to actually share my home, that is offer my home as a place to stay free of charge. What people do on AirBnB, VRBO, and others is not sharing, it's commerce, and we have different words for describing that.

Appropriating the language of mutual aid and generosity to describe a business transaction is insulting. Please stop it.

<comment><USER28> Yeah I agree that abuse of "sharing" as a term is silly. I'm no longer a software designer. I'm a "Software Design Knowledge Sharer".

</comment></comment><comment><USER29> If you had to divide the world into people who are pro or anti airbnb then I am anti-airbnb. But prop F is horrible beyond belief.

<comment><USER30> Why would you say you are anti-airbnb? Just curious if it's their business practices, renters themselves, or what. I've only had positive experiences with airbnb.

<comment><USER31> i'm anti-airbnb. i prefer to stay in hotels or professionally managed vacation rental units.

for example, there's absolutely ZERO chance a hotel will cancel your room on you 12 hours before you show up in europe.

<comment><USER32> Clearly you've never showed up at a hotel that's full despite having a reservation. I have.

</comment></comment></comment></comment><comment><USER33> reading the proposition would help, but that's beside the point ain't it?

Someone really needed to let us know how fantastic things are when the gubmint gets out of the way. Got it.

<comment><USER34> Please stop posting uncivil comments to Hacker News.

We detached this subthread from [https://news.ycombinator.com/item?id=10281311](https://news.ycombinator.com/item?id=10281311) and marked it off-topic.

</comment></comment><comment><USER21> Edit: Thread parent lost due to moderator detach: [https://news.ycombinator.com/item?id=10281311](https://news.ycombinator.com/item?id=10281311)

Houston also has _four freakin ' beltways_ (I610, TX 8, TX 6, and TX 99).

Comparing a city that is the poster child for "sprawl" with a chunk of real estate that is more than a little landfill and locked on 3 sides with water is more than a little disingenuous.

Houston's second beltway would encircle San Mateo, some of Oakland, and Sausalito if transplanted to San Fransico.

If transplanted to San Francisco, Houston's _fourth_ beltway (TX 99--currently under construction) would encompass almost all of San Pablo bay, Walnut Creek (maybe even as far as Concord), easily all of Oakland, Hayward, and Redwood City. And be more than 50% underwater.

The differences are more than the "gubmint reg-you-lashion" my good man.

<comment><USER35> The density of Brooklyn is almost double San Francisco, and I wouldn't consider Brooklyn a very high rise city.

<comment><USER21> > The density of Brooklyn is almost double San Francisco, and I wouldn't > consider Brooklyn a very high rise city.

What are you smoking? I want some of that.

Brooklyn has a density of 35,369.1 people per square mile.

That would make it the 5th most dense city in the US. Behind only other New York areas. It would even put it in the top 10 in density for Europe.

What the hell _DO_ you consider a dense city?

<comment><USER21> Downvoting because you can't refute inconvenient facts? Nice.

</comment></comment></comment></comment><comment><USER36> It's really quite remarkable that you can know so little about something, yet be so judgmental about it at the same time. Go 'mericuh!

Prop I is a _temporary_ (18 month) moratorium in one neighborhood (the Mission), for only a limited subset of projects, coupled with the requirement that the city has to create a "neighborbood stabilization plan" by the end of that period [1].

It is _not_ a _" moratorium on building new market-rate housing"_, as you say.

The idea is that the Mission is undergoing a land-grab by speculators, that poor people are losing (they are), and that the battle will be over by the time a coherent plan is formulated to do anything about it. Whether or not you believe this to be the correct approach, it does nobody any good to mischaracterize it as something that is _obviously and painfully stupid_.

I realize it's not at all fashionable on HN to point out that life is more complicated than chapter one, paragraph one of a high-school economics textbook...but prop I might actually be a good idea over here in the real world, where _actual poor people_ are being evicted from the only places they can afford in the city, at alarming rates.

[1] [http://ballotpedia.org/City_of_San_Francisco_Mission_Distric...](http://ballotpedia.org/City_of_San_Francisco_Mission_District_Housing_Moratorium_Initiative,_Proposition_I_\(November_2015\))

<comment><USER37> Just want to point out that some of us have read the full text of the Proposition, know exactly what it does, and the rationale, and still think it will be completely ineffective.

For example, SF's Chief Economist: [http://sfcontroller.org/Modules/ShowDocument.aspx?documentid...](http://sfcontroller.org/Modules/ShowDocument.aspx?documentid=6742)

<comment><USER36> The point of the moratorium is not to affect prices; it's to give the city a chance to come up with a plan that _will_ protect affordable housing in this one neighborhood, without losing the ability to act.

Viewed in that light, this report is a vote for the plan, not against it: it gives a little breathing room, and probably won't affect prices either way. Whether or not it "works" is entirely speculative: someone has to come up with an actual solution in the longer term.

I believe the advocates of this proposition want the city to buy the remaining vacant lots in the Mission, and use them to build affordable housing projects, but I could be wrong about that.

<comment><USER37> I understand that. It's actually addressed starting on page 26 of the report -- basic conclusion is that a landowner / developer will more likely hold the land until after the moratorium (when it will be even more valuable due to the moratorium) than develop below-market units at a lower price.

I've worked hard to understand both sides of the issue. In practice what I strongly believe will happen is that ~800 market rate units will be delayed for 18 months, nothing else will change and the politicians who pushed this won't be taken to task because they're all terming out and eyeing Sacramento.

</comment></comment></comment></comment><comment><USER38> The Sharebetter campaign website mentioned is totally biased, it's true, and it does seem likely that hotel interests are in no small part behind Yes on F. And I have no doubt F contains (perhaps really bad!) flaws.

But this Medium post is also rife with misleading statements and hyperbole, and therefore hypocritical in light of the author's "here's the facts" tone (not a huge surprise since the author earns income from Airbnb, but still annoying):

> (Imagine if we were living under the "MySpace Law" of 2006, eh?)

Hyperbole and strawman; _who_ is calling it the "Airbnb Law"?

> to assist anyone to offer (emphasized twice) > What does "assist" mean? > Cleaning a house before guests arrive? Proofreading someone's listing? > Helping a family member find temporary housing? Nobody knows because it's > undefined in the text, even in the lengthy Definitions section. The judge > will decide what it means.

Clearly this is referring to _the marketplaces_ and holding them accountable. If I can figure that out, any judge can.

> But wait, there's more! How do you feel about criminal penalties? ... Six > months? (in jail)

The author is a "long-time SF resident" and pretending that an SF judge would want to jail somebody over renting out on Airbnb illegally?

> If you host someone in a room in your home for less than 30 days, you best > not miss a quarterly report of dates and durations. You'll be violating the > new law.

 _If it 's a paid rental_. That's the whole point of the law! In order to regulate the short-term rentals, the city needs you to report your rentals. And remember, up until this year it was completely illegal to rent for less than 30 days.

> Why are in-laws banned, even for one night per year? Nobody knows.

The reason Prop F bans in-laws that they are a hot-button issue, generally speaking, to do with the legality of the construction of the units and the connection thereof with new rent-controlled housing units (IE the city may be willing to bless your unpermitted in-law, _if you rent it out under rent control_ ).

ps. did anybody else get "Aw snap!" opening the post in Chrome?

<comment><USER37> > The author is a "long-time SF resident" and pretending that an SF judge > would want to jail somebody over renting out on Airbnb illegally?

It seems like giving judges that power because "they obviously won't use it" has gotten us into a lot of trouble in the past.

<comment><USER25> Agreed, the law shouldn't say you can send someone to jail for 6 months if we don't think that is reasonable</comment></comment></comment>


Oracle has just given you another reason not to install Java on your Mac - <AUTHOR> https://grahamcluley.com/2015/03/oracle-java-mac/

<comment><USER2> I really dislike Java trashing articles. For sure, don't enable Java in web browsers unless you really need it, but Java itself is very useful given languages like Clojure and Scala that run on the JVM.

When installing Java it has always been very clear how to avoid the 3rd party stuff.

</comment><comment><USER3> Haven't had Java installed on any on my Macs for at least 5 years. I don't miss it at all.

</comment><comment><USER4> I thought they'd been doing that for years on windows installs...

</comment><comment><USER5> Click bait blog spam. The Mac installer will now optionally install the Ask toolbar, the same as it always has on Windows. You're still free to opt out of it at install. Yes, it's annoying and rude of Oracle, but not unusual.</comment>


A Dismal Guide to Concurrency (2010) - <AUTHOR> http://carlos.bueno.org/2010/04/dismal-guide-to-concurrency.html

<comment><USER2> Readable as ever and remarkably clear sighted. Count me as one among many who wish to subscribe to your newsletter.</comment>


New method developed to 3D print fully functional electronic circuits - <AUTHOR> https://www.nottingham.ac.uk/news/pressreleases/2017/november/new-method-developed-to-3d-print-fully-functional-electronic-circuits.aspx <comment><USER2> It's not clear to me how this compares to the work from Voltera [0]. Can someone with more expertise weigh in?

[0] - [https://www.voltera.io/](https://www.voltera.io/)

<comment><USER3> The primary difference is that Voltera is heat cured, this is UV cured.

Differences:

Voltera: Ink comes in syringe. Printed via standard dispenser Ink is heat cured

New Technique: Ink is printed with inkjet head Ink is UV curred

Both use off the self technologies besides the ink. Voltera uses standard paste/syringe dispensing tech, this uses standard UV cure inkjet printing technology.

</comment></comment><comment><USER4> I know the Dragonfly 2020 printer (developed by the Israeli company Nano Dimension) has been in development for quite a few years which (seems) to use the same method as described in the link.

The method itself isn't even that novel since it's the same the as Stratasys' polyjet printers, only with specially formulated inks. There's probably prior art to that as well, but I know Stratasys has had polyjet printers for quite a while now.

</comment><comment><USER5> While I see the advantages there, it continues the trend of increasingly unrepairable components...

<comment><USER6> But why repair something when you can print a new one?

<comment><USER7> Assuming that wasn't sarcastic, for one increasing consumption isn't good from a sustainability standpoint.

</comment></comment></comment><comment><USER8> Very exciting. This will revolutionize the hobby industry. No more etching. It would imagine it would be an easy exercise to build a machine with an integrated drill, so you can go straight from printing to soldering. A PCB will literally be a PCB.

<comment><USER9> In my experience... no.

A modern PCB has the following:

1\. Copper Traces

2\. Copper-plated Through Holes (usually for Vias, but useful for through-hole parts as well)

3\. Solder Mask (very important for surface mount parts)

4\. Silkscreen ("Helper Text", marks that say R1 or "R2 goes here").

Given that I can order 3+ custom boards from USA suppliers for $70 or so (process in 3 days, then ship it so I get it within a week), or 10+ boards for $50 if ordered from China (takes a few weeks to travel though)... I think the modern PCB market is to just order from online.

"Immediate Printing" is well served by the CNC Mill industry today. But CNC- milled boards just aren't good enough for production purposes. Even if you're a hobbyist, all the good tech is in SMT parts which really need a good soldermask.

\</comment></comment><comment></comment><comment>-----

What the technology discussed in the page will be used for is additive manufacturing. That is: the creation of new structures that are cheaper to do by additive means than subtractive means.

I can imagine a small circuit of size .5mm x .5mm for example that would be more efficient to "print" than to mill or etch.

I think their example of 3d Antenna built into a plastic board is the real idea behind the technology. Additive manufacturing is dramatically different than subtractive... and subtractive manufacturing is standard for a reason.

The idea is that "Additive" methods can create things very different than subtractive methods. Don't try to emulate the subtractive methods through additive means.

But for cheap prototyping, CNC Mill + Copper Boards is fast enough, and ordering a "professional" board in the USA or from China is cheap and easy enough as it is.

<comment><USER10> The prices you quote are pretty expensive for 2 layer boards at least. I should ordered 3 Arduino sized boards from OSHPark (US fabricated) for 40USD. From China I would probably get 10 for about 20USD.

CNC Mills kind of suck. The main issue is alignment of the top and bottom layers, the lack of vias, and that even with the additional pain (and cost) the quality isn't great (no solder mask is the main pain point).

A nice, simple, PCB printer would actually be useful. But they've a long way to come and I think it's quite a niche product. They'd need to produce at least 2 layer boards with vias for me to consider using one. Ideally they'd also have solder mask.

I think it's quite a niche play though. There are many differences between 3D printing and PCB printing, which make 3D printing more interesting/viable.

<comment><USER11> ~10 boards from China cost $12 with shipping, and the quality is quite good. I've ordered multiple times, and have been satisfied every time.

<comment><USER10> Sounds about right, I've found shipping to my location a bit higher than that.

I've also found that some suppliers are better than others. I've had suppliers not print silk on 50% of the boards in batches for example (this was when order a batch of 100).

</comment></comment></comment></comment><comment><USER12> The article says, "Dr Ehab Saleh and members of the team from CfAM found that silver nanoparticles in conductive inks are capable of absorbing UV light efficiently. The absorbed UV energy is converted into heat, which evaporates the solvents of the conductive ink and fuses the silver nanoparticles."

I don't think this will be economical if it uses silver as the conductor.

<comment><USER13> I think the quantities will be relatively small. Many electronics contain gold (~100x more expensive than silver), and as far as I know that hasn't really been a problem.

</comment></comment><comment><USER14> I think the main interesting thing here is that one can build bulk circuits .... many, 100s of, embedded layers deep as you build a 3D object .... the next step is obviously an integrated pick&place that embeds components in something as it's printed ... and of course the step after is something with enough precision to lay down say 2u FETs ...

<comment><USER4> Embedded components could definitely be a benefit. This sort of thing is already somewhat possible (e.g. PCB cavities) but has limitations.

Another interesting possibility would be designing complex surfaces that components can attach to rather than the traditional top/bottom of a PCB. Again this is already somewhat possible with techniques like 3D-MIDs (molded interconnect devices). 3D printing would make this sort of thing far more feasible though as MIDs are inherently limited to traces on the surface, meaning you're limited to a single layer.

Pick and place machines would need to get rather advanced for this to work as well. I know there are a few out there to handle MID orientations, solder paste extrusion, and laser soldering, but from what I've seen they're quite slow.

Of course heat dissipation and electromagnetic effects could become interesting design challenges (or design patterns) if the geometries are complex enough.

</comment></comment><comment><USER15> The article mentions a video but I can't seem to find it. If anyone finds it, please share it.

<comment><USER16> Seems like its in here

[https://www.tctmagazine.com/3d-printing-news/university- nott...](https://www.tctmagazine.com/3d-printing-news/university-nottingham- researchers-3d-print-electronic-circuits/)</comment></comment>


Implementing a dynamically sized array in C - <AUTHOR> http://happybearsoftware.com/implementing-a-dynamic-array.html <comment><USER2> Nitpicks:

* Typo in the header file (SIZE versus CAPACITY).

* No error checking on malloc() or realloc() return.

* Out of bounds access is a programmer error, so you should call abort() and not exit(). Alternatively, assert() is fine too.

* Potential integer overflow for capacity field (size field can't overflow because capacity overflows first). On a 64-bit non-ILP64 system, resizing to a capacity of 2^31 elements will request a buffer of 0xfffffffe00000000 bytes, assuming sizeof(int) is 4.

* A 32-bit version could theoretically get an overflow, but only if a 2^31 byte allocation is successful... the next larger allocation will be for 0 bytes.

Edit: As someone pointed out in the comments, arr[271] is the 272nd element, whereas the article claims it is the 270th element.

Further notes:

If you end up implementing a lot of these, invest in a consistent naming scheme for the fields. For example, map, mapsz, mapalloc; then data, datasz, dataalloc.

You can also try writing generics in C but I strongly recommend just switching to C++ (or some other language) if the boilerplate code bothers you. I believe that std::vector was the biggest reason for GCC's switch to C++ internally.

<comment><USER3> I've read that malloc(3) will not always return errors when you expect them to [1]. Any comment on this?

[1] <http://news.ycombinator.com/item?id=4735589>

<comment><USER2> I expect it to fail when it runs out of address space, or when address space fragmentation prevents it from fulfilling the request. Isn't that exactly when it fails?

</comment></comment></comment><comment><USER4> Fun read :)

I'm not sure if this is correct:

> By elements we mean the size of the type of the array. If an array holds > elements of type int which each occupy four bytes, then integer_array[5000] > is the same as

        *(integer_array + (5000 * 4)).

And that directly contradicts the earlier statement

>with subscripts e.g. my_array[271] would give us the 270th element. This by the way, would do exactly the same thing as

        *(my_array + 271).

(which also may be incorrect: my_array[271] would give you the 272nd element if you count my_array[0] as the "first" and 271st element if you count my_array[0] as the "0th".)

I dug up the relevant part in the C standard just to be sure:

> The definition of the subscript operator [] is that E1[E2] is identical to

        (*((E1)+(E2))).

<comment><USER5> You're right, the article is wrong. If integer_array is an array of ints or a pointer to an int, then integer_array[5000] is equivalent to

      *(integer_array + 5000), not

      *(integer_array + (5000 * 4)),

since pointer arithmetic in C automatically adjusts for the size of an array element.

</comment></comment><comment><USER6> if you don't have a not-invented-here symptom, you could also consider re- using the excellent stb stretchy buffers by the excellent Sean Barrett:

<http://nothings.org/stb/stretchy_buffer.txt>

<comment><USER7> Or simply use GLib's GArray:

<http://git.gnome.org/browse/glib/tree/glib/garray.c>

</comment></comment><comment><USER8> This is like 100 level C-S stuff, why is this on hacker news?

<comment><USER9> My guess: most people on HN don't have basic C competency.

<comment><USER8> That is pretty scary (and possibly true). If a hacker does not have basic C competency, they probably do not understand how their code, C or otherwise is executed...

I'm all for C-S programs having a focus on teaching how to learn, frameworks of understanding and theory, but there need to be a few practical lessons along the way, and C competency is one of those.

Maybe things have changed greatly since my undergrad but, the capstone of my undergrad C-S program was writing a C(lite) compiler for MIPS in C. This is in a program where for 60% of the classes the language in use was Java. I think this was a fantastic capstone choice.

Students were expected to have deep understanding of C and Java and a working knowledge of Scheme, Haskell, Prolog with HTML/CSS/Javascript never taught due to the expectation you teach them to yourself on the way like everyone else. Depending your electives you might have also picked up C#, Python and Objective-C.

</comment></comment></comment><comment><USER10> Allocating memory on initialisation is a bit questionable. It's better to alloc no memory and let the growth logic handle that case (either by checking for zero or by including an offset, such as vec->capacity += vec->capacity + 2).

The reason is code like this:

        vector vec;
        vector_init(&vec);
        for (i = 0; i < n; i++)
    	   vector_append(vec, some_operation(n));
        whole_vector_operation(&vec);
        vector_free(&vec);

It's both natural and desirable for this code to do no allocation when n = 0.

Since this is C, you might also include a macro to allow for static initialisation: #define VECTOR_INIT { 0, NULL, NULL } or something.

</comment><comment><USER11> Weird implementation. If you want an magical 'append' function, use a stack, or a linked list.

There's no reason you'd want to 'append' to an array.

(Imagine the situation you remove an item in the middle; what is append supposed to do now? What is remove supposed to do? The append function in this example is basically just 'make_me_bigger')

Still, if you did want to, I'd be doing this to reduce verbosity:

        #define _V(a) ((int *) &a)
        struct Vec {
          int *data;
          int size;
          int offset;
        }

        struct v;
        _V(v)[5] = 10;
        int value = _V(v)[5];

You only need two special calls; append() (aka. make this array longer) and free().

<comment><USER2> The _V() macro horrifies me. It's not remotely safe, nor is it even slightly correct. From least important to most important,

1\. The _V() macro is in the compiler namespace, which is a no-no. You can't legally use identifiers that start with underscores which are followed by upper-case ASCII characters.

2\. The _V() macro performs no type checking. It takes any addressable object as an argument. You can't do _V(3), but you _can_ do _V(printf).

3\. The _V() macro scribbles on memory.

        #define V(a) ((int *) &a)
        struct Vec { int *data; int size; int offset };

        struct v v; // don't forget the second v
        _V(v)[5] = 10; // this scribbles on the stack

What the macro does is take the address of the Vec structure (or anything else addressable, since it does no type checking) and pretends that that address is the address of an integer array.

The stack:

        |            |
        +</comment></comment><comment></comment><comment>+
        | int *data; | <---- &v, (int *) &v
        +</comment><comment></comment><comment>+
        | int size   |
        +</comment><comment></comment><comment>+
        | int offset |
        +</comment><comment></comment><comment>+
        | <stack>    |
        +</comment><comment></comment><comment>+
        | <stack>    |
        +</comment><comment></comment><comment>+
        | <stack>    | <---- &_V(v)[5] scribbles here
        +</comment><comment></comment><comment>+
        |            |

On a 32-bit system, _V(v)[5] is three words after the Vec structure, somewhere on your stack.

<comment><USER11> My bad, you are correct, that's not quite right. You'd do it like this:

      #include <stdio.h>
      #include <stdlib.h>

      #define _V(a) (*((int **) &a))
      struct Vec {
        int *data;
        int size;
      };

      int main (int argc, char** argv) {
        struct Vec v;
        v.data = (int *) malloc(sizeof(int) * 10);
        v.size = 10;

        printf("%lx <-- actual\n", (long) v.data);
        printf("%lx <-- cast\n", (long) _V(v));

        for (int i = 0; i < 10; ++i) {
          _V(v)[i] = i;
        }
        for (int i = 0; i < 10; ++i) {
          printf("%d was: %d\n", i, _V(v)[i]);
        }

        free(v.data);
        return 0;
      }

...

        roar:~$ valgrind ./a.out
        ==30957== Memcheck, a memory error detector
        ==30957== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
        ==30957== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
        ==30957== Command: ./a.out
        ==30957==
        51f1040 <-- actual
        51f1040 <-- cast
        0 was: 0
        1 was: 1
        2 was: 2
        3 was: 3
        4 was: 4
        5 was: 5
        6 was: 6
        7 was: 7
        8 was: 8
        9 was: 9
        ==30957==
        ==30957== HEAP SUMMARY:
        ==30957==     in use at exit: 0 bytes in 0 blocks
        ==30957==   total heap usage: 1 allocs, 1 frees, 40 bytes allocated
        ==30957==
        ==30957== All heap blocks were freed -- no leaks are possible
        ==30957==
        ==30957== For counts of detected and suppressed errors, rerun with: -v
        ==30957== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)

<comment><USER2> So, what's the point? Why not just use...

        v->data[i] = x;

This is, drum roll... type checked by the compiler, unlike _V().

P.S. Stop casting the result of malloc(), it makes you look like you're trying to write C++. There's no good reason for it in C, and there's a good reason not to do it (because it can mask an error if you forget to include <stdio.h>).

For this reason, and because it looks like you want generics, it sounds like you want to write C++. Why not write C++? Then you can just overload operator[] and go on your merry little way, without having to circumvent the type checker with macros.

<comment><USER11> Who said anything about generics?

You could just #define v(a) (a->data) and be done with it, it's true.

</comment></comment></comment></comment><comment><USER12> > // set a value at an arbitrary index

> // this will expand and zero-fill the vector to fit

> vector_set(&vector, 4452, 21312984);

Love to see a C article where we get some insight on how dynamic arrays might work behind the scenes. But sparse arrays are best implemented as linked lists or hash tables.

</comment><comment><USER13> There are much better libs out there that do this.

I always use the utarray and uthash stuff when I can.

<comment><USER14> I believe this article was mainly for educational purposes though.

</comment></comment><comment><USER15> This C code is bad for the following reasons:

1\. No alloc checks 2\. This module is limited to storing integers. 3\. The type Vector is exposed to the user.

An alternative approach for contiguous dynamically sized array is to use mmap/madvise.

<comment><USER16> Strangely, alloc checks no longer work in Linux and possibly other OSes. Because of overcommit you can have malloc give you an non-NULL result that will fail when you try to write to it.

I still include them in my code, but I don't expect they will save me.

<comment><USER15> malloc failure isn't just bound to running out of physical memory. It can fail because of fragmentation, with or without overcommit.

<comment><USER16> Sure, but I still have to design for random segfaults on memory writes. I guess I could write to all newly allocated pages and get a little more assurance that the allocation worked. I could still be whacked by a deduplicator, though unique writes would help.

<comment><USER15> I think when you run out of physical memory & swap, there's a bigger issue at that point. Or that's what the designers of overcommit decided.

</comment></comment></comment></comment></comment><comment><USER17> It's really unfortunate to see so many pedantic posts on this thread.

The article author explored something that probably isn't obvious to most programmers who didn't come up from low level work. And I am sure this isn't on the radar for your average PHP, JS programmer. And that's fine.

No, the code isn't production ready. I didn't get the sense that this was the article's intent. The author actually did a very nice job of explaining one approach. Good article and very accessible . Ease up. Help him make it better without being so condescending.

</comment><comment><USER18> This is a great article for anyone wanting a "behind-the-scenes-look" at how things work.

It's also great in reminding me: the fact that we've moved to automatical memory managing languages is a HUGE LEAP FORWARD in computing, possibly the biggest leap forward in the last few decades. The amount of code you _don't_ have to deal with, the amount of bugs you're _not_ making on a daily basis, is astounding.

Thank God we're in the age of modern languages. Makes me wonder what the next great leap forward in computing will be.

<comment><USER19> I wouldn't call automatic memory management a "huge leap forward" at all. Sure it makes code a bit more concise and eliminates leaks (more or less), but it makes your code less performant and just shifts the problem away from the programmer to the VM instead. It's a leap into lazyness, if anything. It also creates problems since now people think it's OK to "new" objects within a for loop freely

You can probably tell by now that my goto language for any kind of large scale application is still C++ w/ STL for safety :). For small hacks, obviously I'd use python, js or ruby or something like that any day.

<comment><USER20> On a slightly related note, a just-in-time compiler with a superb garbage collector can be more performant in some situations due to its ability to profile and optimize the code while the application is running.

Such runtime statistical analysis and real-time optimization is not possible in an application that is compiled to native code.

For $189, I can slap a 240GB SSD in the machine to make software more performant. The question you have to ask is: How much optimization can a senior-level programmer accomplish for $189?

JDeveloper (an IDE) takes about 30 seconds to start on my co-workers' computers. On my laptop, boasting a 240GB SSD, JDeveloper is ready in about 5 seconds.

See also: <http://stackoverflow.com/a/145122/59087>

And see also: <http://www.ibm.com/developerworks/java/library/j-jtp09275/>

<comment><USER21> >On a slightly related note, a just-in-time compiler with a superb garbage >collector can be more performant in some situations due to its ability to >profile and optimize the code while the application is running.

No Garbage collector can be faster then a programm that produces no garbage at all, because its programmer knew what he was doing.

>For $189, I can slap a 240GB SSD in the machine to make software more >performant. The question you have to ask is: How much optimization can >a senior-level programmer accomplish for $189?

This ist the typical academic way of optimization: Let's write some programm and then throw hardware on it until it runs fast enough. In the real world, ressources are limited. That $189 are needed for each install of your garbage- collected software, not just YOUR personal develoment machine.

<comment><USER20> [http://www.crucial.com/store/partspecs.aspx?imodule=CT032V4S...](http://www.crucial.com/store/partspecs.aspx?imodule=CT032V4SSD2)

SSDs are now $51. I don't see this as an academic means of optimization; I see it as a practical business value. Why would I pay a developer to spend 8 hours on optimizations when I can pay a developer to spend 8 hours on features and bug fixes? Meanwhile, I can drop $50 today (as opposed to $200 8 days ago) and get SSDs for the database, web server, and two developer machines?

If SSDs were down to $1 for 64 GB, would you still claim throwing hardware at the problem is an academic solution?

</comment></comment></comment></comment></comment><comment><USER22> Seems relatively similar to implementing a dynamically resizable in Java (assuming you're not allowed to use an array list). The only difference is the malloc business, which isn't necessarily safe given that there's no check to see if the pointer is null after the mem allocation. It seems like the only critical piece is checking the array size, if it's too small, double the size of the array.

</comment><comment><USER23> Here is a nice implementation of dynamic generic arrays in C:

[https://github.com/twitter/twemproxy/blob/master/src/nc_arra...](https://github.com/twitter/twemproxy/blob/master/src/nc_array.c)

[https://github.com/twitter/twemproxy/blob/master/src/nc_arra...](https://github.com/twitter/twemproxy/blob/master/src/nc_array.h)

</comment><comment><USER24> I think it would be wise to add a `shrink` operation when the array ends up being 1/4 full (shrink to 1/2 size). Otherwise you might end up hoarding memory you don't need anymore. The operation would be called automatically whenever you delete an item from the array, checking if a `shrink` is appropriate.

</comment><comment><USER25> This approach pretty much depends on the underlying OS to do the reallocation of memory.

It is usually a good idea to do this. At the same time, if performance is an issue, you could look at what other allocation algorithms are available.

</comment><comment><USER26> There's really no need for the pointer inside the struct. You could just use a flexible array member (introduced in C99) or a "struct hack" if you're still using C89.

<comment><USER27> If you do this, the Vector could likely move when resized.

<comment><USER26> True, the vector_append function would have to return a pointer to the new location; this might or might not be a problem, depending on how your program is structured.

</comment></comment></comment><comment><USER28> Memory pools, dynamic arrays, custom vector implementations, etc. Pretty sure most have been done to death. Find the one that meets your usage and move along.

</comment><comment><USER29> reminds me of my college days!

</comment><comment><USER30> any idea what causes this? the code run fines on Windows but when i tried on os x (with sublime text), i got this error instead.

        symbol(s) not found for architecture x86_64</comment>


Show HN: Amazon Wishlist Stats - <AUTHOR> http://amazon.pyralis.net/

<comment><AUTHOR> I had added this yesterday but forgot to add the Show HN :(. Adding it here again. Apologies for the repost.

</comment><comment><USER2> How are you fetching the prices?

<comment><AUTHOR> Scraping your wishlist print page. Caveat: the prices will be shown as if I was a user living where my server location is (it actually varies a lot).</comment></comment>


Show HN: Connect Sheep to the Internet - <AUTHOR> https://github.com/dziungles/Connect-Sheep <comment><USER2> I love it. I couldn't help but make fun of it by sharing it and saying it's certain to be success!

And I honestly hope it meets its goal.</comment>


Ask HN: Are you glad you dropped out of college? - <AUTHOR> I'm strongly considering dropping out of a solid school (a tier or two down from Ivy) to pursue programming. I have a year+ of work experience from a few internships I did during/after high school, an outstanding job offer from one of them, and I've picked up some interesting contract work while in school.
I'm very self-motivated, and it's making me a little crazy doing all this work that seems to not be relevant to my goals. I think I could do a lot of interesting things on my own, and have a history of doing that. I just finished up a gap year in which I did a ton of traveling which I planned and financed myself, and got a high-paying (for my age) internship.
I also feel like if I at some point wanted a degree, dropping out now doesn't mean I won't be able to get one ever -- I could just re-enroll down the road.
I'm curious to hear from people who've made the decision to drop out, and how it ended up turning out for them. <comment><USER2> Hey there.

I dropped out just over 6 years ago to join Pinterest (I still work there). It's the second best decision of my life (besides asking my wife to marry me).

How much longer do you have left in college? Do you enjoy it?

Obviously this is a case by case basis, but my thought process was -

1\. I went to a decent regional school (nowhere near Ivy) and had a below average GPA (2.7 IIRC).

2\. The cause of that low GPA was due to me spending my free time hacking on things, not studying.

3\. Worst-case, I try and interview at a bunch of places and don't get any offers so the decision is made for me.

Fortunately for me, I didn't have a ton of student loan debts due to scholarships, so financing the education was not a factor in my case.

I had 1.5 years left. I loved college and some parts of school. It was really hard to leave. Looking back, I'm glad I did it but it was a rough few years seeing all of my friends have the time of their lives while I was working (even though I've loved my job). Once everyone graduated all of that FoMo went away. That's also when new grads who were my age also started working there, which was nice.

Graduating from the university I went to wouldn't have put me in a better situation relative to other applicants (meaning, I would still be going up against Ivy grads for the jobs I was after).

I ended up dropping out _after_ being offered a promising job opportunity and I'd recommend that route to you if it's possible. It makes the transition a lot easier.

Hope that helps! Happy to chat more via email. c at cnnr dot me.

</comment><comment><USER3> What's the outstanding job offer, and what does the company do? But a great job offer doesn't mean the job will stay great, or that you won't decide to leave later. Plus graduating might get you better offers down the road.

I'm working full-time and finishing up school. I decided I was really interested in working full-time and accepted a really good job offer. Working full-time isn't always fun while finishing a degree, but it was a decent decision. It's definitely delayed my graduation though.</comment>


Teen sends dick pic to 22-year-old woman, now he's a child pornographer - <AUTHOR> https://arstechnica.com/tech-policy/2017/09/teen-sends-dick-pic-to-22-year-old-now-hes-a-child-pornographer/ <comment><USER2> Much cooler: Germany's highest criminal court ruled that you can be an accessory to attempted murder... of yourself ("Verfolgerfall").

That was a case of two robbers who were fleeing the scene. One of them looked back and saw himself pursued. He shot at his pursuer who actually was his accomplice. Both were convicted of attempted murder.

</comment><comment><AUTHOR> IMHO this is a clear indication that something is desperately wrong with the law.</comment>


Show HN: Remotewise working resources - olly-thomas https://remotewise.io <comment> olly-thomas Hey Hackernews!

My names Olly (a Designer from the UK). I've been a long time lurker on Hackernews but now I finally have something to share with the community. I'm excited and a little nervous, but I guess that's natural right!? Along with my friend Oliver (Developer, Sweden/Japan) we have been working on Remotewise.io. It's a new resource and learning platform dedicated to remote work.

We've both been working remotely for most of our careers. Over this time remote work has been gaining huge momentum as a viable and desirable way to work and we believe it's the future. We've been working on this during our evenings and weekends in between our full-time remote roles, so we're really excited to be putting it out for you guys. We'd really appreciate any feedback as I'm sure many of you are remote workers yourselves or thinking about going that route.

You can check it out here: [https://remotewise.io](https://remotewise.io)

So, why did we create Remotewise.io? We noticed it was often tricky and time consuming to find quality and relevant content about remote work and the companies which champion it. We wanted to create a focused, discoverable and beautifully curated list of resources so that you can learn from the leaders in the industry, what it takes to work as a highly effective remote team and how to nurture a healthy remote culture. We see the site as a learning and discovery platform that in the process helps you find the best company fit for you, hopefully taking the pain out of searching for that perfect remote role.

We're launching a weekly newsletter too so if you're into it sign up and receive the latest updates.

We'd love to hear your feedback as it's really early days for us and we're excited about where we could take it. You can also reach us at email@example.com or tweet us @remotewise.

Massive thanks, Olly & Oliver

</comment><comment> olly-thomas As a note - I messed up and posted as the wrong type of thread the first time I posted this and not a "Show HN". My bad, sorry!

We genuinely would love all of your feedback!</comment>


Simple SaaS listing based on your growth stage, pain-points and industry - Ozzie-D We built toolbase.io to help makers, product managers and digital transformation specialists to find the SaaS tools that would be best for their specific pain points, industry and stage.<p>Start the three-step user journey here. https://toolbase.io <comment> Ozzie-D [https://toolbase.io](https://toolbase.io)</comment>