Show HN: GQL – GraphQL CLI autocompleting GraphQL queries in command line - <AUTHOR> https://github.com/slothking-online/gql <comment><USER2> This is cool!

I like the idea of building a query through command-line "flags".

We built graphqurl[1] which does tab-based autocomplete to hep the user type a complete GraphQL query (using introspection); which can get a little unwieldy to type. Although, it's easier for debugging a "raw" query I love the approach GQL has taken

Excited to try it out. :)

[1] [https://github.com/hasura/graphqurl](https://github.com/hasura/graphqurl)</comment>


So You Want to Learn Physics (2016) - happy-go-lucky https://www.susanjfowler.com/blog/2016/8/13/so-you-want-to-learn-physics <comment><AUTHOR> Well I disagree with many of the book choices, but if there's one thing that's absolutely spot-on is this:

>One big problem is that a lot of the popular books written about physics (especially those by famous physicists) are incredibly speculative and tend to present an unrealistic view of what the study of physics is all about. When you're learning physics, it's good to avoid these types of speculative books, and stick to the good ones that talk about the real physics we know exists.

Oh god yes. Why is it that whenever a lay person wants to talk about physics they talk about "11 dimensions", "string theory", or "time dilation", or any similarly crazy-sounding term that they read in a massively incorrect pop-sci article. Basically it makes it sound like physics is about all this crazy complicated and far-fetched ideas, rather than simple and beautiful principles to understand reality, which is what it is.

I don't know if I managed to convey what I mean.

<comment><USER2> > all this crazy complicated and far-fetched ideas, rather than simple and > beautiful principles to understand reality

Would you mind giving some examples of what kind of "simple and beautiful principles" you have in mind?

<comment><USER3> Depends on the level (and I am just giving some examples):

\- Advanced high school: You can use conservation of energy or other "conservation laws" as a guiding principle. This lets you solve a problem with just a couple of lines of simple algebra. On the other hand, using the "naive" approach of studying the forces that act on the system would require heavy algebra and some calculus.

\- College: Instead of calculating the path of a ray of light through some inhomogeneous piece of transparent matter by doing some form of raytracing, you can use Fermat's "minimization principle". They are equivalent, but a rigorous definition of the minimization principle is a single sentence, while the other approach takes a lot of work to express clearly.

\- Advanced college: Conservation laws are actually consequences of symmetries. Instead of thinking in terms of a complicated expression for energies and momenta, you can say that they are consequences of the fact that the laws of the universe do not change from today to tomorrow.

Yes, the more simple and beautiful a principle is, the more abstract it is. However, the simplicity and ease of working with it makes the abstraction worth it.

Just like in C you can have your own weird struct that implements objects and higher order functions, but using a functional or object oriented language makes everything safer and easier and more readable.

<comment><USER4> > Conservation laws are actually consequences of symmetries.

For those unfamiliar, this is essentially the content of Noether's Theorem[0]. One of many beautiful contributions of Emmy Noether.

I've heard several physicists describe it as one of the most beautiful theorems in physics.

[0] [https://en.wikipedia.org/wiki/Noether%27s_theorem](https://en.wikipedia.org/wiki/Noether%27s_theorem)

</comment></comment></comment></comment><comment><USER5> I went to university intending to study computing science, but switched to physics half way through under the assumption that you could teach yourself computing science more easily than physics. I wouldn't change what I learned for the world, and I'm now in physics academia, but it's funny how my job these days involves using some of the algorithms, mathematics and data structures that I was just about to start learning if I had stayed the course in computing.

My few years of study and general interest in computing has already given me a huge advantage in solving certain types of problem. I think computing science (not just software engineering) is slowly but surely becoming an essential part of many areas of modern physics research.

<comment><USER6> > I think computing science (not just software engineering) is slowly but > surely becoming an essential part of many areas of modern physics research.

I like to say that physics, mathematics, and computer science are the three pillars of human knowledge. There's some overlap between each pillar, and we don't yet fully understand how each of them fully relate to the others, but each is essential to gathering a full picture of any phenomenon.

<comment><USER7> Wrong. Philosophy and Mathematics are the real pillars of knowledge. Everything else can be derived from this including physics.

<comment><USER6> Philosophy doesn't really produce knowledge, it explores and frames questions. When we accept that the questions define a coherent domain of discourse, we create a field of study that does produce knowledge. This is how natural philosophy became science, and if ethics ever gets to this point, we'll get a moral science which will produce moral knowledge. Ethics doesn't currently produce moral knowledge.

</comment></comment></comment></comment><comment><USER8> >Regardless of your learning style, you'll still need to solve the physics problems in each textbook. Solving problems is the only way to really understand how the laws of physics work. There's no way around it. Even though it can feel tedious at times, there's nothing more rewarding than figuring out a really difficult physics problem and realizing that you figured it all out yourself!

This is the only way. It's I how I moved from an EE undergrad to a theoretical physics PhD. As I come back to material it's a lesson I need to painfully relearn. (Something I re-re-re-learned in 2015 [http://nbodyphysics.com/blog/2015/02/28/learn-physics- with-t...](http://nbodyphysics.com/blog/2015/02/28/learn-physics-with-this- one-trick/))

<comment><USER9> Calculus, too. I wonder about the author's implication that she actually worked every problem in all of those textbooks. I suppose it's possible, but it would take a decade, at least, if you were working full time (and forget having any kind of a social life or, god forbid, a couple of kids).

</comment></comment><comment><USER10> > One big problem is that a lot of the popular books written about physics > (especially those by famous physicists) are incredibly speculative and tend > to present an unrealistic view of what the study of physics is all about.

This is irritatingly common in economics also though with economics it's less often speculation and more often simplification to the point that it becomes misleading.

e.g. "black holes suck in matter around them". Many pop science physics books will make black holes sound unique in the way they are able to attract matter which misleads readers as it is just gravity being applied to a massive object.

</comment><comment><USER11> I'll just drop a link to Susskind's "Theoretical Minimum" course:

[https://theoreticalminimum.com/courses](https://theoreticalminimum.com/courses)

<comment><USER12> Gerard 't Hooft goes here too I think: [http://www.goodtheorist.science/](http://www.goodtheorist.science/)

Though I think Susskind's lectures and books are truly the best starting point for say, an engineer who wants to go back and do physics from the ground up.

</comment></comment><comment><USER13> The author recommends some interesting popular books:

1\. The Feynman Lectures on Physics

2\. The Character of Physical Law by Richard Feynman

3\. Deep Down Things: The Breathtaking Beauty of Particle Physics by Bruce Schumm

4\. The Particle Odyssey by Frank Close

5\. Weinberg's The First Three Minutes

IMO someone who seriously wants to learn physics should read these books _after_ they have gone through the typical undergraduate university books (classical, E&M, quantum, stat-mech, etc.) I would not recommend reading popular books until after you already understand the basic ideas of physics. Popular science books are like dessert.

<comment><USER14> The Feynman lectures were specially designed for creme de la creme undergrads who _already_ did a course in physics in high school. They are a terrible way for a noob to try to learn.

Also strange that the author warns against exotic topics and then 3/5 of these recommendations are exotic things 99.9% of readers will never encounter.

<comment><USER15> I also recall hearing that as an undegrad curriculum, the lectures never worked well (even when feynman himself was teaching them). His way of understanding physics is beautiful but not intuitive for most people. I read them after getting a degree in physics and it was fascinating to see his approach precisely because it was so different (and elegant) than the way it is typically taught, but I could not have understood them nearly as well if I had not already learned the concepts in a more traditional way.

All that is to say- The Feynman lectures are wonderful, but I would not recommend them as a first text.

<comment><USER16> I disagree. As someone who doesn't know much about Physics, certain things I read in the Feynman lectures today still stick with me. Like if you drop a heavy object onto the floor, its temperature rises by a minuscule amount lol.

<comment><USER13> > Like if you drop a heavy object onto the floor, its temperature rises by a > minuscule amount lol.

Tidbits like this are not a substitute for a working knowledge of physics. The Feynman Lectures are not a substitute for undergraduate courses. You'll get more out of the Feynman Lectures after completing the main undergraduate courses.

<comment><USER16> I'm not sure what you define as a 'working' knowledge of Physics, but to get to a research level of physics requires more than a few introductory physics course also. I'm not saying the Feynman lectures is a substitute for learning any specific part of Physics, but it is useful for understanding basic concepts and also understanding how those concepts can fit in to our everyday lives.

What I disagreed about in the post I replied to was the position that it wasn't "intuitive" or a good first text for beginners.

</comment></comment></comment></comment></comment></comment><comment><USER17> Susan Fowler's life story totally impresses me.

She is world-renowned for MeToo/Time Person of the Year, but her achievements in physics through sheer will and hard work, even though her upbringings did not give her much in that direction, makes me think there is a movie in it.

<comment><USER18> what are her achievements in physics?

</comment></comment><comment> d--b Bottom line is: work your ass off for at least 5 years, and maybe you'll have a chance to get it.

At least, that's honest advice!

<comment><USER19> If you work hard for 5 years you will get it, it's not a chance

<comment> d--b Mmh maybe you can learn enough to understand what people are talking about generally, but there is no guarantee that you will be any good at it

</comment></comment></comment><comment><USER20> For more advanced topics, this is an amazing book that covers many graduate topics in a unified and consistent notation: [https://www.amazon.ca/dp/0691159025](https://www.amazon.ca/dp/0691159025)

Draft of the book is available here for free: [http://www.pmaweb.caltech.edu/Courses/ph136/yr2012/](http://www.pmaweb.caltech.edu/Courses/ph136/yr2012/)

Warning: this is very advanced material... I'm still on Chapter 1.

</comment><comment><USER21> Also Landau and Lifshitz, Course of Theoretical Physics.[1]

Released to public domain on archive.org: [https://www.reddit.com/r/Physics/comments/1dmxq7/our_beloved...](https://www.reddit.com/r/Physics/comments/1dmxq7/our_beloved_landaulifshitz_books_are_available/c9s774y/)

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

</comment><comment><USER22> I'd like to say that Mach's Science of Mechanics is a timeless book and I would recommend to anyone who hopes to like physics. It's so different than modern textbooks. You get the feeling of learning new things as he explains each phenomenon with simple mathamatics and often ingenious ways.

[https://www.cambridge.org/core/books/science-of- mechanics/D8...](https://www.cambridge.org/core/books/science-of- mechanics/D8A72D6443150FDB4820DCA339836EB2)

</comment><comment><USER23> Recommending Griffith to study quantum mechanics is just plain wrong. It's inconsistent, have many gaps in the material. There's a book superior in many regards to Griffith \- the "Quantum Mechanics: Concepts and Applications" by Zettili.

<comment><USER24> There's an astonishingly large number of books on basic QM (only, perhaps, comparable to the number of books about differential forms :). It is probably because each author feels that something is missing or unclear or outdated in all other books. And this is despite the fact that QM in its fundamental shape has been complete since mid-1920s.

</comment></comment><comment><USER25> A few more good pop physics books:

Maxwell - Matter and motion. Written by THE Maxwell, what more do you need to know? long out of copy-write and available on the web for free

Born - The restless universe. discusses atomic theory and describes some of the more down to earth parts of quantum theory, especially how the theory explains quantitative properties of atoms and the periodic table.

Einstein & Infeld - The evolution of physics. pseudo-Historical exposition taking us from the mechanical universe to fields to quanta, and from Galilean relativity to Einstein relativity.

Reichenbach - the philosophy of space and time. technically philosophy of science, not pop science, from the logical positivist school of the Vienna circle. very readable discussion of abstract mathematical geometry and various relativity principles, if you don't mind skipping some of the more bloviating bits.

Pask - Magnificent Principia. Fantastic overview of Newton's Magnum Opus, although it doesn't give enough historical context to what newton was building on. Assumes some knowledge of calculus.

<comment><USER26> A bit more on the Maxwell book: it's a real textbook rather than "pop physics" in the usual sense, but written for people with only a high-school level of math (algebra and geometry). Wonderful explanations -- for one, iirc, the derivation of Kepler's conic-section law which Feynman later rediscovered and presented in "The Motion of Planets Around the Sun" \-- although the prose style is rather stuffy and Victorian, and Feynman has him beat there.

<comment><USER25> Are you sure we're thinking of the same book? The one i'm referring to [1] uses basic algebra (fractions, exponents, variables), only a couple of times in the entire exposition if i remember correctly. Its precisely what I would think of as good, non-fake popular physics. Edit: On second thought, I suppose this really isn't "popular physics in the usual sense" as you described it, so we probably are referring to the same text!

[https://archive.org/details/in.ernet.dli.2015.151311/page/n7](https://archive.org/details/in.ernet.dli.2015.151311/page/n7)

<comment><USER26> Yes, that's the one.

</comment></comment></comment></comment><comment><USER27> To put things in perspective, Susan is incredibly talented. She went from barely knowing high school math to enjoying advanced mathematical physics in fewer than three years, which means in this three years, she learned Analysis (not Steward Calculus, but at least Baby Rudin, mind you), Differential Equations, Linear Algebra, Abstract Algebra that covers at least groups, rings, and fields, Functional Analysis, Advanced Probability and Mathematic Statistics, Differential Geometry, to say the least. Besides that, she also needed to learn mechanics, E&M, Quantum Mechanics, and what not. She achieved all these in her part time as she was majored in Psychology. What's even more amazing is that she didn't find her latent talent until she went to college, and she could immediately enjoy Feynman's textbook with almost zero background in Physics!

Bravo! Bravo!

</comment><comment><USER28> As a new-comer to the topic of manifolds, learning it from math textbooks is painful. That seems to be the case even if you're reasonably strong at analysis, topology and linear algebra. I find textbooks written for theoretical physicists much gentler read. Physics textbooks can be a good place to start learning, say, differential geometry even if you don't care about physics (I don't).

</comment><comment><USER29> Caught this video the other day on Youtube. It's a archival 1959 lecture from MIT demonstrating light's wave particle duality. Using only a visible light source, photo-multiplier, and oscilloscope. Just remarkably clear and simple. It's amazing how much more the memory retains with a demo. And I can't help but think quantum computing could be made accessible to a wide audience in this way.

The Physics of Light (1959) John King-MIT-Electromagnetic Radiation

[https://www.youtube.com/watch?v=bnSH6YDFXfk](https://www.youtube.com/watch?v=bnSH6YDFXfk)

</comment><comment><USER30> This couldn't have come at a better time for me. I was listening to Kara Swishers interview with Elon Musk[1] and he touched on lots of physics related concepts related to all of his companies. The interview made me want to learn more about physics.

[1] - [https://www.recode.net/2018/11/2/18053424/elon-musk-tesla- sp...](https://www.recode.net/2018/11/2/18053424/elon-musk-tesla-spacex- boring-company-self-driving-cars-saudi-twitter-kara-swisher-decode-podcast)

<comment><USER22> Elon Musk talks about arguing from first principles and claims this is the physics way without going into details. What else did he say about physics that you liked?

<comment><USER30> When he was going into the Boring companies tunneling evaluation trying to figure out weather current tunneling tech was power constrained or heat constrained. Also he mentioned the supersonic jet design that he has. There were also some undertones with the Tesla Roadster, Tesla Pickup truck and SpaceX BFR.

<comment><USER22> Ok, thanks for giving details. But these can be classified more like engineering issues. I don't know if you agree.

</comment></comment></comment></comment><comment><USER31> The Mechanical Universe (1986) [video] [https://news.ycombinator.com/item?id=17793483](https://news.ycombinator.com/item?id=17793483)

</comment><comment><USER32> Previous discussions:

[https://news.ycombinator.com/item?id=12691963](https://news.ycombinator.com/item?id=12691963)

[https://news.ycombinator.com/item?id=13684303](https://news.ycombinator.com/item?id=13684303)

</comment><comment><USER33> Books are too low bandwidth. You will get stuck, mostly on trivial stuff. Then what do you do?

My advice is to find a teacher. If they are any good they will speed up the process by one or two (or more) orders of magnitude. Even the professionals do this.

<comment><USER34> >You will get stuck, mostly on trivial stuff. Then what do you do?

Find other books. There's a reason why university libraries have old editions of the same books and very similar books on the same topic.

<comment><USER35> This is great and, in my experience, non-trivial advice. I often used to get stuck on a mathematics textbook, and wouldn't know how to go forward. Turns out, sometimes different textbooks covering the same topic will be much better, or even just will be better for teaching one specific concept.

</comment></comment></comment><comment><USER36> Having completed a graduate level Physics education, I can attest that the selection of topics is solid.

(Can't comment on the books, I learned in a different language where other books tend to be used).

<comment><USER17> Assuming it's German, would you like to list some of your favorites?

I've noticed that I mostly read English textbooks on all kinds of subjects, because it's easier to get recommendations on HN or sites like chicmath.

<comment><USER36> Oh, it's been a long time :-), but I'll try to dig through my memory.

I think I liked the Gerthsen, our Profs also recommended Demtröder, which was OK, but somehow I never liked it as much.

In theoretical physics, Nolting and Fließbach were good -- though I cannot remember which topic I learned from where.

I did my Diplomarbeit on spin transport in mesoscopic systems, and really liked "Electronic Transport in Mesoscopic Systems" by Datta, which at the time seemed to be the only accessible and clear writing on the subject.

Disclaimer: I tended to go to the lectures very regularly, and mostly learned from there, so the books very mostly supplemental material for me.

</comment></comment></comment><comment><USER37> Is there a similar list for Mathmatics somewhere?

<comment><USER17> Not for self-study, but still interesting: [https://www.ocf.berkeley.edu/~abhishek/chicmath.htm](https://www.ocf.berkeley.edu/~abhishek/chicmath.htm)

</comment></comment><comment><USER20> Wow what an amazing list. It will still take many years to learn all this material, but I think that a dedicated student could follow it and physics up big time! My time estimate for someone with normal intelligence level (i.e. not genius), starting fro scratch and learning part-time, would be 2-3 years. It's totally worth it though for the analytical power that learning physics gives the learner.

Some notes/links below:

> Before you begin studying physics and working through the topics in the > sections below, you have to be familiar with some basic mathematics.

That is very true and often a big obstacle for people who have been out of school for some time. Note it's not enough to just be familiar with the concepts—you must achieve fluency with the procedures so you can use them as building blocks for later studies. For example, it's not enough to just read about the quadratic formula (-b ± sqrt(b^2-4ac))/(2a) and use it a few times, spending 5 minutes each time to think about the steps, plugging in the vars, etc.

Because solving quadratic equations is used so much in math and physics, you have to package that procedure as a reusable routine that you don't think about anymore and you can apply almost without thinking, in under 30 seconds. This "fluency with the basics" will ensure you're not slowed down when you reach the more advanced topics where solving quadratic equations is used.... and there is only one way to build fluency...

> Regardless of your learning style, you'll still need to solve the physics > problems in each textbook. Solving problems is the only way to really > understand how the laws of physics work. There's no way around it.

This. A thousand times this. I wish someone told me that when I was studying. It may not be fun to get stuck, go down the wrong path, doubt your abilities and feel stupid along the way, but that's what growth looks like. If every time you read a solution to a problem provided by someone else you gain one "knowledge unit," then finding the solution on your own is > 10 knowledge units. Forget 10x engineer, be a 10x learner—solve some problems!

> 1\. Introduction to Mechanics [...] the basics of motion in a straight line, > motion in two dimensions, motion in three dimensions, Newton's Laws, work, > kinetic energy, potential energy, the conservation of energy, momentum, > collisions, rotation and rotational motion, gravitation, and periodic > motion. > You'll need to learn calculus while working through University > Physics. >

Shameless plug, I wrote a book called No Bullshit Guide to Math and Physics that covers these exact topics. It would be a great starting point for someone who wants to review high school math and learn mechanics and calculus in an integrated manner. Here are some links if anyone wants to check it out:

\- preview: [https://minireference.com/static/excerpts/noBSguide_v5_previ...](https://minireference.com/static/excerpts/noBSguide_v5_preview.pdf)

\- [https://minireference.com/static/tutorials/conceptmap.pdf](https://minireference.com/static/tutorials/conceptmap.pdf)

\- condensed printable tutorial: [https://minireference.com/static/tutorials/mech_in_7_pages.p...](https://minireference.com/static/tutorials/mech_in_7_pages.pdf)

\- reviews: [https://www.amazon.com/dp/0992001005/noBSmathphys](https://www.amazon.com/dp/0992001005/noBSmathphys)

</comment><comment><USER22> > ...the pure joy of understanding the universe around us is one of the most > beautiful experiences you can ever have in life.

But you do not need to study physics for 25 years in order to understand how the world works. Academic physics that she wants us to learn to undersdand the world is just a new academic subject invented or formalized in the 19. century. Archimedes knew 0 (zero) physics and made huge discoveries. Galileo was not a physicist in the modern sense of the word. Even Newton was not a physicist but a natural philosopher. Physics today is a professional field. By studying physics textbooks you will only gain enough knowledge to pass physics exams. It's much better to go out and look at nature directly. If you need specific mathematics just learn that part, solve your problem and move on. But academic physics, as she clearly mentions,claims to build on previous knowledge. This is the way of scholasticism. Scholastics claim that without spending two years studying calculus you cannot invert a matrix. (Because they make a living teaching you calculus.) This is not true. Knowledge is not linear. I can study and learn matrix operations with zero calculus knowledge. The opposite of scholasticism is just-in-time knowledge. Whatever I need I can look it up.

But thanks for posting this. There are good resources in it.

<comment><USER38> I think I appreciate the point you are making, but you have gone a little too far in making that point. I've gone through a physics education, and I can attest that one can learn the material, be good at taking exams, and still do a poor job of applying it to the real world.

The other extreme is as problematic, though. Knowing certain formalism in mathematics can _really_ help in expressing a physics principle - and at times it takes a fair amount of seemingly pointless formalism to get to that point.

>Scholastics claim that without spending two years studying calculus you cannot invert a matrix. (Because they make a living teaching you calculus.)

I have no idea where this is coming from. In my education, we were taught matrix inversion a full year before calculus. I've studied matrix inversion multiple times in my academic career, and I don't remember calculus being invoked once.

And to be frank, I'd be extremely wary of anyone claiming strong physics knowledge without learning calculus. Physics gained by leaps and bounds after calculus was introduced. It is the subject one can apply calculus most easily to, and is perhaps the reason we know more physics than any other discipline out there.

<comment><USER24> > _wary of anyone claiming strong physics knowledge_

Well, that depends. Faraday was a _great_ physicist (his claims, whatever they may have been, notwithstanding).

<comment><USER38> Are you suggesting that Faraday did not know calculus?

<comment><USER24> According to Wikipedia, "his mathematical abilities, however, did not extend as far as trigonometry and were limited to the simplest algebra."</comment></comment></comment></comment></comment>


Different Types Of Strings In JavaScript - oscar-the-horse http://www.horsesaysinternet.com/code/different-types-of-strings-in-javascript/ <comment><AUTHOR> they are the same</comment>


Who is sorting JSON values in Rails JSON response and why? - <AUTHOR> http://stackoverflow.com/questions/14676943/who-is-sorting-json-values-in-rails-json-response-and-why

<comment><AUTHOR> .</comment>


Ask HN: What companies are using probabilistic programming? - <AUTHOR> Probabilistic programming systems (PPS) define languages that discretize modeling and inference such that any generative model can be easily composed and run with a common inference engine. The main advantage over traditional ML systems in deterministic code (i.e. Python) being concise, modular modeling where the developer doesn't have to write custom inference algorithms for each model/problem. For more info see, for example, [1] and [2].<p>I'm curious though, what applications of PPS are realized in practice? Notably Uber [3] and Google [4] are developing/supporting their own (deep learning focused) PPS, but is it known if/how they're used within these companies? Are the frameworks (Pyro [5] and Edward [6], respectively) used by other companies?<p>[1] Frank Wood (Microsoft) tutorial: https://www.youtube.com/watch?v=Te7A5JEm5UI<p>[2] MIT ProbComp lab's page of resources: http://probcomp.csail.mit.edu/resources/<p>[3] https://eng.uber.com/pyro/<p>[4] https://medium.com/tensorflow/introducing-tensorflow-probability-dca4c304e245<p>[5] http://pyro.ai/<p>[6] http://edwardlib.org/ <comment><USER2> Improbable [0] is building (and has open-sourced) Keanu, "a general purpose probabilistic programming library built in Java", where Bayesian networks are represented as DAGs. It's feature list includes Probabilistic Programming Operators and Distributions, Auto-differentiation, Inference, Maximum a posteriori, Metropolis Hastings, Hamiltonian Monte Carlo, Sequential Monte Carlo (Particle Filtering), and Support for Kotlin. [1]

[0] [https://improbable.io/](https://improbable.io/)

[1] [https://github.com/improbable- research/keanu](https://github.com/improbable-research/keanu)

<comment><USER3> I met some of their team at an academic seminar and what they're doing is pretty ambitious; and goes beyond probabilistic programming. It sounds more like they're building traditional modelling tools on top of a PPL [0], where the PPL helps with the model calibration.

[0] [https://github.com/deselby-research/](https://github.com/deselby- research/)

</comment></comment><comment><USER4> We use PPLs at Triplebyte for matching software engineers to jobs where we predict they're a strong fit. We recently published [https://triplebyte.com/blog/bayesian-inference-for-hiring- en...](https://triplebyte.com/blog/bayesian-inference-for-hiring-engineers) which starts to explain our framework, though PPLs would have to be a "part 2" blog post if anyone's interested.

<comment><USER5> Would love to see that follow-up. There are so many domains, like yours, where it's unlikely (from a model selection perspective) that indicators are conditionally independent; whether it's hiring candidates, or matching companies and funding sources (as we're doing at my company, Belstone - we're hiring!), or building better dating sites, or recommending products, or implementing public policies, there are underlying hidden variables that capture aptitude/appropriateness of a subject to a certain aspect of the domain.

There's tons of academic literature on how to handle this, and accelerating industry support for the frameworks mentioned by OP... but the act of building an early-stage software engineering culture that is amenable to the large amounts of experimentation (often exciting, often frustrating, incredibly hard to time-predict against business needs and runway allocation) is something where I think the industry is still finding best practices. Were PPLs the right move, with the benefit of your hindsight, for that problem? Were they more promising than deep learning given challenges of properly collecting data at scale? The process of choosing a system, measuring it against more naive/heuristic approaches, deciding how to put it into production and integrate with existing software/pipelines - and reliably hiring the right people for those jobs, to make things a bit meta for Triplebyte! - that's a narrative in search of thought leaders.

</comment></comment><comment><USER6> Stan is probably the most mature, stable PPL, and it's an extremely popular tool, although it isn't really deep-learning-adjacent so gets much less hype.

It's generally used more for modeling and prediction than for creating "products", if that makes sense. More popular among people with statistics or social science backgrounds than among programmers and computer scientists.

If you dig around Stan-related websites you can see various companies and institutions that use it. One I found quite quickly was Metrum Research Group, which does consulting work for the pharmaceutical industry.

[https://metrumrg.com/](https://metrumrg.com/)

<comment><USER7> Generable is a Stan based startup which employs some of the core Stan devs

[http://www.generable.com](http://www.generable.com)

<comment><AUTHOR> Do you know of any details on how/why probabilistic programming is used over traditional methods? And why Stan? My assumption is b/c it's a legacy framework.

<comment><USER6> It's definitely not a legacy framework, it's very actively developed and improved.

A lot of very useful statistical models can't benefit from the GPU, and for them I think Stan is the better tool. There's a reason it's basically the default choice for people who want to use probabilistic programming for Bayesian statistics.

It's probably not the best tool for AI/ML type models. But for statisticians who want to use Bayesian methods it's close to perfect.

<comment><AUTHOR> Thanks that's good to know.

Haha I knew "legacy" would ruffle some feathers, by which I mean Stan was pretty much the first application-ready PPS on the block -- robust toolbox of methods, actively developed/supported.

The last slide of this presentation on SMC inference in PPLs is a nice view of the PPS landscape (not to mention the whole deck is a great intro by Lawrence Murray): [http://www.it.uu.se/research/systems_and_control/education/2...](http://www.it.uu.se/research/systems_and_control/education/2017/smc/schedule/lecture17.pdf)

<comment><USER6> Yeah, I see what you're getting at now. And that is an excellent diagram.

I've never actually used BUGS or JAGS for anything but I would consider at least BUGS to truly be legacy software. To me the word "legacy" means you shouldn't pick it for a new project.

</comment></comment></comment></comment></comment></comment><comment><USER8> pymc3 provides this for Python in a way that is very concise and modular (certainly much more concise than tensorflow-probability) -- and it is an open question if TensorFlow might be used to replace Theano as the backend execution engine for the next versions.

In particular, pymc3's use of ADVI to automatically transform discrete or boundary random variables into unconstrained continuous random variables and carry out an initialization process with auto-tuned variational Bayes automatically to infer good settings and seed values for NUTS, and then to automatically use an optimized NUTS implementation for the MCMC sampling, is incredibly impressive.

For most problems, you use a simple pymc3 context manager and from there on it acts kind of like a mutually recursive let block in some functional languages: you define random and deterministic variables that inter-depend on each other and are defined by their distribution functions, with your observational data indicating which values are used for determining the likelihood portion of the model.

After the context manager exits, you can just start drawing samples from the posterior distribution right away.

I've used it with great success for several large-scale hierarchical regression problems.

<comment><USER9> The plan of record is already to build pymc4 on top of TensorFlow: [https://medium.com/@pymc_devs/theano-tensorflow-and-the- futu...](https://medium.com/@pymc_devs/theano-tensorflow-and-the-future-of- pymc-6c9987bb19d5)

</comment></comment><comment><USER10> At Semantic Machines [0] we rely heavily on probabilistic programming to build state-of-the-art dialogue systems. In particular, we use a library called PNP (probabilistic neural programming) on top of Dynet to allow us to express structured prediction problems in a simple and elegant form. If there are questions I am happy to elaborate to the extent I can. (Also, we are hiring! My email is jwolfe@.)

[0] [http://www.semanticmachines.com/](http://www.semanticmachines.com/)

</comment><comment><USER11> Just a quick correction – Frank Wood is not at Microsoft, but at UBC:

[http://www.cs.ubc.ca/~fwood/index.html](http://www.cs.ubc.ca/~fwood/index.html)

Microsoft Research does have multiple excellent researchers working on probabilistic programming. Infer.NET in particular is a highly advanced piece of technology for models in which you would use message passing algorithms to perform inference:

[http://infernet.azurewebsites.net](http://infernet.azurewebsites.net)

<comment><AUTHOR> Thanks. I believe he's with Oxford (although may have multiple appointments), and that video is from Microsoft Research.

<comment><USER11> Just to clear up further confusion: Frank was indeed at Oxford previously – he moved to UBC this Spring. The tutorial actually took place at NIPS 2015 in Montreal.

</comment></comment></comment><comment><USER12> Given Avi Bryant[1] recently released Ranier from there, I'd guess Stripe is.

[1] [https://twitter.com/avibryant](https://twitter.com/avibryant) [2] [https://github.com/stripe/rainier](https://github.com/stripe/rainier)

<comment><USER13> Yes, we are - Rainier is used in production, though so far it's a very small part of our overall ML efforts.

</comment></comment><comment><USER14> Anglican [https://probprog.github.io/anglican/](https://probprog.github.io/anglican/) also based on a prototype by Frank Wood, using Clojure syntax.

</comment><comment><USER15> Facebook is working on probabilistic programming. Rather than develop it as a library, they're trying to provide language support directly. It was recently discussed at a conference; you could ask Erik Meijer for the details ([https://twitter.com/headinthebox/status/993972303863070720](https://twitter.com/headinthebox/status/993972303863070720)).

</comment><comment><USER16> I just made public my Master Thesis project that I completed at the University of Oxford.

It is called CPProb and it is a C++ general purpose probabilistic programming library that uses a version of Variational Inference to learn proposals for Importance Sampling.

It aims to be usable directly in preexisting C++ codebases. For the fulfillment of the Master Thesis, I also wrote a tutorial on Particle filters via SMC-like methods, and I described the design choices that one finds when implementing one of these systems.

The C++ library with the corresponding Pytorch-based neural network and the tutorial can be found in

[https://github.com/Lezcano/CPProb](https://github.com/Lezcano/CPProb)

and are available under a MIT license.

</comment><comment><USER17> [https://www.ferolabs.com/](https://www.ferolabs.com/)

</comment><comment><USER18> I've used rJags for R programming language which is quite old and based on Jags for windows but is quite straight forward though Edward, Stan and pymc3 seem to be state of art.

My project is quite simple but You can check it via homepage[0] or directly[1]

[0][http://www.vladovukovic.com](http://www.vladovukovic.com) [1][https://bit.ly/2Krtkfi](https://bit.ly/2Krtkfi)

</comment><comment><USER19> I designed a system which used probabilistic programming (Stan) to combine various deep learning based feature extractors to predict social behaviours.

<comment><USER20> Seems quite interesting! Do you have a write-up?

<comment><USER19> No, sorry.

I maybe able to answer specific questions.

</comment></comment></comment><comment><USER21> I'm working on probabilistic programming right now, and a lot of the papers I'm reading are from Microsoft Research. They have a cool Infer.NET project, and an ecosystem based on it is beginning to form. For example take a look at Tabular, which is an excel addon to do "Bayesian inference for the masses" based on Infer.NET: [https://www.microsoft.com/en- us/research/project/tabular/](https://www.microsoft.com/en- us/research/project/tabular/)

Overall though, by freeing developers from writing custom inference algorithms, all the work gets pushed to the language designer/implementer. It is not at all clear to me that one (or even a few) generic inference algorithms will be able to satisfy the needs for different problem domains. So there could be not one general purpose PPL but multiple ones with different problem domains.

</comment><comment><USER22> Charles River might use PPLs for determining drone targets.

<comment><USER23> Not really, but we do use our Figaro probabilistic programming language for all sorts of things, including predictive health maintenance, modeling complex systems like food insecurity, graph data mining for link analysis, onboard autonomy for satellites, predicting where a cyber attack may hit next based on different types of data, understanding the evolution of malware. All sorta of things. ([https://www.cra.com/work/case- studies/figaro](https://www.cra.com/work/case-studies/figaro)) for more info.

</comment></comment><comment><USER24> We use kind of a tiny in-house PPL for document analysis at [https://scanye.io/](https://scanye.io/). We haven't open-sourced it though.</comment>


A flying robot that can walk [video] - <AUTHOR> https://www.youtube.com/watch?v=MZhtJ0GGnOg#t=39

<comment><USER2> Official project website with video and earlier publications: [http://lis.epfl.ch/DALER](http://lis.epfl.ch/DALER)

Official press release from this week with more details on the recent paper: [http://actu.epfl.ch/news/a-flying-robot-that-can- walk-4/](http://actu.epfl.ch/news/a-flying-robot-that-can-walk-4/)

It's amusing to note that the primary author of the paper (Ludovic Daler) created a meaningful acronym for the project that matches his last name (DALER: Deployable Air-Land Exploration Robot).</comment>


Breast Milk Becomes a Commodity, with Mothers Caught Up in Debate - <AUTHOR> http://www.nytimes.com/2015/03/21/business/breast-milk-products-commercialization.html <comment><USER2> This is interesting. For comparison, in Sweden you donate (sell) milk directly to hospitals where it is handled locally and given to prematurely born children in the hospital.

The prices are set locally by each hospital but is currently at around $20-30 usd / liter, and has been raised a number of times over the last 10 years to encourage more people to donate milk. Hospitals buy milk from each other when necessary for somewhere around $100 per liter.

Donated milk is usually only accepted for the first three months after the donating mothers child was born. All equipment (pumps, bottles etc.) are provided by the hospital.

That said, I would encourage as many people as possible to donate milk, it makes a huge difference for those tiny prematurely born babies.

</comment><comment><USER3> I've heard stories of ultra-expensive breastmilk that is mixed from many donors - it supposedly gives the newborn antibodies from all those moms (expressed in the breastmilk - that's where babies get their antibodies until their own immune systems kick in). Does anyone have more info?

There's a similar concept for general antibody donation, which is given to the immune compromised, called intravenous immuno-globulin (IVIG)[0], which is extremely effective at modulating the immune system and enhancing immunity. Basically, they take blood donations, purify only (some) antibodies, and mix some 10,000 donors so that the resulting donation is well-rounded in its contents.

[0] [http://en.wikipedia.org/wiki/Intravenous_immunoglobulin](http://en.wikipedia.org/wiki/Intravenous_immunoglobulin)

</comment><comment><USER4> Is this a market now wholly because the United States has shit maternity leave laws, or would it be a market without it as well?

For some cultures, there has been an employment category called "wet nurses" whose entire job was to look after an infant and breastfeed it as a mother would. Perhaps as society becomes more an more unequal, we'll see a resurgence of wet nurses for rich infants.

<comment><USER5> We outsource almost everything women would, in earlier times, have had to stay home and do (cleaning, childcare, laundry, drycleaning, grocery shopping), so why not milk production as well? I know the process of feeding your infant is very fulfilling, but I've never heard anyone who liked the actual lactating part, which is pretty miserable.

<comment><USER6> Pumping isn't great, but actually nursing a baby can be wonderful. It releases hormones, and is generally very relaxing for me if my baby is calm.

<comment><USER7> I imagine there is an evolutionary reason for that - but at the same time (if you don't mind me asking) how often is the baby calm?

<comment><USER6> Both of mine have generally been calm. Nursing changes a lot as they get older, mine usually weren't interested in nursing when they've just eaten a lot of solids, or if there are distractions around, and being overtired is a whole other beast.

I'd say now with my second baby, at 11 months, 90% of the bedtime and morning nursings are pleasant bonding experiences, and half of the daytime ones.

</comment></comment></comment></comment></comment><comment><USER8> There are a lot of women who would prefer to breastfeed but can't for a variety of physiological reasons, so this market would at least have the potential to exist even if America's maternity leave laws weren't barbaric.

<comment><USER9> Aren't you projecting your European biases and beliefs on our American system. Who's to say your system is right, and our system is wrong? Europe takes a different approach to labor and economics than the United States. You may love large socialist structures in Europe, but you trade that off with a slow- growing economy. In the US, we have a smaller socialist structure with fewer safety nets, but we get a faster growing and robust economy. There's no right or wrong.

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

> Please avoid introducing classic flamewar topics unless you have something > genuinely new to say about them.

<comment><USER11> The rebuttal wouldn't have had been posted if the original comment not been a histrionic observation.</comment></comment></comment></comment>


Startup Stock Option Changes - <AUTHOR> https://medium.com/@beninato/startup-stock-option-changes-5df706da0317 <comment><USER2> Backloaded vesting seems like a terrible idea. It puts the employee in a really vulnerable position. As a company grows, the absolute value that a given person generates should decrease relative to everyone else. The function (relative value created this month / stock vested) decreases even more quickly. This may create an incentive to fire (or at least not try to retain) an employee after the first or second years. The founders may not need to increase this person's salary because of the perceived value to come, so this person may end up making less money than later employees.

I would not even think of proposing a backloaded vesting schedule to an employee. There's nothing wrong with an even vesting schedule in terms of employee alignment. If you cannot retain an early employee after year 1 or 2 you have other problems.

<comment><USER3> I agree. I came across this once, and ran the following model. Assume you assess the expected value of the equity grant to be, let's say, $100k over 4 years. Then this means your total comp will rise by $10k a year, which probably is comparable to your natural gain in market value. Thus this is equivalent to taking a similar offer except with $40k in equity with linear vesting, and either getting a raise or switching companies to get the $10k/year raise.

What this analysis omits is that the expected value calculation ignores the fact that the equity far exceeding the expected value is correlated with a desire to stay at the company, which makes the backloaded vesting irrelevant.

If you interpolate a bit to account for that correlation, I personally started concluding the $100k offer became more like $50-60k, which dropped the offer below market rate and I walked.

</comment></comment><comment><USER4> When a company refuses to disclose the fully diluted number of shares, what do you do? Assume it is the number of shares authorized (which you can find for $20 at [https://delecorp.delaware.gov/tin/GINameSearch.jsp](https://delecorp.delaware.gov/tin/GINameSearch.jsp))?

<comment><USER5> That is the upper bound that is generally much higher than the fully diluted count, so not a good proxy. However, it would be a fair assumption on your part since you are not given the right level of transparency. At any rate, probably best to be firm about the ask and just walk away if you dont get it, since it is not a good sign for things to come. Unless, of course, you would be okay to work there if they dont disclose you a salary (salary? dont worry about it...)

<comment><USER4> Is it an absolute upper bound? Is there a legal prohibition against creating derivative instruments (options, contracts secured by issuance of stock, etc.) in excess of authorized-at-time-of-execution?

<comment><USER5> in practice, it is set very high to cover all conversions and future capital needs and then some. however, it can be increased if needed, with a sharedholder vote.

</comment></comment></comment></comment><comment><USER6> I feel like this hardly touches on the main issues. It really doesn't matter what % of the company you are given, there are tons of other factors (such as the class of stock) that can effect your future dilution, as well as the value of the options independent of dilution (for instance if there is a right to repurchase your options are worth significantly less because there is a huge risk component added to them). TLDR: it's your responsibility to understand the agreement you are signing. If you can't, you need to give it to someone impartial who does and can advise you.

Also, re: #3 after 90 days (3 months technically) the SEC eliminates many tax benefits you get from your options being classified as ISOs, so while extending the time you have to purchase is helpful, it's not like it's as simple as giving you more time to exercise. Many things change after those 90 days that have nothing to do with your company's policy.

<comment><AUTHOR> Not sure what you mean about class of stock. Almost all employee options are common stock. Good point about repurchase rights. I should probably add a section on that. On the 90 day issue, usually those ISOs are converted to NQSOs after 90 days.

</comment></comment><comment><USER7> Possible downside to 10/20/30/40: does this make employees less mobile? From the company perspective, if we all start imposing this schedule, it might harm the recruiting pipeline. While startups all want committed employees, to what degree are they depending on the fact that, in the case of success, they can poach heavily from employees that have 1-2 years of tenure at their existing jobs?

Side effects are always important to consider. The "law of unintended consequences" is powerful.

</comment><comment><USER8> A lot of great suggestions.

I'd consider lack of #1 and #2 as dealbreakers. Any company that doesn't allow early exercise is being unfair to early employees for no reason, and not providing basic cap table information makes stock options numbers impossible to value.

#3 is great, but it is much more progressive. I'd value a company's offer more highly if they offered this, but it wouldn't be a dealbreaker if the company didn't.

As for number #4, I think 10/20/30/40 vesting is way too bottom heavy. The problem is the employer can always fire you if they want, and if the company blows way up in value in 2-3 years, they might prefer to fire you than give you so much stock. This reportedly happened at Zynga so it isn't unheard of. You'd hope to never join a company with this type of leadership, but as an employee you don't have much power so it is good to be defensive about it. Maybe I wouldn't mind a minor tweak like 20%/25%/25%/30%, but I'd prefer 25%/25%/25%/25% with a culture of refresher grants to high performers (which accomplishes the same thing).

The difference between founder stock and employee stock options is already so large, I don't think option holders really need to make any concessions (like bottom heavy vesting) to get some common sense benefits to stock options.

It also is important to educate people about these differences. I hope that companies that do #1, #2 and #3 have a nice guide on their offer letters explaining why this is beneficial to potential employees.

<comment><USER9> The problem with refresher grants (and the thing that people don't understand) is that they tend to be near worthless due to the strike price. If the company is doing well, and you've stuck around for several year, the price on the options is probably so high you're unlikely to make much money off of it.

<comment><USER8> In comparison to an early grant a refresher grant will be smaller and worth less, but that doesn't make it "near" worthless.

First, if you have 7 years to decide if you want to exercise it, then every stock option has risk-free upside regardless of the strike price. Without the 7-year rule then the upside isn't so clear cut, but that doesn't mean they are near worthless at all.

Second, companies really don't grow that quickly. Over a 1 or 2 year time horizon, even a really successful company will 2x-4x in value (and the common stock might grow even less than this). If the strike price was low on the original grant, the strike price will also probably be pretty low on the refresher grant. Especially at early stages of a company's life when the options are priced at essentially zero, even if you 5 or 10x the value, the strike price will still be very low.

When you have more established companies and higher strikes prices, it is less of an issue because there might be a shorter term path to liquidity which takes away risk of exercising without being able to sell the stock.

<comment><USER9> The dramatic difference in price is really between pre-funding to post- funding. e.g. I know many companies where options were granted at 1c a piece, even as seed notes and safes were given out, but as soon as the Series A equity round hits, the 409A & thus options grant went up to $0.50+. That's a huge difference.

That said, your point about having 7 years to decide is entirely fair, and mostly negates that downside.

</comment></comment></comment></comment><comment><USER10> Honestly, 4 year vesting schedules give me almost zero incentive to work harder.

The reason is this: These days, founders are more likely to try to make their companies look attractive as acquisition targets than try to grow their businesses long-term. Therefore, except for rare companies with exceptional growth potential, an employee can expect the company to either fail quickly or get acquired. So, rarely do typical startups last 4 years.

Further, since it's up to the board and the acquiring company to trigger full vesting on acquisition, and since boards and acquiring companies have no incentive to do so, most employees are left with much less than 4 years of vested options.

<comment><USER9> Any stock option worth anything will take 5-10 years to return. You'll know early on if it fails, but any acquisition within the first couple years won't return much to the rank and file.

</comment></comment><comment><USER11> This may be country-specific, but can options be put in tax-free accounts like TFSAs (Canada), (N)ISAs (UK), or (I think) IRAs (US)? Wouldn't that mitigate the capital gains tax issues?

<comment><USER9> In the US, with enough foresight, they can be purchased through a Roth IRA, which would prevent any tax from being applied. The (major) caveats are three- fold:

1) The money cannot be touched until retirement. So… if it turns out to be Uber and worth hundreds of millions, you can't touch _any of it_! It's probably a good idea to only put 25-50% of your stock in the account.

2) You can only contribute a tiny amount yearly to an IRA ($6k I think). So, the options strike price must be dirt-cheap for this to make sense.

3) Actually doing it is quite complex, and requires a third-party account custodian. If you're accepting a random startup offer pre-funding (the only time you'd have essentially free options, allowing #2 above not to be an issue), you're unlikely to go through that trouble.

\--

The huge benefit, however, is that if you do succeed in hitting in big with something that way, you'll have a gigantic Roth IRA balance, tax-free, and you'll be able to use it to make other investments, whose cost basis _and_ profits will all be tax-free.

[https://www.google.com/?q=max+levchin+paypal+roth+ira](https://www.google.com/?q=max+levchin+paypal+roth+ira)

<comment><USER4> Are you talking about a "ROBS" (Rollover As Business Startup) thing? The IRS hates them, but I believe they're technically legal.

I wasn't sure if you could do it with a Roth IRA vs. with a (non-Roth) 401k, though.

</comment></comment></comment><comment><USER12> Why do we give out options instead of stock in the first place?

<comment><USER4> Tax reasons and complications with having >500 shareholders (and shareholder information, etc. rights in general), plus administrative costs.

Early on, you issue founder grants if you want, at common stock price, paid in cash. A company is worth $100 in total, so you can buy 10% of it for $10.

Common and preferred can run separately in terms of price (although there's some relationship between the two; more enforced now than in the past.)

After Series A, 1% of the company would be a real amount of money -- maybe a $10mm valuation, so 1% would cost your engineer $100k at hiring. That's a lot of cash for an employee to invest.

<comment><USER13> > 500 unaccredited share holders. The JOBS act got rid of the 500 shareholder > arbitrary limit. It's now 2000 total or 500 unaccredited.

<comment><USER4> The #1 reason for all of this is actually "that's how it has always been done", which is strong motivation for non-core things in a startup.

</comment></comment></comment></comment><comment><USER14> My retention equity grant after an acquisition was 10/20/30/40\. I just left after 2 years partially because I realized that the schedule was insulting and I had barely vested a small slice of the pie.

<comment><USER4> I have a 2 year cliff (which I would hit 2 June 2016) on 4 year vest. I would not recommend this to anyone on either side of any transaction.

<comment><AUTHOR> I've never seen a 2 year cliff. Can you say what company?

<comment><USER4> Not standard at the company. Unique as part of acquisition.

<comment><AUTHOR> Got it thanks. There are all sorts of nonstandard things that happen after acquisitions. Too hard to capture those here.

<comment><USER4> 1/2/3/4 is much more common in acquisitions than it is anywhere else, so maybe the dystopia that is these kind of deals will become the norm for regular hiring.

</comment></comment></comment></comment></comment></comment><comment><AUTHOR> Based upon the comments, I added some additions to the end of the post. Thanks for raising those issues!

</comment><comment><USER15> Definitely needs to change.</comment>


They Know How to Prevent Megafires. Why Won't Anybody Listen? - <AUTHOR> https://www.propublica.org/article/they-know-how-to-prevent-megafires-why-wont-anybody-listen <comment><AUTHOR> > _"Between 1982 and 1998, California's agency land managers burned, on > average, about 30,000 acres a year. Between 1999 and 2017, that number > dropped to an annual 13,000 acres."_</comment>