Bot wars - The arms race of restaurant reservations in SF - <AUTHOR> https://diogomonica.com/bot-wars-the-arms-race-of-restaurant-reservations-in-sf/ <comment><USER2> Soon - "Auction Sniper now supports urbanspoon! First 3 reservations are free!"

There's something frustrating about reading this. Perhaps its that a technological advancement that was supposed to make life easier is being capitalized on by a small group of technically competent people, shutting out the average user.

I was thinking of going to PAX next year a few hours ago and decided to do a bit of research. For this year, the 4 day tickets apparently sold out in 23 minutes, and the rest within 5 hours. I'm having a hard time imagining how its going to be possible for anyone to get some this coming year without a bot.

<comment><USER3> Yes, in todays technological society, people who understand technology have advantages. I don't see why that is surprising, given the website you're commenting on.

Ultimately this is not about technology, it's about economics. Surely the restaurant should raise their prices until not enough people want to book 2 months in advance to make bots and make this an issue. Or PAX should raise their prices so they don't sell out in 23 minutes but still sell all their tickets before the show. Or either business should increase their capacity. Or perhaps they are capitalising on the fact that they are oversubscribed as some kind of marketing device. Either way, any time there is a limited supply of something people are going to figure out ways to get some, and if the limited supply is available on the web, people who understand the web will have an advantage.

<comment><USER4> "Just raise the price" is an appropriate response to demand for a commodity, but it's an inappropriate response to these scenarios.

For example: PAX is trying to build a community event. The target demographic is not "wealthy people who love games", it's "people who love games" Changing the price results in a different convention.

Similarly, a popular $20 restaurant can't double their prices to keep demand manageable, because a great $20 dinner that costs $40 will reduce the perceived _quality_ of the restaurant.

<comment><USER5> If PAX or anyone else wants to intentionally price something so that the demand is larger than available supply, then in any case the "effective price" will be raised so that supply matches the demand.

In effect, part of the "effective price" will be the monetary cost, and the other part of the price will be wasted time/emotions/connections/whatever that discrimiminates those who get the ticket from those who don't. This is basic, well researched economics, with plenty of real life examples in various countries, regimes and industries.

The common options include:

a) $x + significant time spent waiting in line - some wait in line and get nothing; some value their time a lot and don't attempt buying.

b) $x goes to the original supplier, $y goes to scalpers/touts/your employee bribes - the stuff gets sold at money market price, but someone else gets the difference;

c) lottery - either intentional lottery, where everybody has a chance of getting a ticket for $x despite that it's market worth is >$x; or an unintentional lottery, where random factors (showing up at the right time, getting a reservation that someone else cancelled) determine if you can or cannot get the ticket. In both cases, the "buyer" might be motivated to resell it if possible, since it's possible that he paid $20, he wouldn't go if it cost $100, but someone else wants to pay $100, so ...

d) (ab)use of advantages - political connections, bots, whatever; you buy at $x and sell at the market price.

In any case, (most) buyers don't get the intended effect of cheaper price; but the seller loses out. Only the middlemen benefit, without adding value. (In one sense, they add back the value that the seller reduced by mispricing)

I've seen what happens in USSR when the majority of economy functions this way - trust me, in most cases raising the price is actually the appropriate response; because otherwise there is so effing large amounts of effort&resources that is wasted - the seller gets $x, but the buyer anyway spends "market price" of $3x to compete with other buyers by giving $x of cash and $2x of wasted, unproductive effort.

<comment><USER6> It seems to me that the effective price would never fully bring it up to the money market level, and that difference is what makes it worthwhile to choose that strategy?

In the example of (a), there is no middleman, and the set of buyers becomes biased toward those who are dedicated over those with more money, because they intentionally distributed the effective price over multiple...payment channels (? I'm not much of an economist). Edit: actually there is a middleman; I recall the Wii launch, where I knew a guy who waited in line just to sell them on eBay. But still, there are "true fans" waiting who might be priced out at market value.

In the lottery style where tickets go on sale at x time and it's a free-for- all, some significant percentage of this round of sales will go to people that "deserve" them and get to enjoy a reasonable price with negligible non- monetary cost. Yes there will be some money lost to scalpers, but this can be reduced by forcing resellers into an official exchange channel where the original seller gets a cut.

Burning Man is an event where demand has exploded over the past few years and the supply cannot keep up. The organizers are also very concerned about getting the right people the tickets without jacking up the price. They have evolved a somewhat complex multi-pronged approach with lotteries, high-price presales, and a homegrown exchange system (STEP), where I believe they mandate reselling at face value.

edit: On second thought, I have neglected the cost of the people who expend time/effort and miss out completely. But, I still think there are benefits to pricing below market value with a sufficiently robust strategy.

</comment></comment></comment></comment></comment><comment><USER7> You folks don't actually think that opentable/urban spoon reservation availability is representative of a restaurant's entire table inventory on a given night do you? Pick up a phone (dirty little secret, restaurants segment customers too).

<comment><USER8> Restaurants typically hold back inventory from online reservation systems for two reasons. They either think they can fill seats and they rather not pay the per cover fees OT and UrbanSpoon charge or they want to hold seats for walk- ins. Well three if you count timing seating to keep the front of the house and kitchen from being overloaded.

State Bird Provisions however has so much demand that there is a line for walk-ins hoping for a cancellation an hour before the restaurant opens and they appear to not actually hold back much (any?) inventory specifically for walk-ins.

But generally speaking yes, you will often be able to call a restaurant and get a table or possibly walk in even when their online reservation system shows up as full.

Also, you can also put yourself on a waitlist at many restaurants. If someone calls to cancel, before they release the reservation back to the online system, they'll go through their waitlist and call and ask if you want it instead.

<comment><USER9> From their site: "We welcome walk-ins on a first-come, first-served basis and set aside about a third of our seats for those guests every night, including our chef's counter and several tables in the dining room. "

<comment><USER10> I tried that once, very shortly after open on a Wednesday. The wait was 2-3 hours. It's a popular place.

</comment></comment></comment></comment><comment><USER11> I'd suggest that this effect is a somewhat superficial expression of the deeply rooted problem of people in urban situations broadly losing their personal connections with their own expressions of creativity and art, primarily through doing work that they are not engaged with in a deep, meaningful sense.

Perhaps:

\- People in certain modern, urban situations crave certain types of creative expression that seem to be very hard to find in these environments.

\- Social patterns place a high value on being seen to have had an experience, that provide a reward similar to being the artist.

\- People capable of producing these artistic experiences are initially perhaps not so interested in managing the people who are the recipients of their creativity - they are more interested in creation.

\- Once money and/or fame becomes involved, the artists are unlikely to widely share the skills that lead to the creativity arising, are motivated to protect methods of production, fetishize the product and create strong brands.

These factors together create this 'hipster' effect where small points of creativity are heavily focussed on and take a long time to replicate.

I'd hypothesize that this situation would go away if people were broadly connecting with meaningful, personal creative pursuits. Or, if the artists flipped their model once they smelled success and were motivated to share everything they were doing, allowing the experience to be rapidly replicated.

<comment><USER12> Wrong thread?

</comment></comment><comment><USER13> I love how everyone _else_ who fights for reservations is a filthy hipster, while the author is merely a humble gourmand.

<comment><USER14> Great quote from a parallel discussion on Metafilter:

 _" A hipster is someone who enjoys the things I do, but in ways I disapprove of"_

</comment></comment><comment><USER15> Given their popularity, why doesn't this restaurant just get rid of the reservation system altogether? A lot of the popular/trendy/hipster magnet places here do this since it saves hassle and creates a certain allure when lines are out the door for a table.

<comment><USER8> Given this place has a line outside of it well before it opens on the off chance someone cancels, removing reservations would mean _everyone_ would have to wait for a table.

I can't think of a worse customer experience than taking someone on a date, waiting in a congested line outside at night for 45 minutes only to be told that there are no tables available.

Not getting a reservation on the other hand just means that I can just go somewhere else.

</comment></comment><comment><USER16> Perhaps the restaurant should raise its prices.

<comment><USER17> Indeed this I do not understand, nor do I understand why bands sell tickets so cheaply when they can be resold by touts outside the door for many times that price.

<comment><USER18> _Kid Rock is tired of scalpers taking tickets away from his biggest fans._

 _One way to stop that: Raise ticket prices. If Kid Rock charged more for his tickets, scalpers wouldn 't be able to sell them at such a big markup._

 _But Kid Rock doesn 't want to raise prices._

 _" I don't want to break you by coming to see me, " he says. "I want to make as much money as I can, but I don't need to drive around in a tinted down Rolls-Royce or Maybach and hide from people because I felt like I ripped them off."_

[http://www.npr.org/blogs/money/2013/06/27/196277836/kid- rock...](http://www.npr.org/blogs/money/2013/06/27/196277836/kid-rock-takes- on-the-scalpers)

<comment><USER14> That interview was a great summary of what's going on in the industry. Kid Rock realizes that keeping his die-hard fans happy works out better for him on the tour circuit, since they'll spend more on t-shirts and other things while they're at the show. If they have to pay $400 for a ticket, there's no budget left for a high-margin souvenir.

It's the internet age as well and he realizes that. The moment he tries to charge a market price for every ticket, he starts eroding his fan base.

</comment></comment></comment></comment><comment><USER19> This is remarkable.

Concert tickets are also being bought this way by bots for scalpers.

Ebay sniper bots are commonly used.

High Frequency trading is the high end this.

Perhaps it is unavoidable, perhaps other means for selling things online should be sought out, text messages with semantic replies required or something?

<comment><USER20> I really don't get the outrage against scalpers. They're just buying commodity futures, taking a bet on the future value of the tickets. If the value goes up, they make a profit, if the band suddenly become unpopular or whatever they lose.

We're in a capitalist system, the price you pay the scalpers is the "real" price of the concert: it's the law of supply-and-demand.

Now, if scalpers win every time, this is an issue with the original ticket sellers, not the scalpers!

If Shell started selling petrol at half standard price and some guy comes round to fill up a tank and then sell it to people at 95% standard price, that's Shell's mistake, not evil behaviour on his part.

<comment><USER21> To the average fan, the comparison between a ticket to see Act X on a specific date in their town is nowhere near the same as pork bellies or orange juice. They're called 'commodities' because they're interchangeable. Tickets are extremely specific to a single date and location and act.

<comment><USER20> Good point, I guess tickets would be "infungible commodities"... But the fact that you can take market bets on them doesn't change

</comment></comment></comment></comment><comment><USER22> Few years ago I wrote sth similar for registering to popular courses at my university. A lot of CS students gets an edge doing that.

Moreover, I have also participated in a few lotteries for various things (e.g. Half Dome permit), but did that completely by the book.

A few things that help make system fair (TM):

\- price them right, maybe even charge a bit premium for reservation vs. walk- ins

\- make cancelation non-free and charge at reservation time, even a few dollars prevents spurious reservations "just in case"

\- have a waiting list, if there is a cancellation, you can automatically sell it to someone else

\- do some load management, e.g. weekend prices, discounts...

</comment><comment><USER23> I bet this bot race is doing a great deal to improve relations between San Francisco's tech population and...well, everyone else in SF.

</comment><comment><USER24> If an establishment wants to give non-techies the opportunity to attend, yet remain "accessible" to those without piles of money, there are a few solutions.

1\. Don't take reservations.

My favourite restaurant operates on this basis. On a Friday or Saturday night you will queue for up to an hour for a table. If you prefer to avoid peak hour, there is rarely any queue for lunch. I've eaten there over 100 times and I still don't begrudge the time spent in the queue.

2\. Run a lottery

Popular theatrical productions are great at this. If you don't want to book months ahead (or can't afford to spend hundreds of dollars), Book of Mormon offers a ticket lottery before every show. Just show up at the theatre and enter for your chance to win one of 21 discounted, front-row tickets.

To clarify, I'm not suggesting that the establishment in the OP wants to let the poor and/or technological illiterate to attend. However other places have managed to do so without hurting their brand.

<comment><USER25> If I can't be sure to get a table/ticket I may come, but I am not bringing a date or a friend and risking ruining our evening.

</comment></comment><comment><USER26> But surely this is a good thing - people will have to take part in an auction for a table.

Want to eat at $POPULARRESTAURANT - you set a bid min and max and off you go.

Its allocating scarce resource at the most efficient level.

<comment><USER27> It's possible that your patrons are not interested in bidding, or otherwise participating in libertarian economic fetishism.

<comment><USER26> Have you _seen_ people trying to get in for a top NY restaurant - they will participate in _any_ fetishism :-)

</comment></comment></comment><comment><USER28> Seems like Urbanspoon should be using some sort of scraping counter measures to make things a little more fair. I sent them an e-mail through their contact form (of course I wouldn't be suprised if those are sent straight to the trash/spam folder).

Also, is scraping legal? I would imagine, at the very least, the OP and others are violating the TOS. I have written a few scripts of my own for fun, but I would be careful about bragging about it on a public blog.

<comment><USER28> Well, looks like they do actually respond to the contact form, got an e-mail from them a few moments ago saying they were "aware of the situation". Although, looks like this blog has been picked up by some mainstream news outlets, who have been getting comments from Urbanspoon:

[http://insidescoopsf.sfgate.com/blog/2013/07/25/are- automate...](http://insidescoopsf.sfgate.com/blog/2013/07/25/are-automated- bots-are-making-hot-online-reservations-impossible/)

</comment></comment><comment><USER29> Since you can't RESELL your reservation, I think the answer is for the restaurant to black list exactly one sniper, maybe just for one year, and publicize doing so.

Everyone else, who has been fighting to get a reservation for months the old fashion way, will not decry your loss.

And I doubt very much you would risk getting blacklisted for sniping reservations off their site, since you appear to love the restaurant so much.

<comment><USER30> If you can't resell your reservation, then what's the point of the bots?

<comment><USER31> Some of the bot-herders probably just want to eat there themselves. After all, the author wrote his bot because he wanted a table.

</comment></comment></comment><comment><USER32> The people saying "raise the prices" don't realize that the scarcity of the restaurant is an asset in itself. Restaurants become famous for being impossible to get a table at. The chef is more respected by his or her peers and the media. Newspapers write articles about the restaurant. The restaurant's cookbook starts selling more copies on Amazon. The chef is invited to an interview on Food Network. None of these things happen if they raise the prices until there's no excess demand.

Ferrari also has a long-standing policy of manufacturing "one fewer car than the market demands."

</comment><comment><USER33> In London, a "no reservations" system seems to be happening more and more with popular trendy/hip establishments.

And it seems to work.

Places like Burger & Lobster or Meat Liquor usually have very long queues at prime times.

<comment><USER34> Does anybody but the establishment really prefer such a system though? Setting aside time in my evening itinerary for queueing is not my idea of ideal.

Probably only a matter of time until a side-business of people who are willing to wait in lines for you emerges.

<comment><USER33> As a customer it can definitely be annoying to experience at times. My tolerance seems to vary depending on the wait times and food expectations.

A perceived upshot is that the restaurant must put an emphasis on quality at reasonable prices, otherwise they won't draw those crowds and I'm definitely not going to wait for a crappy meal.

However, the "no reservation" method itself seems to help draw crowds too. Kind of like the lines outside a night club seem to draw people. Throw in a bit of edgy branding with some cool marketing and it pulls well - having an "image" works.

Queuing is a bit of a cultural thing/expectation over here. Having someone cut in line can be a huge no no. If someone bought their way into the queue, I could very well see it causing some highly vocal responses. But I'm sure there are people out there trying it out.

</comment></comment></comment><comment><USER35> Reminds of the tickets to "walk" up Half Dome (Yosemite park). After some folks died a few years back, the number of folks is limited and you have to get a ticket.

 _All_ tickets for the year are gone on the first day they become available and then lo and behold you can suddenly buy the tickets (for a considerable markup) elsewhere. The folks scooping up the tickets like this are parasites. The solution is to limit the number of tickets per person or to disallow reselling.

(Haven't tried for a while out of frustration, might be different now)

I know, slightly tangential to the article.

</comment><comment><USER36> How are the bot owners flipping these reservations? I imagine there must be some commercial value via secondary market (or direct to concierges, offline), as bot-writers probably aren't actually using all these reservations themselves (or their friends). The more sane solution is to require full name when booking and ask for ID at the door. A name change has to be manually handled by the restaurant or would require rebooking. That would stop transfers and any market for these bookings.

<comment><USER37> It could be that a few savvy people always want a reservation or two on deck. They queue up reservations, say one table per week for two months. When that week comes up, if they don't want the table they cancel it. If they do end up having a need for it, how cool does it look to be able to tell your date that you can get a table at their favorite hot restaurant _tomorrow_?

</comment></comment><comment><USER38> The website is unreadable on a mobile device. I can't zoom out.

<comment><USER39> It's a truth universally acknowledged, that a restaurant in possession of a good name, must be in want of a good web designer.

</comment></comment><comment><USER40> Having worked at Ticketmaster for a few years, the first thing that came to mind was the similarities in automated ticket-buying bots.

Thing is, is there really that much of an arbitrage opportunity with restaurant reservations? Is there a place I can go purchase restaurant reservations?

</comment><comment><USER41> My experience with restaurants is that if one is too popular, just wait a little while. Eventually the mob's attention will turn to the next heretofore- undiscovered gem, and you'll find it's much easier to finally check out the previous one.

</comment><comment><USER42> I don't understand why they don't do authentication to remove the bots if this really matters.

If it doesn't matter, they should raise prices.

This is an issue in NYC. Some $300/night restaurants have you hyperclicking the moment the reservations open up.

</comment><comment><USER43> Priceless! When I studied history I learned how to recognize a significant historical document, and this definitely qualifies as one. I wonder what historians reading this two-hundred years from now would think of our culture.

</comment><comment><USER44> Next step: high frequency trading techniques applied to reservation making

<comment><USER28> Ahh, that would be hilarious. Urbanspoon should open up a co-location server rack and charge people a monthly fee to set up their servers there.

</comment></comment><comment><USER45> just as information, I use the free service [http://www.changedetection.com/](http://www.changedetection.com/) to send me email when webpages change (i.e. jobs opportunities). Unfortunately you can't automate the procedure of logging in and/or posting to searches, and I think the scheduling is once-a-day, so it wouldn't have been very useful for the OP cron case

</comment><comment><USER46> Cool concept. Wonder if he could write a script to land a reservation at Dorsia. I think that might be asking a bit much, even for a bot.

</comment><comment><USER47> A perfect place to implement a captcha.

<comment><USER48> Or the equivalent of a shadow ban. Once a bot is detected, always return "no reservations available".

</comment></comment><comment><USER49> Next step in escalation: make a bot that books with fake names, sell primo reservations on Craigslist.

</comment><comment><USER50> Next week: Co-location

</comment><comment><USER51> After reading that I want 10 mins of my life back.

</comment><comment><USER52> tangential but has anyone been to state bird provisions? I keep meaning to go, but don't because of the reservation saga.

</comment><comment><USER53> Captcha?

<comment><USER54> I'd try:

\- detect obvious bots (e.g. clients requesting form without loading CSS or JS or filling it in instantly), suspicious IPs (EC2, VPS hosting) and release smaller batch of seats to them (don't deny completely in case of false positive).

\- create waiting list and give reservations randomly to people on the list (while the list can be spammed as well, humans would still have better chance than reserving between 4:00:00 and 4:00:01). Also bot authors would have to be creative to avoid creating easy to spot patterns of names/times in the list.

</comment></comment><comment><USER55> Site renders horribly on an ipad

</comment><comment><USER56> Do people actually use "foodie" unironically? I thought that was something people invented to stereotype suburbanites who'd caught on to "gourmet" meaning absolutely nothing; I didn't know until now that people actually called themselves "foodies". Wow, it's a weird world out there.

<comment><USER31> It's certainly pretty common in the UK. Seems much less linguistically dubious than "gastropub".

(Why do "suburbanites" seem to get so much stick nowadays?)

</comment></comment><comment><USER57> _> This means that I'm bound to compete for reservations at good restaurants with the the hipsters_

if this restaurant is so popular, isn't it too mainstream for hipsters? /philosoraptor

<comment><USER58> Please for the love of god keep the shitty memes on reddit.

<comment><USER57> sorry, forgot to apply the stick up my this morning, so I couldn't appreciate the seriousness of foodie reservations in sf.

<comment><USER59> Non-hipster technique would have included invoking Yogi Berra and his " _Nobody goes there anymore. It 's too crowded._" line.</comment></comment></comment></comment>


Some Were Meant for C (2017) [pdf] - <AUTHOR> https://www.cs.kent.ac.uk/people/staff/srk21//research/papers/kell17some-preprint.pdf <comment><USER2> I don't like how people on the internet hate on C all the time. To me C is a wonderfully simple and elegant language that I can most of the time very clearly express my thoughts in. I find that this not the case with many other languages. This is the reason I use C. Of course compiler writers are trying to sabotage this but I don't write any critical code so if I get hit by an occasional bug it's not a big problem. I think C is misunderstood, perhaps because it is used everywhere and standards for critical pieces of software are applied to non-critical ones. E.g. never freeing memory, even leaking it by destroying all references to it, can be totally fine if your program just runs for a few seconds. Just allocate what you need, throw it away, and let the OS clean up when you're done. This is perfectly fine but I feel like many people wouldn't accept this kind of code because it's not acceptable in other circumstances.

Anyway, the author makes a few good points that are important but often overlooked, but I don't think I'd agree with him on the safety aspect in section 6. Making a safe C implementation doesn't really appear possible. If you allow casting integers to pointers, how do you implement these saftey checks he's talking about?

<comment><USER3> I feel like C has to go in the bucket of 'bad languages' these days, because it doesn't have sensible unicode support built in.

But that doesn't mean you can't have fun with it, or write good computer programs.

It just means that user inputted text is always going to be a pain.

<comment><USER4> To be fair it doesn't really have strings 'built in' particularly well either. It directly manipulates memory patches, and the string support that is there is mostly a very simple abstraction on that.

If you want support for unicode etc, there are libraries.

<comment><USER5> But then that brings you compatibility issues, overhead ...

<comment><USER4> If you want to avoid development overhead, absolutely, C is a terrible language to pick.

I'm not sure what you mean by compatibility issues in this context?

<comment><USER5> I'm thinking about differen string representations used by different libraries. Is this not true?

<comment><USER4> Honestly all I've encountered default strings (and people shy away from those now) and LibICU stuff. I think ICU has become a defacto standard but I have been out of C for a few years.

This tends to be important for strings you're going to show to the user (or input you gather from them), maybe most of the C in the world isn't aimed at interfaces like that...

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> I will always have a soft spot for C. It was my first language. I wrote my first linked list in C. 30 seconds later I had my first segfault. C was the entrance to the rabbit hole for me. I went down through assembly language, down through logic design, circuit design, and transistor theory, all the way down to fabrication and quantum mechanics. It was a long time before I came back from that trip. Today, I wouldn't use C for everything, or even for many things, but I'm glad I know it and I'm glad it's the substratum that holds most everything else together.

I'm glad because C is an idea you can hold in your head. I can look at old C, I can look at new C, and it's all pretty sensible. (Excepting macro abuse, deliberate obfuscation, or gross incompetence.) It's hard to say that about most any other language.

</comment><comment><USER7> What is lovely about C is its paper-thin layer atop the syscall pokey bits: signal, vfork, mmap, etc. No surprise that other languages either start by using libc, or find their way there eventually.

<comment><USER8> The "killer feature" of C is the simple semantics of the language (despite all the dark undefined corners), which can be implemented relatively straightforward on a variety of ISAs. There isn't any need for runtime support because of the lack of fancy language features.

That makes it the most natural way to call into the operating system, without any concerns that the chunk of memory returned by mmap has to be somehow managed by the language runtime.

<comment><USER9> The trouble is you can step from simple semantics to dark corners through such simple things as "adding two numbers together" and "accepting user input". I do agree that the lack of need for a managed runtime is a huge advantage on embedded or small systems.

<comment><USER8> > I do agree that the lack of need for a managed runtime is a huge advantage > on embedded or small systems.

Not only in embedded systems. It is a huge advantage when interfacing with the operating system from within a userland process.

Lack of a runtime means that a call to a kernel function like, say, `sched_setscheduler(2)` would not interfere with any such thread scheduling policies of the host runtime. Or that the runtime is grabbing file descriptors out of your control, making it hard to reason about resource usage.

</comment></comment></comment></comment><comment><USER10> If C didn't have (as much) undefined behavior it would be practically perfect. There's not much else that I would change about it.

<comment><USER11> Honest question. What has stopped people from creating a standard with no undefined behavior? Is such a thing impossible? Have people done it?

<comment><USER12> > "What has stopped people from creating a standard with no undefined > behavior? Is such a thing impossible?"

I don't understand the "undefined behavior" bandwagon.

1\. We have a perfectly defined list of "undefined behaviors".

2\. Said list also happens to be relatively small and scoped.

3\. "Undefined behaviors" exist because the language can't make certain runtime guarantees which are largely dependent on compiler/os/platform/hardware-specific promises. If you have to, just roll in your own runtime checks. C won't force those on you...

<comment><USER13> The language could make those guarantees if it wanted to. This might add overhead on some architectures, but would be possible. An example is integer overflow. If we limit to machines using two's complement (thus any machine architecture used during last thirty years) this could be fully defined easily. And if C is ever used on a other architecture they could build a workaround using some form of oberflow trap. (Since CPU design would take C into consideration)

Or evaluation order - `i = ++i;` could easily be defined in some way. But might prevent some niche optimisations by the compiler.

Of course by C's nature there are limits (C won't be able to detect use after free or similar without changing language notably) but there is room where UB could be reduced, if it was seen as neccisary.

<comment><USER12> > "The language could make those guarantees if it wanted to"

> "Of course by C's nature there are limits"

You seem to acknowledge the fact that most of the undefined behaviors in C are essentially born out of compromise. Those compromises were driven by principles such as "keep the power in the hands of developers", "don't impose unnecessary restrictions", "keep the language clean", "avoid hidden runtime magic". The end results reflect that.

As I've mentioned in my previous comment, there's no "one size fits all", so the language makes it trivial for you to roll out your very own runtime magic (à-la Zig/Nim) which suits you best. Why is that a bad thing?

</comment></comment></comment></comment></comment><comment><USER14> The only reason C is as popular as it is is that it was used to write Unix, which was widely distributed and implemented. The rest is just following on that. It's just like the reason human (and other mammals) have their optic nerve passing through the retina creating a blind spot: pure historical accident.

<comment><USER15> Yes and no. It can explain why C dominates over other low-tech languages, like e.g. Pascal. But when people talk about replacing C they usually mean replacing it with some feature-rich language. And why C survives and dominates certain areas despite lacking all the fancy features is a totally different question.

<comment><USER16> Pascal isn't a low level language its a teaching one

<comment><USER17> That's an age old discussion.

The practical Pascal variants like Turbo Pascal and Quick Pascal, which compiled to native code, are essentially on par with C regarding the features. That includes access to absolute memory addresses, port I/O and the speed of the resulting code. I've done over a decade of Turbo Pascal coding, and going on three decades of C, and I agree they feel like essentially much the same thing.

<comment><USER16> Humm ok but sounds risky I can recall PET programming where you would poke raw assembly code and BBC basic could inline Assembly , not sure that means BASIC is a low level language.

</comment></comment></comment></comment></comment><comment><USER18> Obligatory (and hilarious) read: "The Night Watch"[0] by James Mickens.

> You might ask, "Why would someone write code in a grotesque language that > exposes raw memory addresses? Why not use a modern language with garbage > collection and functional programming and free massages after lunch?" Here's > the answer: Pointers are real. They're what the hardware understands. > Somebody has to deal with them. You can't just place a LISP book on top of > an x86 chip and hope that the hardware learns about lambda calculus by > osmosis.

[0][https://www.usenix.org/system/files/1311_05-08_mickens.pdf](https://www.usenix.org/system/files/1311_05-08_mickens.pdf)

<comment><USER19> Got me LOL'ing several times! Thanks for sharing

</comment></comment><comment><USER20> It's dumb that in 2017 the author doesn't say anything specific about Rust, which is by far the strongest "C replacement" candidate.

The author doesn't deal with the problem that the "direct access to memory without abstractions" style they love so very easily drifts into undefined behaviour. It also optimizes very poorly due to lack of aliasing information, unless you enable type-based alias analysis in which case accidental undefined behavior is catastrophic.

The "dynamically checked C" they propose as a solution to C's safety issues is no solution at all until you can get it to work in practice. A lot of really great people, including the researchers he cites, have tried really hard to make it work and have failed in practice. He doesn't seem to understand why they failed or have any insight into how to overcome the problems.

</comment><comment><USER21> Discussed at the time: [https://news.ycombinator.com/item?id=15179188](https://news.ycombinator.com/item?id=15179188)

</comment><comment><USER22> I would change it to: some were meant to c

<comment><USER23> From the intro it's a reference to a song lyric (which I wasn't familiar with):

      While some were meant for sea, in tug-boats 'Round the shore's knee,
      (Milling with the sand,
      and always coming back to land),
      For others, up above
      Is all they care to think of,
      Up there with the birds and clouds, and Words don't follow.
      —Tiny Ruins, from "Priest with Balloons"

</comment></comment><comment><USER24> the other discussion mentions D as a better C.

Anyone ever try to build "C the good parts"?

<comment><USER25> They did. Many times.

First they made "C the good parts" by gathering all the various C bits then in use to make something portable and called it C89.

Then they made "C the good parts" by removing all the parts that made C slow to write and called it Perl.

Then they made "C the good parts" by making C easier but still fast and called it Java.

In the meantime, we've gotten Objective-C and C++, which were attempts to make C better while preserving backwards compatibility. C++ has gone on to spawn its own legacy of "No actually, these are the good parts" with D, Clay, Rust, and various half-steps along the way that want some of the features of C++ but not all of the features of C++.

I don't think they'll stop, because as it turns out, people use tools for different reasons and it's very rare that a general purpose tool solves your very specific problem perfectly. I'm inherently skeptical of any "X the good parts" because the "good parts" are domain specific.

<comment><USER26> I agree. If you take the tool perspective, it is easy to understand that different tools are needed for different tasks. Don't use hammer for sawing. No single language scales to all corners of programming problems.

Actually I really don't get this endless "silver bullet" discussion. C has its place and for very good reasons. Also the author makes really good points about the integration aspects of C.

<comment><USER27> I read this thought quite often here on hacker news but it is a bit alien to me. To me the charm of programming is the ability to---at least in theory--- write anything. This is also embodied in the idea of Turing completeness.

There is a continuum between the possibilities of a programming language and the possibilities of a configuration file. As soon as one says that a programming language is suitable for a particular purpose one has moved a few steps towards the configuration file end of this continuum.

This is, of course, a personal preference but I very much prefer to enjoy the power of programming language as opposed to the lack thereof of configuration files. Therefore, I like programming languages that attempt to be useful for any purpose. My favorite language is still C++ and if I were to switch to something else I would be inclined towards Rust.

<comment><USER28> Somehow I was expecting Lisp instead of C++ after all you've said. Any specific reason why you're not using Lisp?

<comment><USER27> Well, the ability to program anything includes the possibility to do tasks that require high performance. Also, I do like the fact that the compiler guards the type correctness of the program.

<comment><USER26> If your requirements are only high performance and improved type checking, then you are all set. The only language you need is C++. But the criteria above does not define all programming problems.

C++ is too complicated. "Nobody" writes C++, but a subset of it. Select your subset.

Dynamic typing in Lisp (and the like) is really nice for quick prototyping where program correctness is not key. You are exploring what you want to achieve with the program, be it algorithm level or architecture. C++ is not well suited for that, since type checking and memory worries are slowing you down, too many details to drag along. Hence no "silver bullet".

<comment><USER27> Sure, C++ is complicated. And the way templates are compiled is positively weird, which in turn sometimes leads to long compilation times. The 'select your subset' thing is often repeated, but I do not see much of that. I am a bit worried, though, that C++ seems to keep growing to the point where it really might get to big and complicated.

Quick prototyping is not something that I do. Nor am I very much interested in it. At my place of work I have seen it done around me after which it was my task to turn the python prototype into C++. The most surprising thing there was how far the prototype turned out to be from what was actually needed, to the point where I very much question whether the prototyping exercise was useful at all. YMMV regarding this, of course.

<comment><USER24> A python prototype is useful for specifying the correct program behavior. It's useful as a guide for later implementors. Better than a spec in a word document.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER29> The best thing about C (apart from speed) is that for every issue with the language there is a tool that fixes the problem. It can do everything everywhere even if it's sometimes not the best choice.</comment>


Segway-Ninebot unveils scooters that drive themselves to charging stations - <AUTHOR> https://www.reuters.com/article/us-scooters-ninebot/chinas-ninebot-unveils-scooters-that-drive-themselves-to-charging-stations-idUSKCN1V60LJ <comment><USER2> Oh man this is a terrible idea if limited to our current tech, even if they're being controlled from the cloud with shadow-workers the havoc they could cause is significant and the chance of failure is high.

</comment><comment><USER3> "drive themselves"

"AI-driven scooters, controlled remotely from the cloud"

controlled remotely from the cloud sounds to me like shadow-workers.

<comment><USER4> Or, you know, they get directions to the charging station from a server.

<comment><USER3> Which is more likely, they solved vehicle autonomy or they pay someone to control their scooters to make it look like they solved it?

<comment><USER5> vehicle autonomy requirements for a scooter are a lot lower than for a car. For one a scooter can't run somebody over so.

<comment><USER6> Yes no problem if the scooter drives in front of someone and trips them, or crosses a street at red, or doesn't recognise a manhole and falls in, ...

</comment></comment></comment></comment></comment><comment><USER7> No they do not. They didn't even demo it or provide a video.

</comment><comment><USER4> I really want Bird scooters that you can shoo away, and they'll come to life and clear the sidewalk.

<comment><USER8> Like a flock of birds? I get it!

</comment></comment><comment><USER9> Not to sound paranoid or anything but are we (USA, Western world) really going to allow motorized robots (with cameras and sensors) by the thousands to be let loose in the US all beaming data and controlled from China?

<comment><USER10> Is there legislation which prohibits AI-driven bots such as a Segway autonomously on the sidewalk (not talking about the road). What about bicycle road?

(Asking world-wide, not any specific country.)

</comment></comment><comment><USER11> Nothing mentioned about how these won't run into things or cause chaos in intersections? What happens if someone tries to jump on one while it's driving itself? I'd really like to know

<comment><USER12> I'm guessing they drive themselves at something below walking pace, and if they're interfered with in any way they stop.

</comment></comment><comment><USER13> Heh... here I thought it was the original Segway company that was years ahead (using over-complicated tech) of the scooter trend!

<comment><USER14> Technically it is, isn't it? I think Ninebot bought them. But you could say that makes the original Segway dead then.

<comment><USER13> Ah, I wasn't aware of the history. Thanks!

<comment><USER14> Quick skimming of wiki, seems like the founder left the company during its first sale back in 2009. Then Ninebot bought it in 2015. Seems both sales were for very low amounts.

Who knows what could've been!

</comment></comment></comment></comment><comment><USER15> I have long envisioned vended self balancing scooters, they would be summoned and appear like magic.

</comment><comment><USER16> We are starting to hit boundaries what is good for individual vs public.

It's good for a scooter to recharge itself. It is not necessarily nice for the public to walk among scooters going to recharge stations.

Ie philosophy public vs private interest.

<comment><USER17> We long ago passed those boundaries.

It's good for an individual to sit in air-conditioned comfort while burning fossil fuels to move 1.5 tons of vehicle. It is very unpleasant for the public to walk, run, cycle, scoot or even just stand among dangerous, noxious and congested vehicles

</comment></comment><comment><USER18> I'd like to know how they plan on not running into stuff. Portland has a lot of things randomly blocking sidewalks. What if the scooter is in the street and can't get onto a sidewalk?</comment>


Is your startup co-founder a jerk? - <AUTHOR> http://blog.aha.io/index.php?p=940

<comment><AUTHOR> The OP is my co-founder ... but I don't think he is talking about me. I will need make a point to ask him how he is feeling more frequently though.</comment>


How science journalism is broken and how can we all fix it - <AUTHOR> http://medium.com/@nukleosome/how-can-we-fix-research-churnalism-668075268680 <comment><USER2> I am a little surprised, given the title, that the issue being highlighted is blogspam and the brokenness is basically that science journalists can't fairly capitalize their effort. At the risk of hijacking the discussion to talk about an entirely different issue: science journalism is broken not because spam blogs copy-paste articles. It's broken because the entire ecosystem has the wrong incentives.

Researchers, many of whom have inadequate statistical training, are academics facing publish-or-perish and weird publication barriers (p-value filtering, premium on sexy new results over well-researched incremental advances). The more senior authors who have tenure and are safe from some of the incentives still rely on lab funding, which is similarly competitive, and also tend to people whose methodological training is substantially out of date. Most journal reviewers are subject matter experts, some with limited statistical training.

Universities put out press releases to support authors without being equipped to evaluate the quality of the work or having an incentive to contextualize limitations of the work. Science journalists largely breathlessly report the original press release without reading (or in some cases having access to) the original article. They tend to have a good understanding of jargon but a poor understanding of design. There is no notion of including comment from critical authors, and there is certainly no notion of critiquing the design, replicating the experiment (either a limited replication using the author's code / data, or a more thorough replication to obtain the substantive result). Then the blog-spam people play broken telephone with the initial science reporting. Well-meaning and interested users post these articles to reddit, HN, social media, etc. credulously reporting the headline of the article they read. Most comments in the discussion read the title, skip the article (let alone the study) and proceed assuming it's true, and normally take the form "This validates some other belief I have, so it's true" or "Duh why did they even do this study?", both of which are not useful.

I see very little evidence this process stems from the article's implied undertone that blog spam is costing legitimate journalists money and starving them of resources they need to do a good job. Even very well-funded sites suffer from this. The problem is the incentives. Imagine a science website that posts only 1/10th the number of posts, but deep-dives all of the ones they do.

Let me proposal an alternate model: As a user or a journalist, if you aren't trained enough to read the study, don't post an article about it. Training does not mean subject matter training (as in you understand whatever the specific topic at hand is), although that is useful. Training means enough numeracy to be able to evaluate the work. This should cripple the flow of science communication but vastly increase its quality.

Posting an article you can't understand and relying on the "system" to ensure it's true is the same kind of broken process that leads to people circulating conspiracy theory stuff or stuff we all agree is junk science. This should be especially followed in disciplines like social psychology, applied economics, neuroscience, evolutionary anthropology or evolutionary psychology, medical research, nutrition research, and other fields where experimental or quasi- experimental design are more difficult.

<comment><USER3> _if you aren 't trained enough to read the study, don't post an article about it_

The problem, as I see it, isn't just that the journalists can't read it, but that their audience don't care about it. The journalists are supposed to serve as intermediaries between the two, but frequently, proper journalism on the story would fail to excite the reader. The vast majority of science is important to other scientists, but science that actually matters even to scientifically-interested readers is not that large.

The readers want more content that interests them, and science fails to provide it. No journalist could bridge the gap between the dull progress of science and the reader's real interest level. The market for "mind-blowing" science -- sweeping technological and philosophical advances -- is far greater than the market for incremental improvements and novel but minor insights.

The niche does exist. I find it filled fairly well by Science News, which has about a dozen pages of real science news every two weeks. I only just got an issue about the black hole photo, which was fine with me: real discoveries are still true and important two weeks later. But most readers would find every other article in that issue terminally dull.

I don't know how to fix that other than to ignore any science "journalism" that comes out more frequently than that. It exists, and I ignore it. It doesn't contribute anything: it's peddling effectively-fictional stories to readers who want sci-fi. I think that the finest science writing promoted well might attract marginally more eyeballs than it currently gets, but most readers simply don't actually care about science, and it's not something journalists can fix.

<comment><AUTHOR> I don't think the problem should be approached from a "great market" perspective. The market for Hacker News is quite niche. Yet, it has become a great community for the curious of us. Almost hardly replaceable by any of the communities/websites who have great market potential and wider audience. So niche is probably a good thing here.

Driving a critical discourse (on something like Health or Hacker News) between scientists, journalists and the general public can potentially create more appreciation for scientific progress (which might often be dull and slow indeed) and provide a feedback loop for how science is/should be communicated or even done.

</comment></comment></comment><comment><AUTHOR> The URL to Scripps Research is obviously working now, after the story got its largest share of public attention from other websites. Truly disappointing.</comment>


How the World Trade Organization could open up Internet access in China - <AUTHOR> http://reason.com/archives/2010/02/02/battering-down-the-great-firew <comment><USER2> > _Now the European Union and the U.S. Trade Representative office are > considering an argument that the Great Firewall violates China's obligations > to permit free trade in services under its agreements with the WTO._

I feel that if anyone were to pressure China in this manner, by citing this economic argument, it'd be quickly rebuffed by the Chinese as a necessary "political" control that can be found in a number of WTO member states.

Examples include limiting or even prosecuting hate speech (anti-religious, Holocaust denial, advocating genocide), blocking websites with illegal content (drug use, bomb manufacture, child pornography), and so on... The websites most noticeably blocked in China allow user-generated comments and videos that cannot be controlled by the Chinese government, but will have similarly illegal-in-China content (Tibet/Taiwan independence advocates, anti-government protesters).

There's little to this argument without appearing hypocritical to the Chinese government, and the firewall (GFW) is too important to their goal of a "Harmonious Society" - it will fall only if the Party falls.</comment>


Why can't I use certain Unicode characters on Hacker News? - <AUTHOR> I tried to use some here: https://news.ycombinator.com/item?id=10156891<p>But they were silently and automatically stripped from my post. <comment><USER2> We made the software strip some ranges of Unicode chars because people were abusing them as gimcracks to grab attention to their posts. HN has always been a nearly plain text site and we don't want that to change.

What you tried to post sounds legit, but it's hard to get this perfect for all occasions. Maybe we'll look into refining it a bit.

</comment><comment><AUTHOR> Testing:

I tried to use the smiley face emoji 'SMILING FACE WITH OPEN MOUTH' (U+1F603) on the preceding line. This is non-BMP, so maybe that's why it's stripped.

Testing:

Here I tried to use the smiley face emoji 'WHITE SMILING FACE' (U+263A) on the preceding line. This is BMP, so why is it stripped?

Testing: naïveté

Hmm, at least HN supports some very basic diacritics.

Testing: ありがとう

Japanese works? Yet not smiley faces. Odd.

<comment><USER3> There's not much to gain with smiley faces. In the best case they accompany a statement that is already kind/appropriate/respectful. In the worst case, they are used to excuse statements that are not, pretend something mean is a joke, or otherwise "soften the blow".

On the other hand, supporting other languages can add to HN because: 1. not everybody is a native English speaker: 2. Some ideas are not accurately and/or efficiently conveyed in English.</comment></comment>


Yes, You Should Be Using Emojis at Work - <AUTHOR> https://www.wsj.com/articles/yes-you-actually-should-be-using-emojis-at-work-11563595262?mod=rsswn <comment><USER2> One of the first thing I did the first day at a new job was add business cat to Slack and set my status to business cat.

The response was immediate, positive, and it was my first conversation with a number of people about it. Everyone likes business cat, it's a great icebreaker.</comment>