Show HN: Onions.io – secure and open-source text storage in the cloud - <AUTHOR> https://www.onions.io <comment><USER2> You appear to be encrypting "Onions" with CBC with a static IV, using the hash of a string as the key, and with no integrity. You can't use a static IV. You can't encrypt without providing for authenticity. How do you know you don't have a padding oracle? The code you have right now will, from what I can tell, behave differently if an attacker modifies the ciphertext.

Where did the crypto design for this system come from?

Why are you hand-rolling your own crypto? Why didn't you use something like Nacl instead, which was already carefully designed to make crypto safe for developers that haven't studied the topic?

<comment><AUTHOR> This is why it's in Beta. Thanks for pointing that out to me - I'm gonna' roll that in right now (although everyone will lose their data as it stands, this is good).

I'm imagining this is a good crypto library for its Ruby implementation: [https://github.com/cryptosphere/rbnacl](https://github.com/cryptosphere/rbnacl)

<comment><USER2> Yes. Please drop the hand-rolled crypto you have now and use libsodium or rbnacl.

<comment><AUTHOR> Getting lib sodium and rbnacl to play nice with Heroku has proven to be outright impossible as of now. But I do believe I have fixed the problems you raised.

\- The key is not a string, it's generated using PBKDF2_HMAC_SHA1 for 20,000 rounds, and then passed in to the cipher function - where it's SHA256'd. The reason for this is I do plan on having other clients beyond the website (iOS - which is practically finished, Android, etc) where just in case their generated Key happens to be injection-ready code, I'm manipulating it one last time before going in and encrypting/decrypting.

\- I'm authenticating the messages based on a server config variable that is an authentication tag like so: SHA256(SERVER_AUTH_TAG + encrypted_data). The openssl version I'm using doesn't have self-built authentication in its AES cipher suites. Is this a good/bad avenue to go down for message authentication? I feel like if someone takes my server and gets the SERVER_AUTH_TAG then there's bigger problems anyways.

\- I'm now randomly generating initialization vectors for each piece of encrypted data. So, for an Onion where there's a title and info, the title gets its own IV, and so does the info. When you edit the title, it gets a whole new IV as well.

<comment><USER3> _But I do believe I have fixed the problems you raised._

Except for the one where you are rolling your own and not using the libraries he suggests.

<comment><AUTHOR> The thing is, I'm not rolling my own here (minus message authentication, but based on cursory reading, this is how it's done anyways). I'm using standard OpenSSL libraries - things that are vetted, and I'm using like they suggest. Rolling my own was using it without an IV and without message authentication (aka getting it half right). I'm not doing that any more.

Obviously the libraries he suggested are different than the ones I'm using, but that in itself shouldn't be a case for dismissal. The ones I'm using are industry standard. His suggestion uses a different stream cipher and a different key generation scheme, the ciphers and key generation scheme I'm using are what are behind SSL/TLS - something which is not broken. The NSA didn't break this, they bought their way through the crypto, which should tell you something about its strength.

I am generally curious though, to make sure I got what I did right. I think I have - and again the only part I'm not sure about entirely is message authentication. Some places online suggest including the IV in with the authentication. However, since the code is open to the public, and if an attacker were to take my database, they'd have the IV no problem. The only thing they wouldn't have is what I'm signing each message with, the thing that really does the authentication, my server config variable only used for message auth.

</comment></comment></comment></comment></comment></comment><comment><USER4> Two concerns:

1\. Your security model is identical to that of Lavabit, and is equally vulnerable to you being legally compelled (and kept quiet with a gag order) to collect your user's passwords. What is your threat model?

2\. On your "About" page, you explicitly state that your project has nothing to do with Onion routing. Then why name it onions.io? The domain name is similar to onion.to, a popular tor2web proxy. The logo is extremely similar to that of the Tor Project. This all seems like false advertising given that the project has nothing to do with those well-known concepts and projects. I would seriously considering changing the name and logo.

</comment><comment><USER5> Don't forget the SSL config analysis -- you're not bad, but not up to the DuckDuckGo standard yet!

[https://www.ssllabs.com/ssltest/analyze.html?d=onions.io](https://www.ssllabs.com/ssltest/analyze.html?d=onions.io)

Generally agreed with other comments -- it's impossible to prove that the server is trustworthy (just imagine how easy it would be to tweak the server code to simply _log_ all the cleartext that comes in...), so a purist approach forces you to encrypt on the client-side. On the other hand, a good & open server architecture, hosted somewhere the gov't can't oblige you to cheat, with external security audits goes a long way as well. Good usability and reliability often involve _some_ security trade-off (think about password resets -- these are next to impossible if the server is untrusted!); the important thing is to figure out the best balance based on your intended customers.

Thinking more about the purist solution -- if the server is untrusted in your solution, you don't even need to provide the server anymore; let someone bigger handle that for you. I.e., you could generate a secure data file with your OSS client software (like KeePass or similar do), and let Dropbox or whoever else store it safely for you.

If you could make this really useable (incidentally, KeePass is not a good model here), that'd be a valuable creation. Unfortunately, then you're stuck building native applications for multiple platforms, which is probably not what you were hoping to be working on.

</comment><comment><USER6> How do you prove that onions.io is running [https://github.com/onionsapp/Onions-Rails- API](https://github.com/onionsapp/Onions-Rails-API)?

<comment><AUTHOR> Right now I'm not sure yet. This is just my MVP, and I haven't quite figured that out yet. My first thought was a SHA hash of the Server vs. the same hash of the Github code. Unfortunately I'm not quite sure if that's feasible or realistic based on how things are set up.

Any thoughts on a good method for this? It's definitely something I want done.

<comment><USER7> That's trying to solve the wrong problem. Rather than try to prove the server is trustworthy (which is impossible), make the server untrusted.

Which means finding a way to securely, reliably do the encryption on the client. Which would be a useful thing to build, since all the current ways of doing that have problems.

<comment><USER8> Don't take these suggestions the wrong way: even though the security won't be perfect for a while (or ever), these projects, which make encryption available to the mainstream are priceless.

Crypto.cat uses a browser extension, I think (disregarding all of cryptocat's woes) that is the way to go.

</comment></comment></comment></comment><comment><USER9> A guy recently posted something similar written in Common Lisp called Turtl. [0] You might want to check that out as it avoids some of your design problems, namely "authentication" is really just entering the decryption key in your browser. All data is decrypted on the browser, and the host-proof service on the service knows none the wiser.

Also see Firefox Sync. [1] But I am seem to be one of five people who advocate it.

[0] [https://github.com/turtl](https://github.com/turtl)

[1] [http://docs.services.mozilla.com/sync/](http://docs.services.mozilla.com/sync/)

</comment><comment><USER10> I know you say you're not storing the password on your end, but what prevents you (or a hacker who somehow gets access to your server) to suddenly start logging the passwords as they're sent to the server when someone logs in?

You've got what looks like a good approach to storing things in an encrypted way, but it's still requiring the user to trust that the server is actually doing what it says it's doing and no more.

<comment><AUTHOR> To be honest, I'm not sure yet.

There are a couple things to figure out:

\- How to make sure the entire process is more transparent, beyond hosting the code on Github right now. Basically, how do I prove that that is the version that's in production in a simple manner without compromising the server as well?

\- Is there any way to make sure that passwords and usernames aren't logged in between the security layers so even if I were to upload malicious code (I won't), that I'm out of the equation and people can still verify this?

Right now, this is just my MVP, and I'm releasing beta codes to make sure the server doesn't crash and that I don't get charged through the roof by Heroku before I have enough moolah to support this side project. I was hoping for a little community input on ways to verify these things. Thanks for the criticism man, it's definitely warranted.

<comment><USER11> I think the only way would be to make a browser extension available for those who care enough to use. Fundamentally, anything on a web page belongs to the server that sent that web page, and if that server is compromised so is the browser window.

</comment></comment></comment><comment><USER12> I think it's great that people are trying to tackle this, and I feel a little sorry for the creator for some of the rather-harsh criticism. That said, given the nature and aim of the project, it really needs to live to very high standards to deliver on its promise. And some of those harsh-sounding words are to a large extent helpful. Putting things into perspective and helping identify the weak spots.

To me this looks similar (at least on the surface) to clipperz[1], even though I believe clipperz does all crypto on the client-side. Of course, both suffer from similar attack vectors or trust issues either way. Client-side does not mean you don't have to trust the server.

I hope for the sake of the project, that it gets more than just passing comments (however helpful), but rather serious engagement from people with experience in this field.

[1] [https://github.com/clipperz/password- manager](https://github.com/clipperz/password-manager)

</comment><comment><USER13> This caught my attention, but then I read this:

"Things like passwords, debit card information or social security numbers lend themselves perfectly for Onions."

You can't be serious about that. Even if you could perfectly safely store SS numbers, don't even dare try to convince the public of that, they're going to think you're full of it instantly and the trust you require will be gone (deserved or not). You have to remember to account for the irrationality of people when you design a service, things they're scared of (even if they shouldn't be, and so on).

I'd argue that in general people don't feel great giving their SS number to the most secure companies on earth. Giving it to Onions.io? Forget about it. Don't go there unless you have the extraordinary reputation to overcome the fear people have about storing such sensitive info online.

</comment><comment><USER14> I'm not being a hater, but tbere is a lot of "I'm not sure" in your answers.

Not the sort of thing that is reassuring to see from somebody claiming a solution is "secure".

That said, there is definitely a niche for this sort of app

<comment><USER15> > I'm not being a hater, but tbere is a lot of "I'm not sure" in your answers. > Not the sort of thing that is reassuring to see from somebody claiming a > solution is "secure".

I'd rather hear "I'm not sure" than "Don't you worry about X, let me worry about X!" or just making something up, or speaking inaccurately off the cuff.

I'd rather hear "I'm not sure" than hear that someone is sure, but wrong.

<comment><USER5> Also: it's still in beta and not yet open to the public, for the very reason that the creator is still sorting out these questions.

</comment></comment></comment><comment><USER7> The README throws up huge red flags to anyone who has studied crypto.

For example, saying you use AES-256 _without explaining what cipher mode_ really doesn't say anything at all about the security of your system.

And even if your crypto system is awesome, it doesn't matter at all because it's all running on the server, where the NSA (or local equivalent) can simply force you to turn it off at any time.

If you really care about bringing strong privacy to users, you need to give them something they can run locally, so they don't need to trust your server.

<comment><AUTHOR> I fixed the README to say it was using CBC for the cipher mode, thanks for that input. (though this will be changing to NaCL's implementation of XSalsa20 very, very soon)

I made it open source so people can also fork and run on a local machine, that only they hit - but I plan on launching an iOS app very soon for it as well, so you can do something on one computer, and then use another to make changes or see things on the go. This is the only reason I made it in the cloud.

</comment></comment><comment><USER16> The concept is flawed. You can never trust a 3rd party to not read your data; the only option is to run your own server.

Also for passwords you don't want the data to be permanent. Something like this would be better: [https://github.com/badgerodon/selfdestruct](https://github.com/badgerodon/selfdestruct).

</comment><comment><AUTHOR> Beta Codes:

      ebcc8d74-edee-46c6-a640-020741a9b2eb
      15ea4fa0-3ad6-46ea-a3b8-07136117f722
      64641c44-2d78-495d-b900-4534312f59be
      fdb92162-6de6-4868-b5f1-d5e1ba35516d
      c8d0fbb9-60c5-4156-92d2-8c9db48f1600
      e88a760e-7a4b-4ff2-9276-039d7630edd1
      59bd9776-ee53-401f-9d20-8a259a25007f
      80888b40-bce3-4d1d-a9ad-e555e5aaf37c
      5ed2e9e2-c152-4176-b7cb-aaf4700c4f4b
      2ab69676-c618-43bb-90fc-0353ceac756c
      a913abf4-5dbc-44ed-9e32-0b9ec08dd69d
      9cd734ff-e28e-42e4-95df-635f7d487dcc
      b4261b97-e6a9-4b10-a219-21f7b36913fc
      14d108b3-652b-4123-88f7-bdf8e3d87c04
      a8090aaa-b9ec-417f-9e62-98f0972587d4
      949c1467-40c1-4b93-bca8-97d80b756926
      b61fc80f-0f9e-45a9-82f3-61b0deaf52c9
      84b449d5-6b0b-4775-b4b0-531d50f25afc
      a09023fd-4ff2-4e8d-aabb-ee3c94dec08b
      806db2ef-42e3-46c6-901a-053da569561e
      4654e5c5-878a-4609-95c0-060f3ea81669
      21092de4-c521-4329-9bc7-1793dd3c1b4a
      4ea9e54c-cc31-40b4-bcf7-fadf75859964

<comment><AUTHOR> These codes are dead. Try these:

      64641c44-2d78-495d-b900-4534312f59be
      1659560f-e90c-4617-9a1b-d909b7fdb3ec
      2548e52a-050a-42eb-ab02-9bd4f00e431a
      4f634b69-e77a-430d-9d44-9b831a695572
      3042ae64-09aa-431f-beb2-8092c99827cd
      bb049652-e7b4-479f-ab4f-6450bf4e152e
      4c219d83-8c3b-4272-9df0-be2cae314df8
      a4c5431d-061f-415b-9b31-9b87e4f76518
      ea957849-8e8e-44f2-8dd4-50061c817fad
      0fe3d4fc-c51d-47ad-93c4-c6328e387900
      a6f64f88-93d3-490a-bc2a-ef3977e9d260
      e6b8a89e-e93b-4af6-b2a5-349deebffac4
      20b0225a-57a9-434f-a78a-72f612747c63
      9496fc4b-fb2d-4bac-8d9c-43839f715fdf
      406c5740-f8f3-4f62-ab67-c3fd20db955e
      06c47d64-bb0d-4501-b45d-f684f84fd1de
      554194d0-969c-4fe9-8aae-d8cd75225036
      b599bf82-5d44-408a-b1c7-fe4f84c7d46e
      eedea074-ca77-4d04-b575-47acbf5311ec
      329e9855-30b0-46db-bfa5-5ffe37d84a78
      a31e3833-4ea1-4296-aa3e-e285f926e9a6
      35f61f09-3326-4c0d-9ca9-672a26231140
      260fdecf-e555-48b2-be7e-c88b4ea5c50c
      d11c6b47-c333-4ae2-bf7b-6ed28b3405c0
      4443e955-9054-438c-bc80-5a56702fbc7a
      e3694c44-c370-4e89-b8f7-25bb3ea67250
      48797a6f-a5d1-40c8-bf30-2ab998413a90
      0768289b-871d-4802-aef8-0fbb2ca0bf7b
      24f20237-38c4-4be0-9d9e-8f30028796b1
      a21c9beb-6a3e-4c37-9047-331fd9c6db62

<comment><USER17> All beta codes are not working.

</comment></comment></comment><comment><USER18> i suggest you spend time looking at Persona so that users can just login with a Persona account without you warning them "well you have to remember a password".

<comment><AUTHOR> I would, but the whole purpose of this is to not tie any information back to a person, aka keep it anonymous. Persona accounts use email, so there's no point in using them.

<comment><USER18> Well, if you think people are going to create another username and another password to hide identity, that assumption is bad as well. You can launch a study and you will find even a lot of the "hackers" here will get lazy at creating a new password and a new username. You probably feel the same anyway.

There is a whole bag of reasons why we don't want to reinvent an auth system anymore other than recording the username and give a user privilege/level to that name in the database.

and with server logging, you have to do a lot of work to ensure your server isn;t logging ip addresses which effectively makes certain types of debugging and defense very difficult (intrusion detection for example).

You also have to be aware of ISP logging as well. In the end, no, you can't guarnatee no one can know the identity.That philosphy is flaw.

You goal is to ensure auth is as minimal as possible, and maximize security of information retrieval and storage.

if you want to reduce the abiilty to know the user idetntify without a raintable / bruteforce, hash the identity. hash the username / email address.

That's the only way to hide it from an obvious search.

</comment></comment></comment><comment><USER19> I login with empty password. Just click login button.

</comment><comment><USER20> Interesting idea. Some notes / comments / questions on the posted code (in no particular order):

* setting up a separate routing namespace for the API would clean up a number of things. In particular, it would make the web-only actions much clearer; calling respond_with with a JSON error payload and then relying on it to render the template (as done in OnionsController#index, for instance) is terribly confusing on a first read.

* does logging in actually set session[:UserKey]? It doesn't appear to, but that would make returning users unable to decrypt their existing onions.

* I really, really hope that isn't your actual session secret in config/initializers/secret_token.rb. More info on why this is bad and how to fix it here: [http://blog.phusion.nl/2013/01/04/securing-the-rails-session...](http://blog.phusion.nl/2013/01/04/securing-the-rails-session-secret/)

* The encryption code in OnionsController would be better suited in the Onion model, especially since the decryption code is already there.

* the API for adding onions (OnionsController#addOnion) does not encrypt the data before storing it. Is this intentional?

* every action that modifies onions creates a new session. From the way that new_session works, I'm guessing this is to provide "session expiration" that's reset every time a user changes something. Would updating the timestamp on the user's existing Session accomplish the same thing, or have I missed something?

Some more code-review oriented notes:

* Some of your class methods in the models would be clearer as instance methods - for instance, both account_exists and pass_is_good take the hashed username as an argument and find the corresponding Account object. pass_is_good could be an instance method on Account. As another example, the code inside the loop in decrypted_onions_with_key could be an Onion instance method (telling an Onion object to decrypt itself vs. doing it externally).

* the comment character in Ruby is #, not surrounding things in / symbols (which creates a Regexp literal). In most cases (config/routes.rb, for instance) this happens to not cause problems - but it's still not a good habit to get into.

* some style notes: none of these affect the operation of your program, but they _will_ affect how efficiently other developers read your code and work with it.

First, pick a tab setting in your editor of choice and stick with it. The "Ruby standard" is 2 spaces, but if you prefer something else at least be consistent.

Second, check out some of the Ruby style guides regarding naming. CapitalizedCamelCase is makes for somewhat odd-looking database column names.

<comment><AUTHOR> Thanks for all the input, Ruby is basically the equivalent of ESL to me. I'm an Objective-C programmer by nature (self-taught at that, I have a Bachelor's in Graphic Design as it stands). These are all really good points, as I get better in this language.

Logging in does generate and set the UserKey. I'm making a rolling, resetting SessionKey, so as not to keep one session alive forever. Every action makes a new one (also hence the primary key resetting that happens when it approaches the limit of a 32bit signed int).

Also, regarding tabs, I just can't get a damn editor to actually do these correctly. I've been using Sublime and then switched to RubyMine recently, but both are awfully annoying. Clicking in a new line doesn't automatically start the cursor at where the next tab should be, it starts it exactly in the line where I clicked - making me have to hit return again to get a new line in the appropriate place. Sometimes I just go on because I'm trying to put the idea down, resulting in shitty looking code. The only IDE I've seen that does this right is Xcode, and I really wish RubyMine could do it, because it's also been very nice so far. But poor UI in IDEs is neither here nor there for this project. Thanks again for the input.</comment></comment>


Where Rust really shines - <AUTHOR> http://manishearth.github.io/blog/2015/05/03/where-rust-really-shines/ <comment><USER2> I've been following Rust for a long time now, and I'm very excited about the possibilities. However, I don't have a CS degree, and my work as a full stack web developer has only put me in contact with garbage collected languages: NodeJS, PHP, and a little Python.

I just spent an entire week working on a chatbot in Rust, and I found the steep learning curve to be very challenging. While Rust seems to be a big win for teams that are accustomed to C++/C development, it does seem to be very demanding for web devs who always work with a garbage collector.

In particular, I was trying to use Iron to write an http server that could receive web hooks. Iron, quite sensibly, handles each incoming request to a server in a separate thread. However, as a beginner it's very challenging to figure out how to persist data between requests without writing to disk or persisting to a db. Mutating state across threads is hard. Currently, there's also no version of channels that are single producer, multiple consumer. I'm sure as the ecosystem develops, more examples will make this easier, but for now it's surprisingly difficult to figure out.

Fortunatey, the #rust IRC channel supported me all the way. It's a very friendly and active community, but without their support I would have probably given up.

I look forward to seeing more posts at this level of detail help those of us struggling to learn Rust understand how the experts use Rust.

<comment><USER3> So I'm not sure I fully understand why you would target Rust as a web development language in the first place except pure curiosity of working in the language, but it appears there's more to the story. You're excited about Rust's possibilities -- in web development or just in general? And you gripe it's "demanding for web devs who work with a garbage collector." This makes me pause and think, why are we talking about web devs in the first place? From what I understood, Rust is a systems language and by systems language, it means stuff a lot lower level than `route '/me' => controller.toMe!`

Thing is about web dev is that (1) it's a get-things-done playing field and (2) primarily just data delivery. The idea that you would want a language that doesn't have garbage collection is just silly. Why? What complex operations are you doing in each request/response cycle that demands this sort of computational horsepower? And if you are doing said complex operations, maybe you should rethink how you're delivering that data and creating it? GitHub is huge and runs on Ruby. Surely, you can't be wanting to use Rust to improve your performance are you?

> Mutating state across threads is hard

Yep, so maybe you should target a language / framework that abstracts this away from you? I wouldn't say anything usually but you say it's "surprisingly difficult to figure out." Come on really.. programming languages are not created just for web devs...

I don't know. If you're trying to be productive AND change your toolset, it sounds like you just want a typed language. I wouldn't put bet too much of your time-and-focus-chips on Rust becoming a language for web developers. Do you see many people using C++ to write their servers? Nope. And don't take my message the wrong way. It really just bewilders me because I see a comment like "Yea I want to help people like you!" and I'm like Huh??

<comment><AUTHOR> FWIW Rust is intended to be more than a systems language, but is designed as a systems language first (but other use cases are all taken into consideration)

</comment></comment></comment><comment><USER4> As a novice I find that when the compiler starts telling me do to things it will go one of two ways: either what the compiler tells me to add will quickly propagate until it's happy OR it will propagate until lifetime arguments have spread through the entire codebase, turning everything into token salad. The hard part is having a mental model of the data so you can reason about lifetimes. The compiler may help you to get it formally correct, but what would be really cool would be if it would help you find the "inversions" or "isolations" that you will need in order to not end up with lifetime soup.

<comment><AUTHOR> Yum, salad. In my experience this happens when you overspecify a lifetime or something. After I got this code working, I messed with the lifetimes a bit -- I added one extra `'a` tying the lifetimes of something else to existing bound references. That propagated like wildfire and finally became unusable (proving that those two references could not/would not have the same lifetime).

In more complex situations, it's generally worth thinking which lifetime should be bound together for the first few functions and structs. After that point just trust the compiler.

It's not too hard to get a mental model of lifetimes, really, and once you have it you can look at lifetime parameters and figure out what they mean and how they work with each other. You're anyway implicitly thinking of them as scopes. I usually just ignore lifetime parameters -- they're something you learn to gloss over whilst reading Rust code, and I only really read them (and try to understand them) when I have lifetime errors. Sometimes the lifetime error is due to something unfixable, in which case the compiler will often lead me through a wild goose chase saladifying the entire codebase, or the lifetime error is fixable, in which case the compiler's suggestions _usually_ work. Sometimes they don't, but in those situations you can still fix it by trying to understand the why of it (like how I did in this post, though in the case of this post the entire "understand the why of it" was an afterthought) because things worked.

<comment><USER4> I bet there are a few common "patterns" to rust ownership, and equally many pitfalls and rookie mistakes when one fails to pick one of these patterns. It becomes extra hard if you approach Rust from a Java/Python/C# perspective where the slightest bit of allocation/RAII and mostly even thinking of the stack feels completely alien. You have to learn _that_ and Rust.

I'd love to see a kind of rust ownership tutorial in which you are asked to address a simple CS problem where these patterns occur in Rust. For example, many seem to find it hard to write a factory type. The next problem could be a doubly linked list and so on.

</comment></comment></comment><comment><USER5> The article says you _have_ to clone the vector, as if it's not completely normal to have one object hold a reference to another, " _unsafely_ ," in C++, without the world coming to an end. Having one object contain a reference or pointer to another in C++ is completely normal and something you certainly would "dream" of doing -- it happens all the time, you can find it everywhere in the STL, so I don't know what the blog author is getting at. Looking at the diff, the type SubstructureFields already has the lifetime parameter on it, and making FieldInfo, which is only used as a field in the SubstructureFields type (which owns its FieldInfo objects), be subject to the same lifetime constraint, is something that would be perfectly ordinary C++ and it registers near the bottom of the use-after-free risk scale.

<comment><USER6> > Looking at the diff, the type SubstructureFields already has the lifetime > parameter on it, and making FieldInfo, which is only used as a field in the > SubstructureFields type (which owns its FieldInfo objects), be subject to > the same lifetime constraint, is something that would be perfectly ordinary > C++ and it registers near the bottom of the use-after-free risk scale.

Which is why it works. But isn't it nice when the compiler is aware of the "use-after-free risk scale" for your data structures?

<comment><USER5> I prefer technical accuracy in technical blog posts. If you want somebody to preach at about the merits of compiler-checked safety, it's not me.

<comment><AUTHOR> It was accurate. See my comment below -- just because `SubstructureFields` had a lifetime parameter already doesn't mean it was borrowing data of a similar lifetime. That data being borrowed could probably live longer than the attributes, but fortunately the attributes live long enough that I can equate the lifetimes. I was able to use the same lifetime parameter by luck -- there was a good chance it wouldn't have compiled and I would have had to introduce another lifetime. (Though since this was a fix the compiler suggested I didn't need to worry too much about that happening -- generally those just work)

Just having a lifetime doesn't mean that it's safe to put any random borrowed data in. In C++ we could have a single pointer to a _very_ long-lived struct ("SubstructureFields"), and wish to introduce another struct ("FieldInfo") which contains a pointer to something that is shorter lived. Note that in large codebases knowing which is "longer lived" is not easy, so from the programmer's perspective there are just two pointers. Assuming that "Okay, we don't have any segfaults now due to the first pointer, introducing the second FieldInfo pointer should be fine then" would be fallacious -- we might be accessing data during a period of time when the first, original pointer is alive, but the second is invalidated. Use after free.

<comment><USER5> I'm trying to look more closely at the situation and will compose an answer, hopefully soon, but after going to Staples to get a $50 DVI cable so I can plug this workstation into a monitor (I just moved) and running make -j33 to build the rust compiler and play around with it, it's been thirty minutes and this is what I see: [https://i.imgur.com/2JL66Fg.png](https://i.imgur.com/2JL66Fg.png) so bear with me.

Update: You don't have to wade through a lot of code at all. All the code is taking AST parameters that are the source of these Attribute vectors by const reference and returning stuff like a P<Expr> and P<Item> and the like, AST stuff that by its nature doesn't have references with tricky lifetime dependencies to other far-flung AST stuff. So in C++ you can see right from the type signatures (and some _basic_ institutional knowledge) that you're OK.

You can see that the lifetimes are not long or dangerous. SubstructureFields is used in Substructure. A simple grep for that type shows a bunch of functions that take a Substructure by const reference and return a P<Expr>. There is nothing holding wiggly little references to Substructure objects or the like.

<comment><USER6> You can easily write a function in C++ that takes an object by const reference and creates a dangling reference without returning it. Such functions regularly result in use-after-free (sometimes causing security vulnerabilities) in the wild. Running grep on the signatures of functions is not a sound analysis.

<comment><USER5> You can pretty well see by grepping whether it's going to create a dangling reference or not. For example, in C++ codebases I'm most familiar with, anything that takes a const foo& isn't going to retain a reference, and for unfamiliar stuff that takes a const foo* or foo*, you can look at the outputs, which, if it's a P<Expr>, all you need is the institutional knowledge that Exprs don't have dangling references.

You don't need to debate with me the merits of replacing visual analysis with sound analysis. (If I have a negative opinion of Rust on the matter, it's that it's not good enough at that.) My beef here is with the way the blog article overstates the case, saying you just wouldn't do this sort of thing or this specific thing. You so would make temporary references deep into an AST while expanding derived implementations.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> This is really useful; I have been recently working on a huge c++ project and I had the exact same problem you mentioned with large vectors. The way I handled this problem was to wrap vector in a class which provides locking mechanism for expanding operations so while the vector is growing nobody can access it. I am excited to try Rust soon.

</comment><comment><USER8> For an outsider, Rust is still barely usable. I tried building a simple demo using the beta release today, and regretted right away. Lots of "unstable feature" errors that I can't figure out how to get rid of. Many useful features are unstable. I don't think I'm going to touch it again for a few months.

<comment><USER9> I tried using Rust the other day, and I had the same problem. What I found indicated that "unstable" features are permanently disabled in all but the nightly releases.

<comment><USER8> Ah, gotcha. Well, that was not clear to me.

</comment></comment></comment><comment><USER10> This is really exciting, and clearly more powerful than what you get in C/C++. That being said:

>In a language like C++ there's only once choice in this situation; that is to clone the vector.

What about a shared_ptr to the vector?

<comment><USER11> Or scoped_ptr to transfer ownership.

There's certainly _more_ than one choice, though.

<comment><USER12> Not really, and I say this as a fan of C++.

These things protect against one part of the problem - deletion of the vector, but not the other part - mutation of the vector, causing a new internal allocation, and leaving references to any elements of the previous vector invalid.

It's possible to make sure this isn't happening in C++ if a) your code base is small enough and b) you are careful, but the point of the article is that with Rust, you can make the changes and be confident that the compiler will fail if you do anything dangerous.

With C++, you can make the changes and through careful checking be reasonably confident everything works (perhaps only to find out later that you were wrong). It's very different from having the compiler _verify_ that you are not doing something unsafe.

</comment></comment></comment><comment><USER13> Maybe I'm missing something, but why is it crucial that you hold on to a reference to the _contents_ of the vector, and not the vector itself? Because, to me, the obvious "C++ way" to do it would be something like

        struct FieldInfo {
          //
          const std::vector<ast::Attribute>& attrs;
        }

<comment><USER6> Well, if the object that owns the vector is destroyed then that reference will go dangling. The compiler can't (soundly) check this.

</comment></comment><comment><USER14> Actually having a constant reference as a member works as expected in C++ because the compiler will force you to initialize it a construction.

It is true it will not check at compilation that you access a const reference of a destroyed object, but to be honest with RAII this is not really a problem as the lifetime of your objects should be pretty clear, by construction.

In debug mode your program will quickly assert if you access a destroyed STL container.

To be honest I think in this case:

\- either you want to snapshot the value and therefore you should clone the container (almost no performance cost for small containers)

\- you want to access the current value but then it means you know about the lifetime.

<comment><USER15> "the lifetime of your objects should be pretty clear, by construction"

Given the potentially-unbounded consequences of triggering UB in C++, "pretty clear" seems like not enough.

</comment></comment><comment><USER16> > And this is despite the fact that I still don't know where that particular > vector is modified or destroyed — I didn't explore that far because I didn't > need to! (or want to :P)

I find that a bit worrying - while it might well be an example of what's technically possible in some cases of using Rust to prevent segfault-type crashes, it doesn't mean there aren't now logic errors in the code which would do something just as bad. I guess it depends on how well you know the code and the context in which it's being used.

<comment><USER17> > it doesn't mean there aren't now logic errors in the code which would do > something just as bad

Yes, it does. He wants to have immutable access to some data, the Rust borrow checker's rules provide certainty that the data is not deleted or mutated while his code is accessing it.

What could happen that is "just as bad"? Data being referenced cannot be changed.

<comment><USER16> In this case it does.

I was more talking about the overall not caring theme. I'd hope that's only because they know the code so can make those sort of assumptions.

Are you saying Rust can find and prevent at compile time logic errors as well?

<comment><USER17> You "don't care," I'm sure, about all kinds of things when you're programming - depending on what level you're at. Unless you're drawing up CPU schematics, there is something that you have abstracted away as no longer your concern.

Rust allows you to not care about more things than C/C++ despite compiling to a comparable binary. In particular, Rust makes refactoring and extending a code base much more care-free than many other languages (including high level languages) because of the strong type and memory safety guarantees of its semantics.

EDIT (re: your edit) - No one said anything about preventing arbitrary logic errors, just that what Manishearth did will not introduce logic errors because of Rust's guarantees. This could not be the data that Manishearth wants, but the compiler guarantees that Manishearth cannot change the data or delete the data and that the data is not changed or deleted while he is referencing it. That is what is so great.

<comment><USER16> What edit? My second comment?

That was my original point regarding logic errors and not caring - yes, it may well be that Rust gives you much more confidence that you don't do invalid/wrong things. But that excludes logic errors (it may well reduce the possibility of logic errors, but it doesn't prevent them), and there's still room in large code bases for things to break even with very good static type checking.

</comment></comment></comment></comment></comment><comment><USER18> A C++ function returning pointer to vector, or a public field of that type, would be considered bad API for the reasons mentioned in this article. The solution is to not do that. I'm not sure that Rust's ability to allow shared ownership of a vector makes this API pattern any better.

<comment><USER19> But it's a bad pattern in other languages because they don't guarantee safe access. Rust does, thus making it a good pattern.

It's like saying that driving your car off a cliff is always a bad idea even when you've acquired a car that can fly.

<comment><USER18> It's a bad pattern in any language because it exposes too much details of storage layout and violates encapsulation. You probably don't want to expose internal implementation details in your API unless such exposure is critical to performance, and if it is critical to performance it seems unlikely that you'd be writing it in anything other than C++ anyway.

<comment><USER19> This seems orthogonal to internal implementation hiding, especially if the "API" is not a public library API, say, but an internal one.

Then again, contracts about who can modify what data are also part of any public API; historically, there have been plenty of (quite decent) APIs that have returned pointers to internal structures that have limited lifetimes, in languages like C that don't enforce lifetimes at all.

</comment></comment></comment></comment><comment><USER20> People don't choose a language. They choose a platform (or stack or environment). If you want to evaluate a language look at the language's platform. Currently Rust is not part of any platform but may become the language of the 'Mozilla platform' in the future.

<comment><USER21> There's no overhead in caling a C api nor in other code calling Rust code as if it were a C api. There's FFI setup and some caveats both ways but a lot of the larger Rust projects involve (e.g Servo, Piston) interfacing with pre- existing C libraries.

</comment></comment><comment><USER22> Garbage collected languages handle this fine too.

<comment><USER23> They handle it fine by tracking references at runtime. The advantage here is compile time verification that the reference will stay valid for the life of the struct - zero runtime overhead.</comment></comment>


Next Windows release will have app to see all the data sent to Microsoft - <AUTHOR> https://arstechnica.com/gadgets/2018/01/want-to-see-all-data-windows-10-sends-microsoft-theres-an-app-for-that/ <comment><USER2> Given that everybody collects data I believe this is at least a step in the right direction. It'll be interesting to see what data they are collecting though.</comment>


At Flickr, your photos are always yours (2011) - <AUTHOR> http://blog.flickr.net/en/2011/05/13/at-flickr-your-photos-are-always-yours/ <comment><USER2> Well, that's a false statement. If you don't follow the guidelines they have the right to delete your photos without any warning or explanation.</comment>


Ask HN: Where to find big project RFP's in Web/Mobile Development - <AUTHOR>

I've noticed in working as a subcontractor for larger contractors that they tend to have access to very interesting and high value RFP's from big companies/organizations. I've done all of the work associated with building the systems (so I likely have the credibility to score some contracts) but I am apparently clueless on where/how to get direct access so I can bid on my own.
I know that at this level, you aren't pitching websites or applications, rather solutions that solve business problems. I'm fine developing strategies and pitches for that as well.
Has anyone gone from being a small contractor to getting access to bigger projects via the RFP process?
Is it just really word of mouth and who you know?
Are there sites for this? Do you have a winning strategy to build a list of contacts who often have high value RFP's?
Any help/insight would be much appreciated! <comment><USER2> I work for a digital agency that's been growing rapidly, but still small enough I can see the biz dev process at work.

It's fairly old school, you get known to the vendor, build a relationship, and they include you on the list of people they consider next time they have a brief.

Public RFPs are hard to win and often have a predetermined outcome (eg. If corporate policy dictates open RFP but the individual has their list as above).

There's a lot of work involved in the relationship building, and often you'll take a small tester project that doesn't make much profit but is an investment for building the relationship so the future projects and retainers are sent your way. Larger agencies have entire staffs dedicated to pitching, full time.

An approach that I've seen work well is to take the smaller projects for more prestigious brands, invest time/money into them to build something great, then promote the hell out of the work (awards, case studies, etc). Hard to bootstrap but once you build momentum, the work comes to you. Most small agencies I've worked with rarely bid on public RFPs and do no outbound advertising.

Direct to brand biz dev is really hard work. The alternative is to continue to subcontract for the larger companies that do the direct biz dev, especially if you want to continue to be a hands on tech and not spend your life pitching and networking. There are many dev shops and production agencies that build substantial businesses this way.

</comment><comment><USER3> Also interested in this question. I've used rfpdb.com for a while with somewhat decent success

EDIT: Also, look for your local city's purchasing departments. Often times they release RFP's through their own website portal.

For example, San Francisco's purchasing department has a db here [http://mission.sfgov.org/OCABidPublication/](http://mission.sfgov.org/OCABidPublication/)

<comment><AUTHOR> Thanks for adding this link!

</comment></comment><comment><USER4> Have you checked out ariba.com ? You can register as a supplier and bid on RFIs/RFPs. See an example RFI

[https://service.ariba.com/Discovery.aw/741797/aw?awh=r&awssk...](https://service.ariba.com/Discovery.aw/741797/aw?awh=r&awssk=EXoiB3S5&dard=1&ancdc=1#b0)

<comment><AUTHOR> Awesome, thanks!</comment></comment>


German Court Slams Rapidshare With $34 Million Fine - <AUTHOR> http://www.techcrunch.com/2009/06/24/ouch-german-court-slams-rapidshare-with-34-million-fine/ <comment><USER2> I'm not so sure there was a fine involved.

From the comments:

 _Guys, get your story straight. There was no 24 million € fine. That figure is the value of the subject matter of this injunction verdict as determined by court._

</comment><comment><USER3> In related news, the same court has issued an order requiring all ISPs to prevent their customers from filesharing any copyrighted material belonging to the RIAA or MPAA; ISPs must spray their routers with the magic pixie dust that the court knows the ISPs possess but which they deny having.

<comment><USER4> Hmm, makes me think, shouldn't a person passing a judgment on such a technical thing have knowledge of the field, or consult some person who has knowledge of the field, and I am not talking just about this ruling, I am talking of any field where the judge may have no expertise at all !

<comment><USER5> They do consult people with "knowledge" in the field.

The problem is that the "experts" are experts in the sense that the kid up the street is to your mom when it comes to power-button usage on her new dell.

That is, not experts at all, but full of enough bullshiat and hand waving that the judge (who doesn't know much, if anything, about tech. or the subject at hand) believes what he or she says as gospel.

Double bonus multiplier if the "expert" is on the RIAA/MPAA/etc's payroll.

</comment></comment></comment><comment><USER6> gmail next?

<comment><USER3> Better still, ban the Internet completely. As Sony CEO Michael Lynton said, nothing good has ever come from it.</comment></comment>


4X - <AUTHOR> https://en.wikipedia.org/wiki/4X <comment><USER2> I start Civ VI games but never finish them. It always seems more fun to start over than continue a saved game. With the latest expansion, triggering a golden age is a good goal to shoot for, as well as a good stopping point to prevent "one more turn" syndrome.

<comment><USER3> That's due to the nature of economic engine games. When you're just starting out, it's an uphill battle where every decision matters a lot. When you get past a certain point, you enter what my friend and I like to call the "mop-up phase." This is the situation where your opponents are extremely far behind, with no hope of catching up, and your decisions matter very little. Not only do you have to make a lot of mistakes to even come close to falling behind but your good decisions are inconsequential as well.

Game designers have thought long and hard about this problem over the entire history of the genre. There have been numerous attempts at putting in mechanisms to slow down a player with a large empire but they often just make the game more tedious. I think this is the wrong approach. Once you reach an overwhelming advantage the game should allow you to close it out easily.

I think of chess at a high level. If no player ever resigned, instead forcing their opponents to perform extremely long, drawn-out checkmate sequences in theoretical win positions, people would hate it. Just resign so we can move on to the next game!

<comment><USER4> In my experience it's mostly just the novelty of figuring out new starting conditions, and crafting a small system that you can know intimately without too much mental burden. We like figuring out challenges, but starting from scratch tends to be a greener pasture than building up what you already have.

It's an issue I have with all of these infinitely replayable games, and a fundamental part of human psychology, I think. Most people tend to start lots of personal side projects, but not many can truly commit to finishing something worthwhile.

</comment></comment></comment><comment><USER5> I'd be interested in playing a 4X game where research more closely resembles how R&D works in the real world. Meaning that you don't always get what you want. Success is not guaranteed. And sometimes you figure out something else that works even better.

<comment><USER6> The only game I can think of that was similar to the model you suggest was the long ago "Spaceward Ho!" series, which was uncomplicated but fun. There was no tech tree; putting money into each of several categories of research yielded incremental improvements in that area over time but occasionally one would get a "breakthrough" that would boost that area dramatically or provide a new capability.

I thought it was an interesting idea but it seems fundamentally incompatible with having a tech tree at all.

<comment><USER7> That also made me think of Spaceward Ho! I know it may be too simple a game for a "serious" 4x game conversation, but I still in joy its style of gameplay. Sometimes a game like Civ can be too deep, or demand too much time for a satisfying play through, where Spaceward Ho! is fun, quick, but still hits some of those 4x notes.

Are there any modern 4x "lite" type games like this?

</comment></comment></comment><comment><USER8> These grand strategy games are always my theoretical favorite genre, but I just don't have the patience and/or time to commit to them (beyond the relatively simple Civ entries). I am equally envious and dismayed by friends who tell me how many hours they've logged not to just the game in total, but a single play in Europa Universalis and its ilk.

</comment><comment><USER9> I always preferred Colonization to the Civ series, and keep wondering why I am apparently in the minority.

Civ, and also SimCity, always felt as if they would progress along more or less the same trajectory of growth, with little actual choice for the player as long as they broadly stayed within the bounds of what the designers considered typical gameplay.

In Col, I loved building these intricate industrial networks and trade routes.

Now that I'm writing this, I'm wondering if Colonization possibly came too close to the Soviet idea of central economic planning for the taste of the audience.

<comment><USER10> Same. Though the AI since hexagonal tiles is so bad I've signed off Civilization series. Why they haven't contracted to that Google subsidiary to use machine learning to improve the AI of the game is a mystery.

<comment><USER11> If you play Civ V on Windows, you can get the Vox Populi mod for vastly improved AI.

</comment></comment></comment><comment><USER12> I want to see a AlphaGo/AlphaStar version playing Civ VI.

<comment><USER13> I doubt that will happen, considering that civ is much more complicated (in terms of mechanics) than playing go or even starcraft.

<comment><USER14> Civ isn't really that complicated compared to sc — "real-time" play is a big burden, and dramatically increases the search space.

I think the bigger blocker is that civ has no real tournaments to fuel AI popularity, that the game (and 4X in general) is likely buggier due to less online-play (meaning the AI is likelier to get trapped exploiting uninteresting bugs) and at least newer games are probably somewhat unoptimized and will have longer simulation times (thus slower training) (both valve and blizzard are quite good about making games playable on a toaster; Firaxis is.... not.)

</comment></comment></comment><comment><USER15> Can't wait to play AoW Planetfall!</comment>


Please add a link to comments in the RSS feed - <AUTHOR>

<comment><AUTHOR> Hi, I mainly read YC Startup News through a news aggregator. Could ya'll add a link to comments for each entry in the feed?

(This might be a good idea for Reddit's feeds too...)

<comment><USER2> We do (look at the source) but most feed readers seem to ignore it. If anyone can tell us how to format the feed so that stops happening, we're all ears.

<comment><USER3> Feedvalidator finds a couple of problems, but I'm not sure that they're related.

<http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fnews.ycombinator.com%2Frss>

Maybe try generating an Atom feed? Atom seems to be much better defined than any of the myriad competing RSS implementations.

Or maybe toss a hyperlink into the description tag rather than the comments tag ... from what I see in the RSS 2.0 spec, comments is a more of a "should" rather than a "must". The spec itself refers to it as an optional element, and Winer (I think) says in a note that implementers "should" support it. Clearly some of them don't. :-)

<comment><USER3> Someone mentioned below that it's working on Reddit. I just looked at their feed, and it looks like they are indeed putting the comments link inside "description" rather than "comments".

</comment></comment></comment></comment><comment><USER4> Paul, might you modify the submissions page to have some guidelines?

Point people to the Feature Requests thread as they clearly don't notice the link at the bottom of the page. Remind them that this is Startup News so it would be good if the posting was applicable. Tell them where to find Slashdot if that's what they want. And explain that they are not the only ones with RSS feeds so they don't need to just copy links from there to here.

Personally, I think news quality has degraded since karma came along. Some people are clearly keen to move up the leader board and starting a new thread is one way to do that. How about not rewarding karma for a thread's score? It can still be voted up by others to show it's interesting but karma must be earned by quality comments on the thread. Either that, or let us down vote threads to penalise non-applicable threads.

Better statistics may help show some light. <http://news.ycombinator.com/comments?id=18085>

</comment><comment><USER5> +1 reddit does it indeed ... very convenient ;)</comment>


Does Apple use Microsoft .NET on their website? - <AUTHOR> http://www.lisasandbox.com/node/66

<comment><USER2> I don't understand why people care about this sort of thing. Frameworks are just tools, and sometimes the most expedient tool for some particular job might not be the flagship toolchain for the technology company in question. The handling of promotions on the Apple site might be outsourced to another company which might just happen to use .NET, for example. If some small part of apple.com runs on .NET, that doesn't seem like an earth-shattering revelation to me (apple.com itself is running Apache 1.x + mod_perl on Darwin, it seems).

The odd machine at the microsoft.com domain is probably running Apache on Unix, and similarly for various servers at other technology companies. The web framework/OS is just a _tool_ \-- get over it.

<comment><USER3> I totally agree with what you're saying. However, this is sort of surprising because the ceo is so outspoken about how msft products are such crap and are 2nd rate rip-offs.

It's also funny because of the general Apple snobbery towards all things non- apple. Which also made me chuckle because I fall into that category with my MacBook pro, ipods, iphone, and graveyard of old Apple products. =]

</comment></comment><comment><USER3> That's definitely an asp.net error. What is even more mind blowing is the fact that Apple deployed this with debug output turned on.</comment>


Ancient Rome's Collapse Is Written into Arctic Ice - <AUTHOR> https://www.theatlantic.com/science/archive/2018/05/scientists-reclaim-the-long-lost-economic-history-of-rome/560339/?single_page=true <comment><USER2> Discussion on HN last week referencing a New York Times article on the same topic: [https://news.ycombinator.com/item?id=17072712](https://news.ycombinator.com/item?id=17072712)

</comment><comment><USER3> Cool analysis inspired by this article, comparing the ice lead data to pre- existing (and independently collected) data on building of temples: [http://peterturchin.com/cliodynamica/history-is-a- quantitati...](http://peterturchin.com/cliodynamica/history-is-a-quantitative- science-ii/)

<comment><USER4> From eyeballing the second graph we see, that lead production (taken as a proxy for economic activity) spikes shortly after a maximum in temple building, as any virtuous Roman would expect, temple building pleases the gods, who then grant the favor of more economic activity.

</comment></comment><comment><USER5> It's a seductive idea, that we can see into the past so accurately in such a way. The article suggests weaknesses though that seem to be being brushed under the carpet.

The biggest problem is with the economics and the history rather than the science of measuring lead in ice cores.

The article states:

 _Yet for all these coins, it remains unclear how Rome managed its money in a modern sense_

... and that seems to be a problem because the theory asks us to believe something implausible; that during times of war coin production went _down_. Everything we know about both modern and ancient governments tells us that rulers routinely inflate their currencies to pay soldiers. During a time of war, when desperation is at its peak and there is a need to win at any cost, furiously minting coins to fund the fight is extremely common.

Yet according to these graphs coin production goes up during times of peace and down during times of war. Really?

The story falls apart in other ways further down the article:

 _That said, the lead record does not seem to mark a few major events in Roman history. The Plague of Justinian, which may have killed half the population of Europe in 541 and 542 a.d., does not seem to feature prominently in the record_

OK, so their entire thesis is that the Roman economy can be measured using lead in ice cores, yet an event that _more than decimated_ the population appears to have had no impact on economic activity at all? Either the measurements are wrong, or the historical understanding of the plague is wrong, or the understanding of what lead in ice cores means historically is wrong. But it's hard to see the theory as presented as anything but implausible when such gaping holes exist in the data.

It gets worse:

 _Nor does the record encompass the full scope of the Roman coin-minting operation: Many important silver mines sat near Greece and the eastern Mediterranean, and their emissions probably did not make it to Greenland._

So lead in the air can make it from _Spain_ to Greenland, about 2700 miles, but not from Greece to Greenland, a distance of about 3100 miles? They're nearly the same distance apart. Does lead in the air have a magic cutoff beyond which it cannot travel on the wind and if so, why does the article not talk about this?

Finally, the article does note that this new study contradicts an earlier study that concluded the opposite.

This is explained by saying the new study has more data. But this still seems odd to me - it's saying the old study had such bad luck that the ice cores they studied were totally misleading to the extent that they presented the opposite of the truth. How did that happen? Is it really plausible and if so what other studies should be invalidated as a result of not taking enough core samples?

I find myself wondering how much of this article boils down to curve fitting and munging the data to fit what we are sure we "know" about Rome, to create a nice story that doesn't rock any boats.

<comment><USER6> > So lead in the air can make it from Spain to Greenland, about 2700 miles, > but not from Greece to Greenland, a distance of about 3100 miles?

I have no domain knowledge about this, but I assumed the difference was in atmospheric circulation. Happy to be corrected by anyone who knows about this stuff, but I'd have thought there was a relatively clear pathway across open ocean from the Iberian peninsula to Greenland. I'd expect the route from Greece to Iceland to be significantly more chaotic as far as wind is concerned; more land, mountain ranges, and opportunities for rainfall and mixing of currents.

<comment><USER7> Just to add something, we can make some guesses about the circulation of the ocean and wind currents during Roman times because we know that the Roman Warm Period approximated the climate we enjoy today, for several reasons. For example the locations where date palms are grown and dates harvested. We have at least one account which mentions that date palms can be planted in e.g. Greece but that dates will not fruit there (which is the case today), but that dates can be grown and harvested in Judea, which was not the case between the time of the Roman Empire and today because of the colder climate. Medieval scholars weren't sure what to think of that.

</comment></comment></comment><comment><USER8> Documented the economic activity? No, they documented deposits of particles that are claimed to be from the Roman Republic smelters and also which are only the particles that existing weather patterns happened to have lead to being deposited. Talk about derivative. Not even to mention that there is little that would imply that smelting for coin production would implicitly relate to economic activity. Run away inflation or corrupt rulers do not necessarily correlate to economic activity but could very well result in increased smelting just as well as technological advances that require more smelting or buildup of the military could.

</comment><comment><USER9> A good place to start an article about the fifth century CE is definitely the first century BCE. I was just writing an article about Trump which starts with 1527.

<comment><USER10> > A team of archaeologists, historians, and climate scientists have > constructed a history of Rome's lead pollution, which allows them to > approximate Mediterranean economic activity from 1,100 b.c. to 800 a.d.

I think that better explains the broad span of time. Then again, if you were writing for an audience 1300 years in the future with little to no genuine knowledge of our time period (other than popular myth and oral tradition) that probably wouldn't be a bad year to start with, since that's not terribly long after major explorations to the West from Europe (Columbus "discovered" the Bahamas around 1492).

Edit: formatting of the quote

<comment><USER9> Okay, let me rephrase that: A lot of the territory Rome ruled was conquered in Caesar's lifetime (Gaul, most of their core Asian possessions). Most of Rome's noteworthy cultural achievements happened after Caesar was dead. Caesar laid the groundwork for Augustus's form of government, which would survive in some form for nearly 1500 years. So starting an article about Rome's decline with Caesar is like writing an article about the decline of computer science and starting it with Turing.

</comment></comment></comment><comment><USER11> This article is interesting. This writer may stay

</comment><comment><USER12> It's important to contrast this graph --- clear as day and the next best thing to a Roman S&P 500 --- to the nonsense revisionism peddled by a certain camp that's come to dominate academia since the 1970s or so.

This camp, as part of a present-day political project, portrays the past as some kind of peaceful, egalitarian utopia ruined by "capitalism" and "colonization". In this camp's ridiculous woldview, all societies are equally complex, all languages are equally expressive, and cultural and linguistic changes always reflect some kind of peaceful transition instead of a violent upheaval.

Rome never fell, these people say: instead, it just chose to adopt the sustainable economic practices of the peaceful immigrants from the steppe. My eyes cannot roll any harder when I read shit like that.

Fortunately, these people are well on the way to being thoroughly discredited. Populations do change. Catastrophes do happen. War was rampant. Ancient DNA confirms it.

Civilization and order are fragile and worth preserving, and an honest examination of the past and strike the fear of decay into us. It took the world until the 19th century (!) to recover from Rome's collapse in all respects; for us, there will be no recovery at all.

<comment><USER13> Okay - I think you are just making that up. Are there serious people in historical academia working on some sort of "political project" like that, are are you nutpicking some marginal/fringe off the internet? Can you offer some sort of links describing the name of this academic school, who belonged to it, evidence of their influence, etc? I have a personal interest in history sufficiently deep to doubt you.</comment></comment>


Closed Gardens: Don't repeat my mistakes - <AUTHOR> http://richard.dallaway.com/blog/2012-07-23-closed-garden-mistake <comment><USER2> A couple of great little web sites there. It id interesting how Dropbox etc are enabling a more decentralised internet.</comment>


Microsoft Teams is now officially bigger than Slack - <AUTHOR> https://arstechnica.com/gadgets/2019/07/microsoft-teams-is-now-officially-bigger-than-slack/ <comment><USER2> The Microsoft Teams client on the Mac is the worst program I have to deal with on a routine basis. While Teams + 365 + SharePoint, overall is a good set of functionality brought together as a product... I frequently find those pieces of functionality that belong to Teams, have been assembled in a way that I find totally incomprehensible.

Like how the Mac desktop client implemented their own pop up notifications windows. They don't correctly pop to the foreground, they don't work when your in a full screen app, and to add insult to injury, the presence of the "window" that shows notifications frequently breaks the ability to command-tab over into the Teams application because it will have taken focus to ostensibly show a popup, but not returned it so when I'm eventually asked to check something in Teams I have to head to the dock to manually pick the real Teams client window.

<comment><USER3> The only thing worse is Skype for Business on the Mac. It's the worst business software that I need to use.

<comment><USER4> And the only thing worse than _that_ is throwing interop/coexistence mode[1][2] into the mix. It's basically a force multiplier on the hell of using Skype for Business with a Mac.

It takes the already gimped Skype for Business on the Mac, and adds a multiplier effect.

[1] Interop mode is designed for a progressive rollout/migration from Skype for Business to Teams. On an all-Windows deployment it generally works well enough to get by with a few annoying UX-related hassles getting passed between the two apps. But throw Mac machines into the mix, with already gimped client functionality, and interop mode just sort of breaks you to the point of having an aversion to any work that involves calls/meetings/chats with coworkers.

[2] [https://docs.microsoft.com/en- us/MicrosoftTeams/coexistence-...](https://docs.microsoft.com/en- us/MicrosoftTeams/coexistence-chat-calls-presence)

</comment></comment></comment><comment><USER5> > It plans to roll out channel moderation and priority notifications, which > will ping a recipient every two minutes until a response is made.

Oh my god

<comment><USER6> I'm usually pretty staunchly against the seemingly vocal majority of HN on topics like this (in this case, shitting on Teams a ton. And shitting on Slack a good amt too). But that priority notification is ridiculous and hilarious.

</comment></comment><comment><USER7> Which means the number of people who will complain loudly and pull shadow-IT setups of Slack will skyrocket. Last year my employer MANDATED we switch from free Slack to a full-featured trial of Teams... and within 72 hours that mandate was dropped because __executives__ were not getting messages that they knew had been sent. Slack, on the other hand, Just Works.

<comment><USER8> I think we need to differentiate between just works and barely works. With Slack I think someone decided to go full dot-com and throw away everything known about human communication so they could learn it again by trial and error. You can't mute bots, you can't mute plugins, can't add someone to a private conversation, anyone can auto-join you to any channel, api is full of typemorphic elements that encode their type within themselves, don't get me started about Slack threads.

<comment><USER9> When using Slack I was always impressed by how clunky and buggy the post editor was. Had to reload it a time or two almost every time I used it, and their method for making sure your changes weren't lost was to tell you to copy and paste it.

</comment></comment></comment><comment><USER10> In other news, Microsoft makes the Teams app a mandatory extra install as part of their most recent software update ballooning their userbase to a couple of billion users.

</comment><comment><USER11> I would love to know what they classify as a daily active user. My expectation would be someone who sends or receives a message, but I would never have expected the numbers to be so high. Maybe they're counting everyone who signs into their O365 account who has a Teams subscription.

<comment><USER12> More likely anyone who have an active O365 subscription that includes teams even if they only have that subscription because thats the only way MS is selling access to the traditional desktop office application that they need for some decade old workflow.

While the press have been blinded by MS's nonsense "we L..... Linux" campaign nobody seams to have noticed that their office department is playing the same dirty games MS got fined over a decade ago in forcing every office user to obtain a O365 subscription and putting a tremendeous amount a presure on their SME customers to obtain the full O365 stack which include teams(which MS insists is replacing skype for business).

Remember also that MS marketing is almost 110% tailored to the now aging set of SME admins that entered the market doing the transition from big iron to winNT networks in the 90ies and who depend on MS Certified courses and books for all of their formal IT training and that SME market where those Teams deployments comes from, if you have an Teams subscription and a "i only know the MS stack" mindset you are not going to deploy stack no matter how much more your users prefer it to Teams.

And the "We love linux on Azure" marketing is exactly that narrow, the same day it was announced MS killed of any feature they ever had that made it easier to integrate Linux* into wintel networks, making it clear to all but the clueless that it's only about headless linux guest running comodity web frameworks running inside azure or hyperV then any change in MS attitude towards competitors and that was forced on them by the fact that the webdev market was/is dominated by OSX clients and linux servers.

*SFU and RFC2307 support was dropped along with the teams/skype clients for linux the same week they started raving about linux CLI's being usable from windows clients.

</comment></comment><comment><USER13> Is this about as interesting as the fact that calc.exe is bigger than slack in terms of installs?

<comment><USER14> The second sentence of the article says that this is comparing active users, not installs.</comment></comment>


Black Mirror: Fifteen Million Merits (2012) - <AUTHOR> https://www.youtube.com/watch?v=7tMXKQdc5ZM

<comment><USER2> Sometimes, science fiction is not about trying to predict the future as much as trying to avoid it.

</comment><comment><USER3> Such a good show. I wish there were more episodes.

<comment><AUTHOR> I just found this episode, and while I have only watched half of it, I'm completely hooked!

Is the entire serie like this one?

<comment><USER4> There are two series and the episodes all have different stories and concepts, but they are all similarly bleak and dystopian alternate reality pieces.

The episode you're watching now is probably my favourite but the others are fantastic too, especially the one with the memory implants.

As Charlie Brooker (creator) put it himself, these are potential futures if society were to take a couple of steps in the wrong direction.</comment></comment></comment>


Airbnb's Resurgence - <AUTHOR> https://www.axios.com/airbnb-hotels-pandemic-d036411e-bd39-49ce-911f-484212110d4e.html <comment><USER2> This reads like a PR piece with some weird metrics: "AirBnB spending" and "based on a panel of spending data including more than 65,000 Airbnb transactions". What is that? The Y-axis is an index, not a metric with units. And why compare to one hotel chain? The linked analysis is not better, although it compares to 3 hotel chains. I am not sure that AirBnB's main competition is business hotels like Merriot, Hilton and Intercontinental, though.

Just tell us the revenues. Are they up or down? Bookings?

<comment><USER3> They're not saying Airbnb is _bigger_ than Marriott, they're just comparing the performance of both against last year.

Also, Marriott is the world's largest hotel group by a wide margin. After the Starwood merger, there are thirty (!) different brands in their portfolio and their offerings run the gamut from 5 star luxury (Ritz-Carlton, St Regis, Bulgari etc) to 2-star-ish (Fairfield Inn, Towneplace).

[https://skift.com/2016/09/21/every-one-of- marriotts-30-hotel...](https://skift.com/2016/09/21/every-one-of- marriotts-30-hotel-brands-explained/)

</comment></comment><comment><USER4> This article is rather premature. With the 2nd wave beginning to hit across the world, and some places where the first wave has not yet begun to crest, we can expect that the trends noted by this article are noise rather than signal.

<comment><USER5> I spent all summer traveling across Europe and staying at AirBnBs or with hosts on other hospitality-exchange platforms. I met a lot of other travelers on the road and some touristic spots were packed. There appeared to already be widespread corona fatigue; people just stopped caring about the virus and were willing to travel nevertheless. Yes, some countries imposed border restrictions and quarantine requirements, but those really only affect people flying directly from country X to country Y, while for overlanders it was trivial to evade those restrictions.

Ordinarily I wouldn't have used AirBnb so much, but if ordinary establishments in various towns had already chosen to close for the long term due to corona, AirBnb suddenly seemed like an attractive prospect. So, I can see the company doing well even with a second wave, unless (something which I feel is unlikely in many places) governments re-institute a hard lockdown even in the face of public corona fatigue and resistance.

<comment><USER6> Well, I agree on seeing some signs of Corona fatigue myself: I spent a long weekend in Prague and basically nobody were taking precautions (in a couple of museums I asked if I had to keep my mask on and the answer was "well, if you want, no problem for us, but it is not mandatory").

Guess what? Two weeks later Prague area has been declared a Red Zone (at least for Germany) so if you want to travel there you must quarantine when you are back.

<comment><USER5> Again, quarantine restrictions are trivial to evade for people traveling overland. I would be surprised if even 10% of such leisure travelers were properly observing quarantine when they returned home or when they moved on from a "red zone" area to another place on their travel itinerary.</comment></comment></comment></comment>


Steve Jobs Wanted Market Cap In The iOS Stocks App - <AUTHOR> http://www.forbes.com/sites/bruceupbin/2011/11/04/steve-jobs-was-obsessed-with-his-market-cap/

<comment><USER2> I actually like that function a lot! It's nice to have a sense of the different business caps.</comment>


The NASA women who inspired 'Hidden Figures' will get Congressional gold medals - ga-vu https://edition.cnn.com/2019/11/09/us/hidden-figures-congressional-medals-trnd/index.html <comment><AUTHOR> I saw the "Hidden Figures" film recently, and liked it. It seems like one of those things that are good for a lot of people to see, especially in tech.

The still image that the CNN piece picked wasn't very representative of the film, IMHO. The scene had a place in the context of the rest of the film, and perhaps conveys some of the spirit that helped them through, but picking that single still alone seemed to me (I could be mistaken) more likely a decision of an advertiser than the director.

One thing the film didn't and couldn't do, though I wish it could've: in some scenes, when one of the main characters is treated badly, I wish I could've been there in the real world analogue of it, and seen how all the others present reacted. The people who made the film convey a perspective on this, using the tools of film, and it's believable and helpful. But no one actually knows all of what everyone in the room was thinking and hinted at. What people were actually thinking, and how they acted, as wrongs were happening, also seems something important to learn from.

<comment><USER2> I thought the film was good, but it simplified the story considerably. In particular, the dramatic bits about racism were a lot more nuanced in the book.

I recommend reading the book for the more accurate and complex reality these women faced regarding race and sexism.

</comment></comment><comment><USER3> For folks who appreciated either reading or viewing Hidden Figures and are interested in women in science history, you should keep an eye open for the play: _The Women who Mapped the Stars_. It's about the investigation of the cepheid variables which basically led to creating a yardstick for stellar distances.

(There's also a couple plays about one of the women in particular, Henrietta Swan Leavitt, although those are probably harder to come by.)

Added: Another very good play in this vein is Photograph 51 (centered on Rosalind Franklin).

</comment><comment><USER2> Software Engineer Margaret Hamilton received the Congressional Medal of Freedom in 2016.

Hooray for women in STEM.

<comment><USER4> She also has her own Lego figurine.

[https://www.lego.com/en-us/product/women-of- nasa-21312](https://www.lego.com/en-us/product/women-of-nasa-21312)

</comment></comment><comment><USER5> Please read the book, I found it to be a deep lesson of the history of black female scientists.

</comment><comment><USER6> It really makes you wonder who else may be out there who deserves a medal for their work, but was never properly recognized because of gender, race, or other sociological reasons…

<comment><USER7> A common critique of Thomas Edison is that a large part of invention that gets attributed to him was the work of his employees who only got workmen's wages in return. The idea of an industrial research laboratory where employees get paid but in all other aspects get unrecognized is often attribute to have started with him.

<comment><USER8> My understanding of modern research labs is that the actual inventors put their name on the patent, but the owner of the patent may be the company.

Is that not the case? Or is the inventor usually just the project leaders?

It seems very wrong that Edison would have put himself on the patent as the inventor AND the owner of the patent.

<comment><USER9> I'm not a lawyer, but my understanding is that the people named on the patent have to be the actual inventors. A lawyer explained to me that you have to be the inventor behind at least one of the claims. Of course that practice can be abused.

A way to protect your inventorship is to write down what you think you invented, and submit it in writing to your employer. I work for a F500, and we have an official process for this, with a reward. It benefits the company to get patent-able ideas documented.

</comment></comment></comment></comment><comment><USER10> There are people that deeply resent the presence of black people in this country, aimlessly wondering about STEM and inventive contributions to American/Western society by people with African heritage and concluding there aren't any, not realizing that there was a pattern of suppressing those contributions by people just like them, amplified over the last century.

<comment><USER11> It's unfortunate because it appears that America is also losing its tolerance for speech about racial injustice, responding with fatigue and incredulity. The narrative of a racially equal country has lost its motivational energy, and meanwhile I feel that the story of black 2030 in America is looking very dim.

America needs a persuasive national story about how race is going to work from 2020 to 2030.

<comment><USER12> The reason why I get fatigued when people bring up race and try to make sweeping national changes is that I see it as counterproductive.

Until we stop dividing people into classes based on race these problems are going to persist. Efforts that set out to bring about "racial justice" actually compound the problem by reinforcing the idea that these artificial divisions have any _meaning_ at all. The goal should not be a racially equal country, the goal should be a country where people don't _think_ about race any more.

By all means, let's work to lift the poor out of poverty and bring justice to the prison system. But let's do it because they are poor and because it is right, not because of the color of their skin.

<comment><USER13> It's such a privileged thing to say "Let's sweep over the horrendously long history in this country of racial oppression and discrimination, such things are not relevant to today's concerns. Everybody has equality of opportunity now, so therefore racial inequities no longer exist and we should ignore race entirely. This is post-racial America."</comment></comment></comment></comment>


Food as medicine - <AUTHOR> https://theconversation.com/food-as-medicine-your-brain-really-does-want-you-to-eat-more-veggies-74685 <comment><USER2> > your brain really does want you to eat more veggies

Meat/fish is also important for the brain as it is a good source of vitamin B12. Even a slight deficiency of this vitamin can cause mental problems. This is something to be aware of when following a vegetarian diet.

<comment><USER3> What are non meat dietary sources of B12? Or does it mean you'd need to consider supplements?

<comment><USER4> An interesting anecdote about B12 is that it's actually coming from bacteria, usually found in the ground.

Animals are rich in B12 because they eat grass. Technically if you don't wash your vegetables you would get more B12, but you would also increase your chances of catching a bad bug.

B12 isn't synthesised by any animals or plant, we just get it by proxy. (and by the way, industrially raised cattle who don't see the light of day are supplemented in B12 just so you don't have to)

So to come back to your original question, I have my B12 mainly from:

\- Marmite (if you fancy that, but I would understand if you disliked it very much)

\- Some supplements flakes to put on my salads (byproduct of beer I believe, something like Engevita). It doesn't look like it but I actually enjoy it on my greens (lettuce, cucumber, or any salad)

\- The very occasional meat/fish. I'm neither vegan nor vegetarian, but I changed my diet to consider these as a treat.

<comment><USER5> You are correct: Animals and plants don't synthesize B12, bacteria do. However, these bacteria are also found in the small intestine of humans. So you might want to add them to your list of contributors.

Check out this study [1]. This fact is usually not mentioned in the livestock industry fear-mongering propaganda ("You will eventually die without meat").

[1] [http://www.nature.com/nature/journal/v283/n5749/abs/283781a0...](http://www.nature.com/nature/journal/v283/n5749/abs/283781a0.html)

</comment></comment></comment></comment><comment><USER6> The following story is for anyone who thinks you can't get strong or be a body builder on a plant-based only diet:

Jim Morris - 78 year old vegan body builder

[https://www.youtube.com/watch?v=tUtv4slpm-U](https://www.youtube.com/watch?v=tUtv4slpm-U)

<comment><USER7> I know at least one professional athlete that had to change from vegan to eating meat, due to not being able to compete physically with his peers.

</comment></comment><comment><USER8> This thread is just endless collection of n=1 observations. This is how it goes =

\- I eat meat and I am healthy

\- No, I am vegetarian and I can run faster than you

\- No, I eat meat but I also eat peas and I can read better than you.

You know what? Maybe all of you are right and maybe all of us don't need exactly the same food that is good your somebody else.

Geez!! :-)

</comment><comment><USER9> Not only is a plant based diet healthy, and every study that tells otherwise is obviously paid by the livestock industry; it's also the only environmentally sustainable diet. I really don't get how so many highly intelligent people acknowledge those facts and still put their tastebuds over everything else. It's not like vegan food can't be absolutely delicious either.

<comment><USER10> Yeah, so I have always eaten both meats and veggies. My blood results still showed a vitamin B12 deficiency. I was already noticing symptoms like anemia, mental fog, lack of energy, etc. I upped my meat intake to mainly grass-fed, fatty beef, and my latest tests show a normal level. You cannot get B12 from plants, period.

Meat is necessary for human life. Saying otherwise is dangerous. After seeing my experience, my wife (vegetarian for almost a decade) has started eating meat again. This isn't something worth dying over.

<comment><USER11> It's not true that "you cannot get B12 from plants, period" [1]. You can get trace amounts from various edible land plants, but dietarily significant quantities from some algae. Also fermentation of some plants can provide B12-rich foods.

It's fair to say that vegans need to take particular care that they get sufficient B12.

1: [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4042564/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4042564/)

</comment></comment></comment><comment><USER12> I stopped reading when the author admitted that every point he had made in the first two paragraphs about diet causing depression were based on observational studies for which it is not strictly possible to draw such conclusions.

<comment><USER13> I too almost quit and posted a comment complaining after the first few paragraphs, but fortunately I read a bit further first.

They go into "Teasing out the cause from the correlation" which actually talks about the design of a study to do so. Seems like a fairly good approach, wish they would have made it clear that this was the direction from earlier, but eh, probably my fault for being lazy and having no attention span anymore.</comment></comment>