I dropped over 40 grand when I could have spent $100 - <AUTHOR> http://boondainc.wordpress.com/2013/04/18/i-dropped-over-40-grand-when-i-could-have-spent-100/ <comment><USER2> I agree with you that perfect sizing is the future of fashion retail-- especially online. However, I completely disagree with your methodology.

This demographic is going to be won over by _marketing_ , and you didn't have the correct marketing play in hand when you ran this survey. I'm going to give you an example:

If you ask people: "When shopping for clothes on the web, would you submit your email address if...?"

Most people would probably say no. "Submitting your email address" sounds like you're about to "submit to" a bunch of junk email!

However, if you ask them if they want a perfect fit (you'll probably need a better way of saying this than you have right now--you'll want to do demographic research to find out how high-income women actually would articulate this), you can find a demographic that will say "yes". As a bonus, you'll have the lingo they use and be more easily able to sell to them because you are speaking their language.

tl;dr: Given the word choices and copy you could have used, "submit your body measurements" was almost guaranteed to bust, but it doesn't mean you have the wrong idea. It just means you have the wrong way of saying that idea in a way that appeals to your market.

<comment><USER3> "perfect fit" may be less of an issue than you think for high end fashion. If you asked them if they have trouble finding the perfect fit, I wonder what they would say. A lot of these women wear things like Lululemon, which fits really well, and makes their butt look good.

They don't necessarily wear high end fashion (heels, skirts, whatever) because it "fits". They wear it because they like how it looks, how it makes them feel, etc.

My wife is an independent high end fashion designer. Working on fit is incredibly hard and specialized, from a product and marketing perspective. Good patterns are the fashion equivalent of good software. They take a long time to get right and require a lot of work. They also don't necessarily translate to an online experience that well, for several reasons.

Any business in this space needs to overcome them:

High end designers usually target particular body types, and then market specifically to that group.

I worked on a project for Levi's in the 90s for getting the perfect fit for jeans. We had laser cutters, 3D body scanners, and more.

It failed. Getting the right fit wasn't a just a matter of measurements. It was a manufacturing issue too.

Even two garments that have the same measurements may not fit exactly the same because of manufacturing issues, fabric tolerances, even customer perception.

When a customer tries a garment on, it can stretch, alter or rip. So if they don't purchase it, the second person trying it on may not have the same experience.

A garment that "fits" someone may not actually look good, depending on their body type.

High end customers also have expectations of being able to return anything, for any reason (think of how Nordstrom's handles this for example) These things can really hurt margins.

<comment><USER4> I'm a little puzzled by the "perfect fit" thing myself. In college I worked for a men's specialty clothing store in NYC. All the expensive stuff (IOW, most of what they sold) was adjusted by the in-house tailors. You'd buy something off the rack, and then be immediately taken to someone who would take your measurements and take it in/let it out to get a good fit.

Doesn't this kind of thing happen anymore?

D

<comment><USER5> Even cheap stuff looks better if you get it altered, but yeah; the price-point this guy is targeting doesn't really wear 'off-the-rack' clothes. I wonder if he did any research at all, or he just thought "People with lots of money will pay lots of money for clothes". They shop pretty much entirely differently than your average (or even above average) consumer.

</comment></comment></comment></comment><comment><USER6> Unless I'm missing something here it looks like there were a total of 17 responses (8 yes 9 no). Are you really making a major business decision on a survey with an N of 17?

<comment><USER7> This is a really good point, it was the first thing I noticed as well. 17 responses isn't even enough to throw a margin of error at, the entire survey is effectively a margin of error of 100%.

If it really was only 17 responses that's the equivalent of asking five people on the street if they like hot dogs and then deciding based on their answers to open up a laundromat in Brooklyn.

<comment><USER8> Once you add in a proper confidence interval, 17 responses on a yes/no question is enough to make decisions like this - as long as you know in advance what your target numbers are. The downside of the small sample is that your margin is going to be extremely large, of course.

Using Clopper-Pearson at95% confidence tells us that between 23.3% and 70.8% would answer yes to this question. I do agree that is probably still too broad to decide to kill a business, but if you know you wanted a 60%+ (for example) positive response from this audience to hen that sample is enough to cause some serious worry.

<comment><USER9> It's then breaking them down into subcategories. Look at the confidence interval on the posted charts: +/- 80% on the high income responses this survey was interested in. I.E. worthless.

</comment></comment></comment></comment><comment><USER10> _The target audience for Rewire Attire, the high end fashion marketplace, was women with enough money ..._

Whenever I read "target audience" and "with enough money" in the same sentence, I run the other way.

My experience with prospects "with enough money":

      - there are far less of them than everyone else
      - many of them didn't earn it themselves, so...
      - they really don't really understand the concept of "value"
      - they don't understand investing vs. consuming
      - they think they are actually the source of their own gifts, so...
      - they think they're better than others, so...
      - they will treat you like shit, not like a trusted business partner
      - they will second guess you
      - they will override you
      - they'll blame you for the bad things
      - they'll take credit for the good things
      - they won't pay you on time
      - they will protest their bills
      - they'll make you hate them and wonder why you're doing this

Save yourself the agony and just build something for the masses, where no one can become big enough to make that much difference.

Edit: Like OP, I'm referring to B2C, not enterprise.

Edit 2: Normally when I see a bunch of bizarre replies to a post of mine that begins with "My experience...", I just close my browser and go back to work. But I guess I'm in a strange mood, so in order to avoid cluttering up this thread (and in the spirit of good clean fun without malice), here goes:

diego, you say "One data point is not generalizable..." and then introduce your own data point. It was never my intent to "generalize", just to share my experience.

chc, I'd prefer to read about what you _did_ over of what you _hear_. If I'm going to listen to someone else's antecdote, I'd rather do it over beers.

PaulHoule, nice story, but what's the point?

larrys, My list does not directly contradict the success of just about all luxury brands that have been successful. They would probably agree. They've just chosen to thrive in such an environment. I don't.

Samuel_Michon. I believe you. Thanks for sharing your experience.

fredsted, it pretty much does not differ from everybody else? I'd rather have 100 difficult customers with 1% of my ass than 1 difficult customer with 100% of my ass. That's all.

(Sorry if the tone seems negative. I'd love to learn how to better communicate in writing on-line without being misunderstood... It's a work in progress.)

<comment><USER11> High end consumers are often jerks, but so are some people who sell to them.

I know a woman who makes hand-knit sweaters for about $250. She makes them out of acrylic yarn, which shocks me. If I'm going to spend a lot for clothes I'm going to want a nice material, like wool. Particularly when you consider the cost of the labor, the extra cost of the wool is nothing.

She told me she did sell a wool sweater to somebody who went home and washed in hot, it shrank, and then heard no ends of complaints about it, so she resolved to never sell wool sweaters unless they are specially commissioned.

Some luxury retailers provide a great experience, like the ones around Rodeo Drive in Beverly Hills. Other ones make it really clear they hate you. I know of one retailer in the UK where if you buy something with a credit card you'll get fraudulent charges from the UK just a day or two after your order.

Nasty.

<comment><USER12> "She told me she did sell a wool sweater to somebody who went home and washed in hot, it shrank, and then heard no ends of complaints about it, so she resolved to never sell wool sweaters unless they are specially commissioned."

n=1 there then, right? Perhaps she was a bit to hasty based on that single data point?

One of the things luxury brands do is bake into their costs margin to account for customers like this. Or to account for unreasonable people.

<comment><USER11> I think I'm also unusually snobbish about materials.

If you go to a crafts store they usually have a big section of wall devoted to acrylic yarn. You might find one or two kinds of wool yarn and maybe a blend, but it's pretty clear that grandmothers who knit stuff for their grandkids value 20 hours of their time less than the $10 or so difference in the price of the materials.

<comment><USER13> Look at it the other way: maybe acrylic yarn serves a pain point. Maybe grandmothers spent 20 hours knitting a beautiful little hat or coat or something, only to have it ruined in the wash by a young, sleep-deprived parent, inexperienced in caring for quality hand-crafted goods.

Grandma figures out she can just use acrylic and now her work doesn't get ruined by washing & drying, and as a bonus the moths don't eat it because who has a cedar chest anymore?

</comment></comment></comment></comment></comment><comment><USER14> I don't buy this. There's something about the article that annoys me, too. I can't quite put my finger on it. I think it's because it has a linkbaity title, a tone of confidence, but is filled with weird stuff.

Disclaimer: I co-founded Everlane (<http://everlane.com>), although I left to start Dev Bootcamp (<http://devbootcamp.com>) last January. I'm just speaking for myself.

First, look at the error bars. 100.0% (+0.0/-79.3) Saying "the sample size is too small" doesn't even do it justice. Looking at numbers like this will put you in a mindset where you make silly decisions because, hey, they're numbers! They're objective!

Second, this is not how fashion works. As a rule I don't trust survey results early on in a product life cycle -- customer's don't have sufficient context, so you're learning more about their predispositions and biases than their actual attitudes about your (potential) product.

Talking "scientifically," there's a huge uncontrolled variable here: brand. Would women share their measurements with Hermès if it meant proper sizing? How many women who shop for high-end clothes employ something like a personal shopper? What about stores that sell more intimate products, like lingerie? How about wedding gowns? Of course a woman would share he measurements to get fitted for a high-end wedding gown.

I have yet to commit any capital or conduct any surveys and already I feel like I have a decent framework for approaching these issues. If there are high-end retailers with whom women are comfortable sharing their measurements, what is it about those retailers that makes them comfortable?

Why would a woman be willing to share her measurements with Hermés but not Ross Dress for Less?

IMO that's a 1000x better starting point than the one asked in the survey.

This survey is neither reliable nor valid.

<comment><AUTHOR> You're right, there was more to the decision to pull the plug. Credibility was something that we thought and worked hard on. If you're credible with your shoppers, they'll trust you more. I still believe that data can improve fit, but it may be better suited for a company like Everlane (that makes their own product) than Rewire Attire (that retails product). The truth is, the survey was the nail in the coffin. The suggestion of the blog post is that I might have saved myself a lot of money had I done the survey early. The unspoken question is, would I have proceeded with the business had I known earlier? Is it an obstacle that I could overcome? Who knows. Do I regret the experience....never.

</comment></comment><comment><USER15> This entire article is based on a failure to understand error bars. The graph clearly shows that it's _possible_ up to 79% of affluent young women would answer "yes" to this question, and more data is needed to draw an actual conclusion.

</comment><comment><AUTHOR> Wow...thanks for all the comments. I've been a causal reader of Hacker News, but this was my first post. I'm really impressed all the comments. Lots of great questions/comments.

There was one thing I neglected to mention in the blog post, that I should mention now. We ran a contest (prior to the survey) that required contestants to submit their body measurements. We wanted shoppers to see the power of submitting their measurements. We threw quite a bit of money and traffic and the contest and we saw almost no engagment. My thinking was, if we can't get shoppers to submit their measurements for a chance to win a free high end fashion design, we might have a problem (let's do a survey!)

As @lmm suggested the demographic for high fashion is mostly women. Also, we struggled to find high end men's fashion designers interested in our offering.

@ericabiz - We played around with the language on our site, however, admittedly, I'm not a marketer, so there was definitely room for improvement here. Which is why I've signed up for CoFoundersLab (<http://www.cofounderslab.com>) so I can find a compatible partner before jumping into my next start up.

<comment><USER16> Yuck. Without a doubt, the biggest failures in my marketing career started with "let's give them a free..."

Gaining market share or customers via free X promos is a doomed strategy. I have my theories, but the main thrust is some mumbo jumbo about perceived value. I've sat in interviews with more than one company that said with a not- ironic face that suffering now will cause explosive results in the long term. I pipe up and explain why this isn't so. Why I offer this advice for free is beyond me.

<comment><USER17> I recall reading an article about a pair of grad students who realized that there was a correlation between price and perceived value. IIRC they were researching condom use in the third world and figured out that the locals would use condoms purchased at stores, but would discard condoms passed out for free by NGOs. So the grad students started their own NGO that uses "cool" Trojan/Durex-style marketing to sell condoms dirt cheap.

I can't find the article, but it may be this group:

[http://www.law.harvard.edu/news/bulletin/2005/summer/classno...](http://www.law.harvard.edu/news/bulletin/2005/summer/classnotes_02.php)

Also see:

[http://www.fordham.edu/images/undergraduate/economics/facult...](http://www.fordham.edu/images/undergraduate/economics/faculty/brent/condoms.pdf)

From page 4:

 _Obviously, the whole point of providing condoms is that they be used for sexual activities...They are not meant to be used, for example, for water storage. However, if they are free, then there are a large number of possible uses for condoms that generate positive utility even though the benefits do not cover the costs and they do nothing to prevent the spread of HIV. For example, Epstein (2007, p271) reports that when the CSM run by PSI in Zimbabwe tried to distribute free female condoms, the officials found that people were removing the plastic rings and selling them as jewelry._

</comment></comment></comment><comment><USER12> "I found this out by spending $100"

"The target audience for Rewire Attire, the high end fashion marketplace, was women with enough money to afford high end fashion and that are young enough"

Not so fast. Forgetting even the small sample size and methodology I'm wondering whether the OP did any other research at all? And "sharing measurements" is only 1 factor in making this business a success.

Additionally no reason that they couldn't have forked/morphed/pivoted the model built to some other group (say the men who buy custom made suits for thousands - not saying that would or would not work but even if OP is correct about the market info (and I don't think enough research was done to prove out the point anyway) it could work in another group.)

</comment><comment><USER18> Surveys may be getting at the wrong question.

As <http://paulgraham.com/startupideas.html> says, you want to work on an idea that a few people _really_ want. Then you want to go out and find some of those people. Talk to them. And make what they want.

Concrete case in point. I remember reading an example of how an early focus group mostly panned a particular automobile, but 1/3 of people REALLY LOVED IT. On a survey it would have looked bad, but went on to be one of the most successful vehicles on the road. (I think it might have been the Ford Bronco, but don't quote me on that.) You don't care how many won't buy, you want something that you can find sufficient enthusiastic customers for.

When a woman finds something perfect, she likes to tell her friends about it. Suppose that your friend is standing in front of you in great clothing talking about how good the clothing from ____ is, you just sent them your measurements, browse the clothing, and they will send them to you tailored to fit, then you're likely sold. You've got to get those women started.

To do that you've got to do like Zappos did. You've got to have a generous return policy. Furthermore when you get returns, you need to try to get information about why it is returned. Because one of the reasons why stuff will get returned is fit, and the descriptions you get back are going to help you learn more about how to customize clothing to that women to give her a better fit next time. This is essential.

There is a lot to learn to make this work. And if you want it to work, it is absolutely necessary that you've got to get it right before trying to get popular.

<comment><USER19> that's a good point. there are plenty of successful niche market businesses. sometimes 5% of market share is all you need. It stands to reason that the more niche your audience, the more important marketing becomes.

</comment></comment><comment><USER20> It looks to me like out of 899 responses, only THREE were from the $100K-149K female target.

Two of them said NO, and one said YES, making the results 66% negative and 33% positive.

Just not enough "on target" data to surmise anything.

</comment><comment><USER21> I believe we all make this mistake, event outside of startups. Think way back to middle school when you had a crush on that girl or guy and everything seemed perfect, and you were in love, but they didn't know it yet. All the signs were pointing to, Go for it! But you still waited months and months developing in your mind a perfect moment where you would ask them out, and they would say, "Yes!! I've been waiting for you to ask me forever!!" Then, you finally get enough courage to ask the question, just to get shut down.

A 10% positive response is often enough to ignore the other 90%. It's something we're all working on.

</comment><comment><USER22> >> The pitch was to get away from inaccurate generic sizing terms like "small", "medium" and "large" and move to a system based on body measurements.

I'm a man and possibly missing something, but it seems to me that women's clothing is _deliberately_ inaccurate.

When I buy pants (in America), the measurements are expressed in inches. I rarely even try them on.

Women's sizes vary by brand and seem engineered to flatter rather than describe. A woman buying a "size 0" has not expressed her desire for a predictable, sensible sizing system.

<comment><USER23> You should, there's lots of vanity sizing nonsense going on. For example, a 3sixteen ST-100x in size 30 is actually a 31 inch waist, and it will stretch about another inch!

[http://www.3sixteen.com/collections/homepage/products/st100x...](http://www.3sixteen.com/collections/homepage/products/st100x-slim- leg-raw-indigo-denim)

</comment></comment><comment><USER24> It should be noted that while the screenshot shows only 17 responses, the _actual_ survey* has 899 responses. Looks like only 17 responses fit the filters on the sample set.

[http://www.google.com/insights/consumersurveys/view?survey=b...](http://www.google.com/insights/consumersurveys/view?survey=bzmnn6ltiujd6&question=1)

<comment><USER25> He filtered on Female and 25-34, while comparing on income. That shows the same chart as his screenshot.

However, that tendency holds at higher age groups which do have more data. I noticed the charts also have what I believe are standard deviation bars, which show that the results are not even close to being statistically significant.

</comment></comment><comment><USER26> I wonder if the age filter was too low. Older women are more likely to be affluent, and to be more comfortable sharing their body size. Women over the age of 35 buy lots of stuff online, at least the ones I know...

</comment><comment><USER27> Quite an intriguing article. Just wanna add that the opportunity cost of 1 year is way more than 40 grand. Back to biz school 101, market research is always step 1.

</comment><comment><USER28> Why would it only be for women? I live in Europe and would love to get some thinkgeek tshirts. The shipping cost is high however, so I'd order multiple at once, but I have no clue whether "small" or "medium" will fit me better. So I don't risk ordering them, or they could all be the wrong size. I'm male by the way.

<comment><USER29> He was deliberately targeting the high end, designer stuff; the demographic buying >$500 clothes is overwhelmingly female.

<comment><USER28> Ah, I see. True that :)

</comment></comment></comment><comment><USER30> >"high end apparel/fashion" x 4

Everbody wants clothes that fit.

I don't know the first thing about fashion, and my wardrobe is anything but high-end.

However, I'm well-paid and ready to be a lifetime customer for anyone who can sell me slacks that simultaneously fit a >36" inseam, <38" waist and thighs which are no stranger to squats.

</comment><comment><USER31> This is good advice in general, but the trick is knowing what questions to ask. To knowing which of your (many, many) assumptions might just be wrong.

Humans are strange beasts. There are so many seemingly simple things we could do that would vastly improve our lives, yet we refuse to do them.

</comment><comment><USER32> The data is interesting, but maybe incomplete. Doesn't look like you have quite enough information to truly understand the market.

Apologies for name-dropping a colleague's project, but you might want to look at <http://validate.io> for a more comprehensive, scientific analysis that's actually done by someone who knows how to design surveys and analyze data (they have a PhD design and run a survey for you, it's pretty sweet). A little more than $100 but worth it to have good data on your market. You might still avoid wasting $40k going the wrong direction, but you might be able to trust it more.

</comment><comment><USER33> Did he tried with men?. I defenitely would give my measures to be able to buy clothing online, tshirts, hoodies, pants, even caps. I don't buy online right now unless is a bramd I already know and I go directly for my size. Is

<comment><USER34> If you click on the google survey results image he links to the results where you can look at the male segment as well.

<comment><USER33> Thank you. Any way I was meaning if he did pivot to men apparel, sports tshirts, etc...

</comment></comment></comment><comment><USER35> The OP is way overestimating the importance of body measurements and is targeting the wrong demographic.

1\. What looks flattering varies drastically from one woman to the next, and the determining factor of what looks good on you isn't body measurements. It's body shape. Designers tend to target a specific body type, and women who shop for designer clothing need to identify which type they are. This is where style is hard, and where women could use help.

2\. Body measurements help determine type, but it's not that straight forward. Petite women with have smaller differences in measurements to indicate type. Shape of certain body features (especially bust) isn't fully indicated by measurements.

3\. Type is important not for fit but to determine what styles you should wear. If a user's measurements indicate narrow shoulders, you should not be displaying halter tops, even if the bust, waist and hips sizes are correct.

4\. Women with enough money to buy designer clothes and care about fit also have enough money to pay a tailor. They are much more concerned about style and quality, and will pay someone else to make it fit them.

Mr. Borden, if you're still interested in the idea I have a few suggestions for your next iteration. Target women with enough money for nice clothes, but don't know how to shop for them.

Use either body measurements or some sort of questionnaire to determine a few important body characteristics- type, bust-size, petite, plus, tall, broad shoulders, ect- you could even ask what part of their body they like most/don't like. Market your platform to women as a way to discover their own personal style, to feel more confident in the body they have (self-image is a huge source of shame for many women). Hire some personal shoppers to help write blog posts on style, body type, confidence.

Then display clothing based on what would look good on that woman. Not size, style. So if she has a large bust, don't display turtlenecks. This is where you provide value.

You could take this a lot further- a user clicks on a top, show pictures of skirts or belts or shoes that would go with it, or even generate outfits that will flatter her.

Search is another way to provide value here. It would be awesome to say, I want to look at dresses with this or that neckline, or shirts that match this color.

</comment><comment><USER36> Surveys have their place, but I'm a little surprised that a student of Steve Blank/Eric Ries' teachings wouldn't be "getting out of the building" and talking to people.

<comment><USER37> Indeed. Surveys can help you frame what you're looking for, but you _need_ to talk to real people and get a bit more of an understanding of _why_ they feel the way they do.

<comment><USER38> Sometimes it's tough, and a survey is a poor but doable substitute - I don't know how I would go about interviewing women in the +100k earnings range, and for one of my projects I did a survey because the potential customers were geographically far away.

However, I'd never have invested so much before knowing the audience.

And he had this HUGE problem of having invested his ego on a (probably very cool) solution, which is one of the toughest challenges for us tech types.

</comment></comment></comment><comment><USER39> Fun fact: Women seem to be more willing to share their body measures than men:

[http://www.google.com/insights/consumersurveys/view?survey=b...](http://www.google.com/insights/consumersurveys/view?survey=bzmnn6ltiujd6&question=1&filter=gen%3AMale)

[http://www.google.com/insights/consumersurveys/view?survey=b...](http://www.google.com/insights/consumersurveys/view?survey=bzmnn6ltiujd6&question=1&filter=gen%3AFemale)

n about 450 each

<comment><USER40> I'd wager that women are more likely to confidently know their measurements than men.

</comment></comment><comment><USER41> Any user who upvoted this story should lose all of their karma. A grade schooler could point out what is wrong and horrifically unscientific about this blog post.

</comment><comment><USER42> The margins in high-end apparel are so high that it would be better to send three sizes rather than magically select the right one. It's also a better customer experience as the consumer gets a chance to try on merchandise that feel their way to the right choice for their particular body. It also appeals to affluent buyers because they feel the merchant is catering to them in a way that is common in an in-store experience.

</comment><comment><USER43> This is why I wouldn't want to build a product where I'm not the target audience. You don't see me doing women's fashion startups, or tampon subscription as a service, or child/teen games, or whatever.

It's a problem because ~no 3 year old is an iOS developer, and most developers are 15-40 year old men, so it's less likely you'll find good products for 3 year olds vs. developer tools, but it does avoid this particular problem.

<comment><USER44> FWIW, some developers do have young kids. I make software for mine.

</comment></comment><comment><USER45> I this not just knowing your market?

I had a friend drop $20,000 on a new supplement and training business, built out an app for trainers the way he saw thought it should be, and recruited trainers. Lots. Showed them the app, and got a lot of feedback, but by then it was too late. He was out of money and no dev wanted a piece of the pie.

He should have done his market research first. The OP too, no?

</comment><comment><USER46> <http://fits.me/>

These people are trying to solve this problem. They have also taken a very interesting route and built a robotic mannequin which can change it's shape.

In any case I don't think I will ever be able to give a better overview than the site itself.

</comment><comment><USER11> It's funny.

If you want to look better than average, the first thing to pay attention to is how your clothes fit.

</comment><comment><USER47> It is not possible to infer anything from such a low sample population (45). For statistically significant results, you would need to spend on the order of $1,000 not $100.

</comment><comment><USER48> > I dropped over 40 grand

Pick it up and be more careful next time.

</comment><comment><USER49> But really, the best line from Good Will Hunting is the "how about them apples" line. <http://www.youtube.com/watch?v=VmRe_fK7pbw>

<comment><AUTHOR> So many good lines....and I agree, that is the best</comment></comment>


Boost-Reflection - <AUTHOR> https://github.com/kingluo/boost-reflection <comment><AUTHOR> It's a good project I wrote years ago. It implements Java-like reflection in C++. Just declare your reflection, and use it via Java-like API. Annotation and object proxy just like Java is also supported.

See [https://github.com/kingluo/boost- reflection/tree/master/libs...](https://github.com/kingluo/boost- reflection/tree/master/libs/reflection/test) for examples.

Reflection is the base to implement framework like Java Spring, see [https://github.com/kingluo/boost- reflection/tree/master/libs...](https://github.com/kingluo/boost- reflection/tree/master/libs/reflection/example), which is a simple IOC example.</comment>


Selling Bitcoins in Canada - <AUTHOR> https://www.tbray.org/ongoing/When/201x/2017/12/19/How-To-Sell-Bitcoin-in-Canada <comment><USER3> The brilliant thing is, if the author controls the host server of this article and it gets near the top of Google results for its title, watching the article hit-rate [1] should be a neat way of predicting the inevitable bitcoin crash! Probably several hours in advance. He could market out this service for Big Bucks.

[1] After the article stops being front-page-HN'd, at least.

<comment><USER4> You don't need to own a top search listing for this. Google Trends shows the popularity of any search term in real time. [https://trends.google.com/trends/explore?date=now%201-H&q=Se...](https://trends.google.com/trends/explore?date=now%201-H&q=Sell%20bitcoin)

<comment><USER5> More interesting [https://trends.google.com/trends/explore?date=now%201-H&q=Se...](https://trends.google.com/trends/explore?date=now%201-H&q=Sell%20bitcoin,Buy%20bitcoin)

<comment><USER6> Is it? Someone who bought one probably knows how to sell in the same platform, no?

<comment><USER7> Not really, because (as the OP states) there are many places that will sell you BTC but _not_ really allow you to get cash back out, e.g. because of your location.

</comment></comment></comment></comment></comment><comment><USER8> Bray mentions Ripple as a better crypto to buy because it has an application (ie ledger for enterprise banking and other financial institutions).

I disagree for two reasons: 1\. I've become convinced that the crypto currencies with applications (ether, xrp, and others) are actually riskier than the simple store of value coins like BTC. If, for example, dapps don't really take off in popularity and the "application" of the crypto currency fails, I would expect that would tank the value of that currency. BTC or LTC, which seem more like simple store of value coins at this point, would appear to have less of this type of associated risk. 2\. Ripple (XRP) in particular seems doomed to me. I do not believe that any major financial institution would use a public blockchain and associated currency. If they need / want to use blockchain, there are non-public options that would better serve banks, some being developed by the hyperledger group and others.

<comment><USER9> Just a note that Ripple and Mt. Gox founder Jed McCaleb left the Ripple project to form Stellar Lumens which is technologically superior and I expect XLM to surpass XRP in the "cheap transactions and marketable to banks" space.

<comment><USER8> Interesting, I'll check it out.

My question remains though, and here it is in another form: is there a compelling reason for banks to use a public blockchain rather than just use their own private network? I can't figure out why they would use a cryptocoin- incentivized public blockchain, but maybe I just haven't thought about it enough. Anyone have a good answer to this?

<comment><USER10> There is a nice speculative article about Jed McCaleb which may or may not be true, still interesting nonetheless: [https://steemit.com/ripple/@olyup/fck- you-money-the-rise-and...](https://steemit.com/ripple/@olyup/fck-you-money- the-rise-and-fall-of-xrp)

</comment></comment></comment></comment><comment><USER11> For those Canadians out there, I've had a decent experience with: [https://www.quadrigacx.com](https://www.quadrigacx.com), and I believe it's the biggest CAD exchange.

<comment><USER12> I started with CoinBase, not realizing that there wasn't a sell option in Canada. Ive moved to quadrigacx and it's worked well. 0.1BTC transactions are not a problem- I've seen sell orders on scale of 100BTC, so I'm not sure what CoinSquare is about with their limits here. It has several methods to sell/withdraw money to banks, with various fees and wait times.

The big thing for Canadians is on the taxation side. Trade on any digital currency is subject to capital gains- meaning they apply your tax bracket to half your profit.

If you trade digital currency for goods/services (ie. Use BTC as a currency), its considered barter trade. You get taxed on the converted dollar value of the transaction.

It appears Quadrigacx does not do any reporting to the CRA for your transactions, so of course all this would be self-reported at tax time.

<comment><USER13> Capital gains is an issue for Canadians (and Americans) regardless of what exchange they use. Not reporting sources of income is tax evasion.

It's amazing to me how frequently discussions of bitcoin profits are mixed with a casual attitude towards committing a major felony. A lot of people made a lot of money this year doing very little work. Be happy you live in a society where this is possible. Pay your taxes.

EDIT: And for everyone worried about a crash in 2018 resulting in a big 2017 tax bill that can't be paid, a reminder that you can carry losses _backwards_ in Canada for up to 3 years and get those taxes refunded.

</comment></comment></comment><comment><USER14> On a side note, I am trying to sell my very little stack of LTC - 7.04 - <USER2> like a week or 2. Gdax never works - the ID validation is always down - and I haven't found any other solutions. Any ideas?

Cryptos are not liquid at all.

<comment><USER15> Id verification has nothing to do with liquidity. You should get verified before you get into it. GDAX volume for Litecoin/USD was $300M today. If that's not enough you can exchange for BTC and then for USD.

<comment><USER16> Trade volume isn't the same as liquidity either.

<comment><USER17> How do you distinguish the two in your head, just asking?

</comment></comment></comment></comment><comment><USER18> 'You can bet that if (I mean when) Bitcoin deflates, the loss is going to be mostly soaked up by the people who've bought in recently, the 95%-plus of holders who collectively own less than 5% of BTC.' ... Can someone help me understand this? How can the 5% buy back 95% of the bitcoin if the 95% tries to cash out? The 95% can't cash out no?

<comment><USER19> I think what the article is saying is that 5% that own 95% didn't buy in at inflated prices. Those who own just 5% of bitcoins likely bought high, so they will be in the red on a crash. Those with more coinage tend to have bought low and will still be in the black if the market crashes.

E.g. the Winklevoss twins bought 120,000 bitcoins at $10. If the market crashes to $1,010 from today's $16-17,000, they'll still be in the black by $120MM. Sure, on paper they'll have lost a billion dollars, but they're still not hurting.

</comment></comment><comment><USER20> "Important note: This narrative applies specifically to exchanging BTC for Canadian dollars, in Canada. Some lessons may apply in other jurisdictions."

<comment><USER21> The more interesting part of the post is in the 'Why I did it' section. I'd be interested to hear what others have to say on the topic considering I was about to invest some money into cryptos.

<comment><USER22> I think a healthy step 0 for anyone is to get into the mindset that you're not "investing" into cryptos, you're speculating or gambling.

<comment><USER23> Absolutely true, but that's also the case of most stock trading. If you're not buying a stock expecting dividends, but instead hoping to just sell it for more later, that's not much different than speculating on BTC.

<comment><USER24> That's not even remotely true. Stocks are directly tied to the performance of a company providing goods or services. There's something you can directly gauge.

At BEST you could equate it to currency trading, but even THAT is tied to real-world governments and their policies nine times out of ten. Bitcoin is literally trading on the belief that a bunch of people are going to switch to it instead of the dollar or _insert your currency of choice_ because...?

<comment><USER25> > That's not even remotely true. Stocks are directly tied to the performance > of a company providing goods or services. There's something you can directly > gauge.

I'm no stock expert but isn't the majority of a stock's value due to speculation on what it will be worth _one day in the future_?

I think the parent made a valid point. Sure, stocks are generally easier to "gauge" (and therefore lower risk) but you're still just speculating that it's future price will be greater than it's current price after all.

Low-risk gambling is still gambling isn't it?

<comment><USER26> > I'm no stock expert but isn't the majority of a stock's value due to > speculation on what it will be worth one day in the future?

That's true, but stock can represent a portion of an asset with production potential. A factory or a mine or a dot-com. Bitcoin is pure fiat money.

If I owned all stock in AAPL, I would own one of the most valuable companies in the world which would yield me several billion USD in profits every year. If I owned all bitcoins my asset would be completely worthless because there would be no market for it.

I defer to Warren Buffett's quote [1] on Gold - an asset similar in it's uselessness:

> Today the world's gold stock is about 170,000 metric tons. If all of this > gold were melded together, it would form a cube of about 68 feet per side. > (Picture it fitting comfortably within a baseball infield.) At $1,750 per > ounce -- gold's price as I write this -- its value would be $9.6 trillion. > Call this cube pile A.

> Let's now create a pile B costing an equal amount. For that, we could buy > all U.S. cropland (400 million acres with output of about $200 billion > annually), plus 16 Exxon Mobils (the world's most profitable company, one > earning more than $40 billion annually). After these purchases, we would > have about $1 trillion left over for walking-aroundmoney (no sense feeling > strapped after this buying binge). Can you imagine an investor with $9.6 > trillion selecting pile A over pile B?

[1] [http://www.nasdaq.com/article/why-warren-buffett-hates- gold-...](http://www.nasdaq.com/article/why-warren-buffett-hates-gold- cm267928)

<comment><USER25> >If I owned all bitcoins my asset would be completely worthless because there would be no market for it.

Of course, but you could say the same about having the entire internet to yourself. Or being the only person on Facebook. That's just a function of how networks work.

<comment><USER27> But he could _own_ all of Facebook without making it worthless.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER28> American, but I used to FX in Canada using Bitcoin when it actually worked as a currency (like 2013/2014). At the time it was cheaper than dealing with bank rates or merchants that would be lame and only take USD at par.

I'd trade with a few people I met first on the OTC trading channel, then did initial small trades in person. Once enough trust was built up they'd just send me interac e-transfers for my coin. I had a Canadian bank account to receive it.

Nobody would trust randos online to send interac since it could be reversed. But the OTC web of trust worked well back then and I never got burned (unlike with centralized exchanges)

</comment><comment><USER29> Is there a consensus regarding trusting these exchanges with scans of verification documents? Bitstamp is asking for scans of a drivers license or passport to verify the account and proceed with transactions.

<comment><USER30> It's 100% necessary for money-laundering prevention. I'd be way more concerned using an exchange that doesn't do it.

<comment><USER29> Basically, the KYC regulations?

<comment><USER31> Yes, KYC = know your customer, you gotta check the identity of your customers.

</comment></comment></comment></comment><comment><USER32> I'm a little shocked it costs $20 ($10 to send and $10 to receive, and I'm unclear why the receiver seems to cop both fees) to send $2000 from a Canadian bank, to another Canadian bank. That seems absurd. I don't recall ever being charged for a domestic bank transfer in Australia (I believe the fee is 50c but a free quota is received each month).

</comment><comment><USER33> That may explain a lot of the growth in the Bitcoin and crypto ecosystem market cap:

Being unable to cash out as easily as cashing in!

</comment><comment><USER34> You can use almost any exchange in the world, and then send the fiat in foreign currency into your bank account. Your bank will happily convert to CAD, taking ~3% on a bad conversion rate. Just call your bank prior, make sure they accept USD or EUR or whatever currency you chose.

</comment><comment><USER35> With bitcoin I've never had the same preferred cash-in/cash-out service for more than 6 months.

They all inevitably shoot themselves in the foot, one way or the other.

</comment><comment><USER36> Bitcoin options? Can you trade such somewhere? Using options is the only proper way to short bitcoin right now. But I was not aware of their existence.

</comment><comment><USER37> Such drama for something people are doing for years

</comment><comment><USER38> FUDing BTC and shilling Ripple? Why the *heck is this #5 on the front of HN? Come on.

<comment><USER39> Would you please stop posting unsubstantive comments to HN? You've done it quite a bit and we eventually ban accounts that do that.

If you have a substantive point to make, make it thoughtfully; if you don't, please don't comment until you do.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)</comment></comment>


A critical Windows component expires in 25 hours - <AUTHOR> http://hexatomium.github.io/2015/09/22/expires-25h/ <comment><USER2> So the Untrusted CTL has an expiration of 25 hours. Your screenshot says "Did you know? ... the Untrusted CTL is updated once per day". Doesn't that explain it?

<comment><USER3> In the screenshot, it says that CTL was last modified in March. Judging by the date, I'd guess it has an expiration of 6 months after it is issued. So, it's been nearly 6 months since the daily updates stopped occurring.

<comment><USER4> Is that the time it was last _modified_ or the time it was last _signed_?

The last high-profile mis-issued cert was last week, and didn't even escape the control of people who were entrusted with the CA private key. So MS might not even be manually revoking it. Before that, the last blog post on googleonlinesecurity.blogspot.com about a mis-issued certificate was ... March 23.

I would guess that it's re-signed daily, but only changes when there's an actual change to be made.

<comment><USER4> Following up: if anyone wants to poke around at the file, the download URL is [http://ctldl.windowsupdate.com/msdownload/update/v3/static/t...](http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab) , a CAB archive that contains a single file disallowedcert.stl. That file itself is DER-formatted ASN.1, evidently a PKCS7-signed "Certificate Trust List" (220.127.116.11.4.1.311.10.1). `openssl asn1parse -inform der -in disallowedcert.stl` reads it just fine.

There's a reference to the date 150923203626Z (2015-09-23 20:36:26 UTC) somewhere in there, but I'm having trouble figuring out what it applies to.

<comment><USER5> Is anyone else concerned that the disallowed certs list is downloaded over plaintext HTTP?

<comment><USER6> I don't think it's really a big deal. Since the list is signed, an active attacker would only be able to replay an old version of the list... but it's hard to see how that would be worse than just blocking the request entirely.

<comment><USER7> An older version of the list might be missing a recently compromised certificate, though. Of course, you need to both MITM someone and compromise an important cert, so that's not the sort of thing just anybody could pull off.

<comment><USER6> Right, but assuming Windows isn't dumb enough to accept a remotely downloaded version that's older than the one it already has locally, the effect would be the same as if the attacker just prevented you from receiving new updates. And HTTPS wouldn't make it any harder for them to do that.

<comment><USER8> Additionally, old versions will expire, so there's a limit to how far back you can keep someone, even if you continuously intercept the update attempts.

<comment><USER9> What happens if all versions someone has are expired?

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> > I can't accurately foresee what is going to happen in 25 hours

Set the clock forward and see?

<comment><USER11> I believe this is less about what one individual computer would do and more about what could happen to the millions of Windows users facing this problem in 25 hours.

<comment><USER10> Finding out what happens to one computer seems like a better start to informed speculation about millions of other computers than not finding out. Sure, it's no guarantee they're all the same, but we can more reasonably discuss whether the observed effects are plausibly widespread after observation...

<comment><USER12> I think the sentence was meant to imply MSFT might see this issue before the clock hits doomsday.

<comment><USER13> Microsoft has some experience with expired certificates [1].

[1] [https://azure.microsoft.com/en-us/blog/windows-azure- service...](https://azure.microsoft.com/en-us/blog/windows-azure-service- disruption-from-expired-certificate/)

</comment></comment></comment></comment></comment><comment><USER14> Why does the app say you're at risk if the certificate is still valid, and why does it say that the last check for one of the lists in the future? Feels like the usual crypto-fearmongering to me.

</comment><comment><USER15> It just updated tonight, it seems

Edit:

ListIdentifier = "DisallowedCert_AutoUpdate_1"

SequenceNumber = 01d0f584a9ad12f7

ThisUpdate = "23.09.2015 00:18"

NextUpdate = LEER

SubjectAlgorithm = 220.127.116.11.4.1.318.104.22.168, "disallowedHash"

SignerExpiration = "14.08.2016 19:13", "326,3 Days"

CTLEntries = 57

Das System kann die angegebene Datei nicht finden. 0x80070002 (WIN32: 2 ERROR_FI LE_NOT_FOUND) -- [http://ctldl.windowsupdate.com/msdownload/update/v3/static/t...](http://ctldl.windowsupdate.com/msdownload/update/v3/static/trus) tedr/en/disallowedcertstl.sst

MissingCerts = 57

yesterday it told me that it wasn't updated since 180 days.

<comment><AUTHOR> Can you post a screenshot? "Updated" can mean different things in this context. For the issue to be resolved, Microsoft also has to update the signing certificate itself, which it hasn't done for the last 15 months.

Edit: Confirmed! Blog post updated.

</comment></comment><comment><USER16> I'm trying to get my head around what a CTL is anyway. I might be tired and a bit hungry (never helps my cognitive processes) but I was struggling to understand the Microsoft article I found here:

[https://msdn.microsoft.com/en- us/library/windows/desktop/aa3...](https://msdn.microsoft.com/en- us/library/windows/desktop/aa376545\(v=vs.85\).aspx)

</comment><comment><USER17> Just a note: Your GMT date is wrong - should be 22, not 23. Apart from that, sounds scary.

<comment><USER18> I'm not sure it explains the last auto update check time for the trusted CTL ;)

</comment></comment><comment><USER19> Can anyone else confirm this?

<comment><USER20> I have no idea of potential impact, but the command run on an up-to-date Windows 10 system reports:

        > certutil -verifyCTL disallowed
        LastSyncTime = "9/22/2015 9:33 AM"
        [DisallowedCTL]
        ListIdentifier = "DisallowedCert_AutoUpdate_1"
        SequenceNumber = 01d065c00c3f1258
        ThisUpdate = "3/23/2015 6:21 PM"
        NextUpdate = EMPTY
        SubjectAlgorithm = 22.214.171.124.4.1.3188.8.131.52, "disallowedHash"
        SignerExpiration = "9/23/2015 3:36 PM", "1.0 Days"
        WARNING = "SignerExpiration: Less than 180 Days"
        CTLEntries = 57
        The system cannot find the file specified. 0x80070002 (WIN32: 2 ERROR_FILE_NOT_FOUND) -- http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcert.sst
        MissingCerts = 57

<comment><USER21> Can confirm, getting similar output on Windows 10.0.10240. Although url is working works in chrome. Could this be a bug in the certutil updater?

</comment></comment></comment><comment><USER22> Last autoupdate check on 2015-09-26 ... IN THE FUTURE? THE LAST ONE?

<comment><AUTHOR> Note to self: Do not take screenshots from the future.

<comment><USER23> could you open lottery numbers page in the background and post another screenshot, just for clarity?

</comment></comment></comment><comment><USER24> When is Microsoft going to adopt Certificate Transparency anyway? Google, Mozilla and Apple all support it already.

<comment><USER25> > Mozilla and Apple all support it already.

Do you have a source? As far as I know that is not accurate.

<comment><USER12> This is unrelated to CT; this would still be needed to kill any maliciously issued certificates.

Apple has App Transport Security which allows you to require CT. I think the OP meant Google, as the patch[1] for CT is still pending in Firefox.

[1] [https://bugzilla.mozilla.org/show_bug.cgi?id=944175](https://bugzilla.mozilla.org/show_bug.cgi?id=944175)

<comment><USER24> Right. What I meant was actually that they either support it or are in the process of supporting it. But I haven't heard anything about it from Microsoft.</comment></comment></comment></comment>


The C standard library function atexit is broken - <AUTHOR> https://www.mulle-kybernetik.com/weblog/2019/atexit_is_broken.html <comment><USER2> There were two motivations for shared libraries; one no longer applies and the other, arguably was never reliable, so after 35 years of dynamic linking, a couple of years ago I went static only (except for system calls of course).

The first reason was disk space: object files could simply be smaller. Nowadays, for all intents and purposes, disk space is free and unlimited.

The second was the ability to ship fixes to system facilities. These were fragile, leading to even more complex methods such as versioning, so though this was a good idea in principle, in practice it was very painful. I believe the Windows folks had their own name for it, "DLL Hell". The npm people still suffer from this from time to time, sometimes notoriously.

As for the fixes: software isn't updated on magtape any more, and most systems have robust upgrade systems. In addition there are all manner of quasi- hermetic isolation systems (VMs, docker images, venvs and the like) so why not just ship a static binary?

Plus with a static binary, if you really care about order of loading/unloading etc (which you ideally shouldn't) its trivial to manage with a custom linker script.

My only exception to this is the kernel: it can be upgraded, and mostly promises not to vary system call semantics too much, so it's OK to me not to link the kernel into my binary :-).

<comment><USER3> > The first reason was disk space: object files could simply be smaller. > Nowadays, for all intents and purposes, disk space is free and unlimited.

It's not for disk space, it's runtime RAM occupation usage. The code for a .so is going to be slightly larger than the equivalent .a. At the very least, you'll need to burn extra space for the PLT and GOT. And PIC relocations are going to tend to burn more space than static linking relocations.

The advantage of a .so you're talking about is that you can load a library shared by multiple processes at a fixed virtual address location that's the same for all processes, and thus you only burn the library once in RAM. For static libraries, the embedded addresses are going to be slightly different depending on their corresponding libraries, so even magic deduplication isn't going to be able to keep you from having the library in multiple places in physical memory.

<comment><USER4> RAM is free, too, at least as far as library code size is concerned.

<comment><USER5> A typical system has dozens or hundreds of processes running even when nothing is going on. If they all had their own copy of every system library in RAM, it wouldn't look so free. Especially on mobile devices.

<comment><USER6> What if the OS could dedupe pages?

<comment><USER7> You'd need to arrange for the linking process to result in identical (and identically-aligned!) code pages. If you're going to all the trouble to ensure that, why not just write it all to a file and call it a shared library?

<comment><USER8> Exactly. Emperors' new clothes from naive convention abandonment of solved problems.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> The glibc repository has multiple test cases for atexit, it seems a lot of the current behavior derives from a fix for this bug in 2005: [https://sourceware.org/bugzilla/show_bug.cgi?id=1158](https://sourceware.org/bugzilla/show_bug.cgi?id=1158)

It seems odd for the author to have invested so much time in this, but not to have found or patches those glibc test case to demonstrate the behavior he expects in various hairy test cases glibc itself is worrying about, and which forms the basis for its current behavior.

</comment><comment><USER10> The submission title is misleading. The C standard library function atexit() isn't broken. At worst, some C library implementations are broken (or more charitably, not C standard compliant) _if_ you also use certain other facilities that are _not_ C standard library functions.

</comment><comment><USER11> I question what the author was expecting to happen. If bar_exit comes from a dylib, and that dylib is subsequently unmapped, you can't very well call any functions from the unmapped library, so there's only 4 possible outcomes I can see:

1\. The program crashes during termination as atexit() tries to invoke the previously-registered-but-now-invalid function.

2\. The function is silently skipped as it's no longer loaded.

3\. The function is invoked upon dlclose().

4\. dlclose() does not actually unmap the library.

Of these options, only the 3rd actually seems reasonable. The first two are obviously bad, and the 4th seems like it rather defeats the purpose of calling dlclose() if you can't actually unload the library.

<comment><USER12> 4 is not uncommon. For example, as described by Apple, there are so many things that can stop dlclose() from unlinking a library that they considered making it a no-op. Page 175 of [https://devstreaming- cdn.apple.com/videos/wwdc/2017/413fmx92...](https://devstreaming- cdn.apple.com/videos/wwdc/2017/413fmx92zo14voet8/413/413_app_startup_time_past_present_and_future.pdf?dl=1)

<comment><USER11> Only reference-counting actually stops dlclose() from unmapping the library, and that just means you haven't balanced out all the dlopens() (well, you can't unmap anything linked from the main executable, or anything in the dyld shared cache either, but those aren't particularly interesting cases). It's generally a really bad idea to unload a bundle containing Obj-C classes, but it's still doable if you can guarantee all instances of classes defined in that bundle have been deallocated (I'm not sure what happens to category methods, I hope the runtime properly removes those, but it's possible those would also cause a problem if invoked later). I assume the issue with Swift classes is identical to the issue with Obj-C classes.

In any case, image unloading is traditionally done with C libraries, not with Obj-C/Swift, and we're talking about a C function (atexit).

As for making it a no-op, they said only on platforms other than macOS, which is fine because the other platforms (iOS, watchOS, tvOS) are sufficiently constrained that there really is no reason to ever dlclose() anyway (there's barely even any reason to dlopen() besides trying to poke at Apple SPIs; I think sqlite will dlopen to load extensions, but that's about the only valid reason that comes to mind).

</comment></comment></comment><comment><USER13> I don't see how the behaviour he wants can work. If you dlclose a library and cause it to be unmapped then the function pointers in that library are invalid and can't be called atexit. Either, dlclose will have broken behaviour by keeping libraries mapped even though all their dlopen references have been dropped or atexit will be broken.

<comment><USER14> POSIX doesn't require that _dlclose_ must unmap a library forcefully. Basically it can be that if _atexit_ has been called with an address pointing into a shared library, that's considered a reference to the library which prevents it from being unmapped. How can it be unmapped? It's registered to be called when the process terminates.

</comment></comment><comment><USER15> I believe this was changed everywhere because glibc maintainers decided that it made more sense to run at library unload time, and then everyone else had to change their implementation to match "what Linux does."

That being said, none of these behaviors really make any sense. If the registered function isn't mapped into the process address space any more, what is supposed to happen?

<comment><USER16> Seems to me that what's "supposed to happen" is "make it so the situation can't happen". That is, either make it so that you cannot unload the library if some function is registered with atexit, or else make it so that unloading the library unregisters the atexit function.

But of course, that can't happen, because you can have N function calls between the registered atexit function and the call to the library, and deciding if any calls to the library are anywhere in the graph _and will be called_ is probably equivalent to the halting problem.

I agree that none of the possibilities are what we actually want.

<comment><USER15> Bonus: what happens when the function you register is JIT'd, so there's no unregistration code path when it's unloaded?

<comment><USER17> JIT is well outside the realm of the C standard.

<comment><USER18> Just like shared libraries.

<comment><USER19> So is atexit: it's part of POSIX, just like the rest of the dl* APIs.

<comment><USER17> POSIX extends standard C. atexit() is part of standard C89.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> I seem to remember a WWDC session from a few years ago (the one where dyld 3 was first introduced) where they said that dlclose() is now essentially a no- op on macOS, since it's rarely done, the benefits are few, and the possible problems are many.

Edit: no-op dlclose() was something under consideration for dyld 3 on everything but macOS. [https://devstreaming- cdn.apple.com/videos/wwdc/2017/413fmx92...](https://devstreaming- cdn.apple.com/videos/wwdc/2017/413fmx92zo14voet8/413/413_app_startup_time_past_present_and_future.pdf?dl=1)

<comment><USER19> dlclose on iOS still does garbage collection of images if possible, FWIW.

</comment></comment><comment><USER21> There's two distinct concepts that are conflated for statically linked executables.

On process death vs on module death. Is the function to clean up the process, or is it to clean up the module?

I think the argument for module cleanup is stronger, irrespective of the difficulty of registering code that's supposed to last longer than the calling address space. The module had nothing before it was loaded, it should leave nothing behind when it is unloaded. It's symmetrical.

The difficulty of providing an executable callback that outlives its module just seals the deal.

<comment><USER22> it should definitively clean up the module

you could make the same argument with threads

main process vs child threads, you would expect atexit installed in the child thread to execute before the main process atexit installed functions

<comment><USER21> If it were thread local, sure, but they'd need access to a module cleanup function too, as there's no necessary tie between thread lifetime and module lifetime.

</comment></comment></comment><comment><USER23> This reminds me of a strange bug I encountered once on ia64. We had a custom library that we loaded with dlopen(), and then called an initialization function within this library. Unbeknownst to me at the time, this function created a thread which did something, and then almost immediately went to sleep for a few seconds. Also unbeknownst to me, there was also function that you were supposed to call before dlclose() to kill this thread. If you dlclosed the library without previously having called this function to stop the thread, when the thread woke up, all its code would of course be gone, and the program segfaulted, leaving a core file. Interestingly, if you ran gdb on the core file, gdb segfaulted! Presumably because the thread didn't have any corresponding code in the core file either. Took awhile to figure that one out. Curiously, on x86, all this seemingly worked fine (maybe dlclose implicitly killed the thread on x86? ... never figured out why it didn't crash on x86 but did on ia64.)

</comment><comment><USER24> It's actually quite hard to do exit cleanups, even by putting functions into `.__fini_array`. The reason is because some signals (SIGTERM, SIGKILL) cannot be masked, when a thread/process (`task_struct`) got `SIGKILL`-ed, there's no way for application to run functions (including .__fini_array). Things can get more complicated when a thread calls `exit_group`, which is also recommended, cause all other threads in the same process group receive `SIGKILL`, hence none of the other threads are able to run any code after.

<comment><USER25> There's also the matter of someone forcibly pulling a machine's power cord. In some sense exit cleanups are fundamentally unreliable.

<comment><USER26> A significant amount of code can be run after a power cord pull is detected but before the big caps discharge on most boxes. But yea no userspace program is going to get those cycles...</comment></comment></comment>


Ask HN: For an e-commerce+blog, which Django CMS and e-commerce package to use? - <AUTHOR> Hello All,
I have practiced Python and Django, made a post-submission basic blog with multi-user login and post submission features.
I wish to make e-commerce, blogging and user login capability. I am confused among Django-cms and Wagtail. And also which e-commerce package to use: Oscar, Saleor or Django-shop.
A. Features needed for e-commerce:

    1. Multi-lingual

    2. Location-based automatic currency detection

    3. Product variations choice (I have products with size and color options)

    4. Automated invoices

    5. Product bundling

    6. Videos and photos on the product page

    7. Create discount coupons
 B. Feature needed for the marketing of products:

    1. Create a referral marketing page where each user is given a referral link and provided a dashboard to monitor his/her earned points and rewards claimed.
 C. Features needed for blogging:

    1. Medium.com type blogging with commenting/voting feature.

    2. Get subscribers via email forms or via mailchimp.
 I loved the wagtail's streamfield and formfield features. I don't know Django-cms has the analog of the same.
I am willing to spend time to climb the learning curve. I wish to make a solid final scalable and fast website. Please guide me on choosing the CMS (Django-cms or wagtail) and on the package (Oscar, Saleor or Django-shop).
Thank you. <comment><USER2> Shopify for e-commerce Wordpress + nice theme for blog

And spend the hours and hours you just saved on getting customers.

I use Wagtail everyday and it's a great platform but it definitely isn't anywhere near as straightforward as WP and there isn't a huge benefit of using it over WP unless you really need to customise your blog.</comment>


iPhone 6 Case Which Harvests Electricity from the Air - <AUTHOR> http://techcrunch.com/2015/05/04/nikola-labs-launches-iphone-6-case-which-harvests-electricity-from-the-air

<comment><USER2> Perpetual Motion at last!

The Phone transmits radio energy which is converted back into DC power which the phone then uses to transmit radio energy.

Of course harvesting the radiated power blocks the ability of the phone to communicate, but still...

<comment><USER3> You could always just put it in.. like.. Airplane mode and call it a day.

</comment></comment><comment><USER4> Why didn't the judges ask about interference? How can the antenna determine what RF is ambient and what RF is being used in transmission? Seems pretty cool. 30% gain in battery would be game changing...</comment>


Meet the new boss, worse than the old boss - <AUTHOR> https://thetrichordist.wordpress.com/2012/04/15/meet-the-new-boss-worse-than-the-old-boss-full-post/

<comment><USER2> <http://news.ycombinator.com/item?id=3850935> <\- Comments

tptacek's detailed summary:

<http://news.ycombinator.com/item?id=3856526>

Other instances and related items can be found with this search:

[http://www.hnsearch.com/search#request/all&q=title%3Abos...](http://www.hnsearch.com/search#request/all&q=title%3Aboss+new)</comment>


Data Compression Explained - <AUTHOR> http://mattmahoney.net/dc/dce.html?year=2011 <comment><USER2> There's a nice series of Khan-style videos on Youtube from a dude called MathematicalMonk which cover Huffman and Arithmetic coding in detail. They're in his Information Theory series:

[http://www.youtube.com/user/mathematicalmonk#g/c/E125425EC83...](http://www.youtube.com/user/mathematicalmonk#g/c/E125425EC837021F)

</comment><comment><USER3> no mention of lossless audio compression formats :(</comment>


Women Really Do Get Huge Deals By Flirting - <AUTHOR> http://www.businessinsider.com/women-get-huge-deals-through-flirting-study-2012-10

<comment><AUTHOR> Here's a link to the actual paper [http://www.haas.berkeley.edu/groups/online_marketing/faculty...](http://www.haas.berkeley.edu/groups/online_marketing/facultyCV/papers/kray_paper2012.pdf)

</comment><comment><USER2> We (men) always seem to assume the women in these scenarios are physically desirable. Sometimes flirting is unwanted or off-putting, but we never imagine it going that way.

I wonder if the same scenario was given to women would they make the same assumption (that the flirtatious male was attractive)?

(Also where the hell can you get a car for $1200, do you have to push it off the lot?)</comment>


After 5 years and $3M, here's everything we've learned building Ghost (2018) - <AUTHOR> https://ghost.org/blog/5/ <comment><USER2> John O'Nolan was interviewed by the SE Daily podcast last summer; I found his remarks about the selection of NodeJS being a mistake to be the most interesting -- even though that choice earned them lots of notice on boards like Hacker News and reddit. Check out the podcast link below (includes a link to a transcript if you would rather read/search for O'Nolan commenting that they would have been years further ahead on the features roadmap had they gone with Laravel or similar PHP framework).

[https://softwareengineeringdaily.com/2018/07/26/ghost- open-s...](https://softwareengineeringdaily.com/2018/07/26/ghost-open-source- publishing-platform-with-john-onolan/)</comment>


Storyvid: launching Literature into the 21st century - <AUTHOR> http://www.storyvid.io/

<comment><AUTHOR> I didn't find a lot of information on what this really IS, but one of the founders is Etgar Keret.

<http://en.wikipedia.org/wiki/Etgar_Keret></comment>