A visual proof that neural nets can approximate any function - <AUTHOR> http://neuralnetworksanddeeplearning.com/chap4.html <comment> a-nikolaev Approximate, not compute. The function also must be continuous. NNs are good for approximation / interpolation / extrapolation, which makes them quite useful for certain domains of problems. But of course, it does not make them a kind of universal computing machine (in the computability sense, like universal Turing machines).

<comment><USER3> Wait a minute, isn't it also the case that according to the Weierstrass approximation theorem any continuous function on a closed interval can be approximated by a polynomial function? And isn't that kind of pointless for practical applications because we also need to avoid overfitting?

To clarify, I'm not trying to make a snippy remark, I just happened to have used polynomial curve fitting before and looked up the Wikipedia page for the Stone-Weierstrass theorem and am trying to figure out the relevance of that post on NNs. Is it essentially the same claim?

Any clarification appreciated!

<comment><USER4> Yes, the claims are pretty much in the same spirit. Although the first (Weierstrass's) theorem [1] was stated for real-valued functions in a 1-D closed interval [a, b], Stone-Weirstrass is a generalisation of the above theorem [2] that's applicable in more general scenarios. Here is the formal statement:

\- [1] [http://mathworld.wolfram.com/WeierstrassApproximationTheorem...](http://mathworld.wolfram.com/WeierstrassApproximationTheorem.html)

\- [2] [http://mathworld.wolfram.com/Stone- WeierstrassTheorem.html](http://mathworld.wolfram.com/Stone- WeierstrassTheorem.html)

Neural Networks use a different "basis" (sigmoid, ReLU, etc.), but the underlying idea shares the same spirit.

<comment><USER5> Yes. A NN consisting of, for example, sigmoids will form an "algebra" that separates points in the sense of the Stone Weierstrass theorem, and the NN approximation result will follow.

All that's really needed is that the limit of the NN basis function is different at plus versus minus infinity on the real line. This will give you the "separates points " property.

</comment></comment></comment></comment><comment><USER6> So can any lagrange polynomial, Fourier series, ...

The real question is whether the approximation is a good one:

\- can you prove error bounds ?

\- can you bound the maximum error?

\- is it efficient ? (low storage, low computational effort)

\- is it fast to build? (low computational effort of coefficients)

\- derivatives: how well does it approximate gradients, what's the error on the gradient, is it bounded? can one bound it, how fast can one evaluate them, etc.

\- there are many other interesting properties: [https://en.wikipedia.org/wiki/Approximation_theory](https://en.wikipedia.org/wiki/Approximation_theory)

From pretty much every single aspect of approximation theory, neural nets are one of the worst methods to approximate a continuous function. If you were to make an analogy with sorting algorithms, they would be worse than bogosort. There are no error bounds, you can't bound the maximum error, computing their coefficients is very slow (training, needs GPUs, ...), they require a lot of storage and computational power to evaluate, ...

<comment><USER7> > From pretty much every single aspect of approximation theory, neural nets > are one of the worst methods to approximate a continuous function.

What about scalability? I don't know of many approximation methods that can routinely work with the amount of coefficients, datapoints, dimensionality of data etc. that neural networks are coping with. (Though AIUI compressed sensing methods might come close; compressed sensing can be seen as a kind of approximation as well.)

<comment><USER8> Yes, neural nets are successful is in large part because they are asymptotically more efficient than other models. Training time is O(n) with O(1) memory, and prediction time is O(1) with O(1) memory. Compare to e.g. kernel methods, which have nicer theory behind them, but kernel least squares is O(n^3) with O(n^2) memory to fit and O(n^2) with O(n^2) memory to predict. The coefficients are larger for neural nets, but if your data are big enough, the asymptotics win out.

<comment><USER9> Training time for a NN is not O(n), it is a function of the dataset size and the complexity of NN to approximate a given function. Similarly the memory cost is also a function of the size of the network required. The same is true for prediction time and memory costs. If you data are big enough, all the O(1) lies we tell ourselves start breaking down.

<comment><USER8> By this logic, (naive) matrix multiplication is not O(n^3) because it is a function of the precision required. The size of the neural network required to approximate a given function to within some epsilon does not change with the dataset size.

<comment><USER6> Do you have a proof that the neural network approximates the function within some epsilon for all possible inputs within some range ?

<comment><USER8> The universal approximation theorem guarantees that a finite-width neural network that approximates the function to within some epsilon exists. But, regardless of the approximation method, there is no way to certify that a given approximation method is sufficient for an arbitrary continuous function given only a finite number of samples (i.e., without oracle knowledge of the underlying function), which is the typical situation where neural networks are applied. I can construct a continuous function that has an arbitrary (but non- infinite) number of peaks in an arbitrary interval. Thus, any method that approximates the function within some epsilon for all possible inputs within that arbitrary interval must encode an arbitrary amount of information. I can also ensure that whatever the number of samples is, it's not enough to properly approximate the function.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> People make far too big a deal of the universal function approximation property of a hidden-layer neural network. Universality should be a basic property of any decent interpolation method.

Piecewise linear regression is a universal function approximator.

<comment><USER11> And GMMs and 4th order DAEs and a bunch of other things. The really interesting thing is if the sensitivity of the weights to the loss function is a simple function. Best case would be a convex optimization problem, e.g. like SVMs

</comment></comment><comment><USER12> I think you can explain it even more clearly with smooth relative shifts, rather than sharp bump functions. I made a quick demo: [https://www.desmos.com/calculator/rfaqogkbmy](https://www.desmos.com/calculator/rfaqogkbmy)

Drag the sliders for _w_ and _n_ to change how step-like the sigmoids are and how many are combined. The purple lines are the sigmoids, relative changes at each (regularly spaced) position, which are added together to make the blue approximation to the red function. You can change the function _f_ ( _x_ ) to see how it handles other possibilities, including piecewise/discontinuous ones like "{x<.5: 0, x>=5: x}".

<comment><USER13> This deserves its own submission. Maybe the number of neurons slider could be logarithmic?

<comment><USER12> Done: [https://news.ycombinator.com/item?id=19711416](https://news.ycombinator.com/item?id=19711416)

I couldn't find a nice way of making the slider logarithmic (in Desmos the only way to do it is with an intermediate variable, which is kind of confusing), so I reduced the maximum number on the slider. I also fixed a bug.

</comment></comment></comment><comment><USER14> I skimmed it, but at a glance, isn't this almost identical to the Taylor Series?

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

<comment><USER15> Well, in the sense that polynomials are universal approximators too (on a compact domain). See this comment:

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

<comment><USER16> The Stone-Weierstrass theorem is not related to Taylor series, in fact the target function need not have a derivative, let alone have all higher-order derivatives, a prerequisite for the Taylor series to even exist.

</comment></comment></comment><comment><USER17> "No matter what the function, there is guaranteed to be a neural network so that for every possible input, x , the value f(x) or some close approximation) is output from the network"

Okay, so what? You require more and more neurons (ie. parameters) to approximate your function better and better. You can do the same with piecewise constant (Riemann sums). You can do this with trig functions too (Fourier transform).

"This result tells us that neural networks have a kind of universality."

I don't know what this statement means. What mathematical properties do neural networks have that other functions don't? The ability to approximate continuous functions isn't special. Given 5 points, I can perfectly fit an elephant to your function. And it's not like you are fitting the function with as few parameters as possible.

<comment><USER18> It's a baseline desirable property. It tells us that, at the very least, neutral networks are capable of approximating any continuous function. This isn't true for linear functions, for example, so we wouldn't want to try and model everything using linear functions.

</comment></comment><comment><USER19> *any continuous function

<comment><USER20> While we're at it, doesn't the "universality theorem" (as the article calls it) basically follow immediately from the fact that the set of all continuous functions comprises a vector space?

If the continuous function is additive, it's linear. If it's nonlinear, you can differentiate it to obtain a linear approximation. A neural network computes linear transformations, so unless I'm missing something I'm a little surprised there's a substantive theorem for this. Is it not a corollary on the fact that we can construct a vector space of all continuous functions?

<comment><USER21> One of the things about continuous functions is that they aren't necessarily differentiable, cf. [https://en.wikipedia.org/wiki/Weierstrass_function](https://en.wikipedia.org/wiki/Weierstrass_function)

<comment><USER20> True, but that was kind of an afterthought of my point. All continuous functions still comprise a vector space.

<comment><USER10> I don't see how that helps?

> A neural network computes linear transformations

They compute a nonlinear function of an affine transform. Neural networks are nonlinear functions.

</comment></comment></comment></comment></comment><comment><USER22> Any deeplearning expert here. Why Neural network can't compute a linear function Celsius to Fahrenheit 100% accurately.

Is it data or is it something can be optimised.

```

celsius_q = np.array([-40, -10, 0, 8, 15, 22, 38], dtype=float)

fahrenheit_a = np.array([-40, 14, 32, 46, 59, 72, 100], dtype=float)

for i,c in enumerate(celsius_q): print("{} degrees Celsius = {} degrees Fahrenheit".format(c, fahrenheit_a[i]))

l0 = tf.keras.layers.Dense(units=1, input_shape=[1])

model = tf.keras.Sequential([l0])

model.compile(loss='mean_squared_error', optimizer=tf.keras.optimizers.Adam(0.1)) history = model.fit(celsius_q, fahrenheit_a, epochs=500, verbose=False)

print("Finished training the model")

print(model.predict([100.0])) // it results 211.874 which is not 100% accurate (100×1.8+32=212)

```

What can be done to make this NN 100% accurate for simple linear equation 𝑓=1.8𝑐+32

[https://colab.research.google.com/github/tensorflow/examples...](https://colab.research.google.com/github/tensorflow/examples/blob/master/courses/udacity_intro_to_tensorflow_for_deep_learning/l02c01_celsius_to_fahrenheit.ipynb#scrollTo=Y2zTA- rDS5Xk)

<comment><USER23> * Fix the data. Right now the optimal coefficients on your data (using least-squares) are m=1.79794911, b=31.952525636156476, which yields 211.74743638 when predicting on 100.

* Tune the hyperparameters. In particular, tune the learning rate. To quote the Deep Learning Book [0]:

> _The learning rate is perhaps the most important hyperparameter. If you have > time to tune only one hyperparameter, tune the learning rate. It controls > the effective capacity of the model in a more complicated way than other > hyperparameters—the effective capacity of the model is highest when the > learning rate is correct for the optimization problem, not when the learning > rate is especially large or especially small._

The following code will yield exactly 212 almost every run (using fixed data and a different choice of learning rate):

```

celsius_q = np.array([-40, -10, 0, 8, 15, 22, 38], dtype=float)

fahrenheit_a = np.array([x * 1.8 + 32 for x in celsius_q], dtype=float)

for i, c in enumerate(celsius_q):

      print("{} degrees Celsius = {} degrees Fahrenheit".format(c, fahrenheit_a[i]))

l0 = tf.keras.layers.Dense(units=1, input_shape=[1])

model = tf.keras.Sequential([l0])

model.compile(loss='mean_squared_error', optimizer=tf.keras.optimizers.Adam(lr=1.0))

history = model.fit(celsius_q, fahrenheit_a, epochs=500, verbose=False)

print("Finished training the model")

print(model.predict([100.0]))

```

[0] [https://www.deeplearningbook.org/contents/guidelines.html](https://www.deeplearningbook.org/contents/guidelines.html)

<comment><USER24> Code blocks don't work on HN; you need to format all your code with spaces:

        celsius_q = np.array([-40, -10, 0, 8, 15, 22, 38], dtype=float)
        fahrenheit_a = np.array([x * 1.8 + 32 for x in celsius_q], dtype=float)

        for i, c in enumerate(celsius_q):
            print("{} degrees Celsius = {} degrees Fahrenheit".format(c, fahrenheit_a[i]))

        l0 = tf.keras.layers.Dense(units=1, input_shape=[1])
        model = tf.keras.Sequential([l0])

        model.compile(loss='mean_squared_error', optimizer=tf.keras.optimizers.Adam(lr=1.0))
        history = model.fit(celsius_q, fahrenheit_a, epochs=500, verbose=False)

        print("Finished training the model")
        print(model.predict([100.0]))

</comment></comment></comment><comment><USER25> If you're interested in classical approximation with polynomials, check out Nick Trefethen's lectures on the subject.

[https://people.maths.ox.ac.uk/trefethen/atapvideos.html](https://people.maths.ox.ac.uk/trefethen/atapvideos.html)

Chebfun is pretty cool too!

[http://www.chebfun.org](http://www.chebfun.org)

</comment><comment><USER26> For an alternative approach, if you treat this function as a time series where x is time, you can get a reasonably good approximation by performing SVD of the trajectory matrix and building the forecast from the principal components (eigen vectors) using a recurrent formula.

Here's an example:

[https://apps.axibase.com/chartlab/9922f98f](https://apps.axibase.com/chartlab/9922f98f)

* Chart 1. Function value for x in [0, 1).

* Chart 2. Function value for x in [0, 2).

* Chart 3. Function value for x in [0, 1) and extrapolated values for x in [1, 2).

</comment><comment><USER27> Skimming through the article, I understand that the author...

A) was focusing on functions that take a certain amount of input variables and

B) that the function (that s/he mirrored using the neural net) computes out of it directly one or more of result(s).

C) To do that s/he used a backpropagation network (which is the only model I know very well).

Right or wrong?

EDIT: when I say "directly" I mean that the function(s) does not feed itself.

<comment><USER12> If you want to know the details, you should read the article more thoroughly. There is no back-propagation (or any training) involved, as this article is about what kinds of things neural networks can do in principle. I.e. how we can be sure that neural networks can in theory solve some problem we have. In practice, you have to actually find a network (by training) that solves your problem with a reasonable amount of resources, using the data you have, and that's a whole other issue (in fact, an entire research field!).

<comment><USER27> Ok, thanks for the explanation.

</comment></comment></comment><comment><USER28> Isn't this a bit like saying you just created an nth-order polynomial regresion for any set of points x/y that someone hands you? They are essentially the same amount of parameters, and both can only approximate one function. So.... no kidding?

</comment><comment><USER29> Great book, this is how I learned NNs

</comment><comment><USER30> This proof is largely irrelevant in the real world. An interesting question would be how much can be approximated with a model that has 1 MB worth of weights and can use only relu/tanh/softmax activations.

<comment><USER31> The first paragraph of the conclusion addresses that this is merely a proof of what is possible, not what is practical:

> The explanation for universality we've discussed is certainly not a > practical prescription for how to compute using neural networks! In this, > it's much like proofs of universality for NAND gates and the like. For this > reason, I've focused mostly on trying to make the construction clear and > easy to follow, and not on optimizing the details of the construction. > However, you may find it a fun and instructive exercise to see if you can > improve the construction.

</comment></comment><comment><USER32> How would it be possible to implememnt/approximate a simple SIN or COS function using a neural network? I would like to implement it but I was not able to find out how.

</comment><comment><USER33> A system mirroring a polynomial has the same properties as a polynomial - <USER2> whizz - that really doesn't deserve to be at the top of of hacker news!

</comment><comment><USER30> Of course they can, because an NN can be any function. If we can pick tanh as the "activation" then we can as easily pick arctan as the activation ans say our NN computes arctan. What an achievement! A better question is whether conv+relu based NNs can approximate any function. But that's most likely false because there are many weird functions that are impossible to compute, not even approximate (I'm talking about those curious counter-examples in math).

<comment><USER34> This is a non sequitur in this context. The universality described here depends only on changing connection weights, not the neuronal activation functions. An important caveat is the approximated function must be continuous, but that covers a very large family.

<comment><USER30> I don't think every continuous function can be approximated this way because we can make an infinitely complex, but continuous function that would have any n-th derivative also continuous. I'm thinking about those weird zeta-riemann- style functions. In order to approximate such a function we'd need a huge model that couldn't be computed or stored even by a universe-size perfect computer.

<comment><USER34> It's a theorem, so it's been proven: [https://en.wikipedia.org/wiki/Universal_approximation_theore...](https://en.wikipedia.org/wiki/Universal_approximation_theorem)

Another caveat that I forgot in my previous comment is the domain has to be compact (closed and bounded). But if so, then it doesn't really matter how weird your continuous function is, because compactness of the domain guarantees uniform continuity, i.e. your delta only depends on epsilon and not x in the epsilon-delta criterion of continuity. That allows you to partition the domain into patches of diameter delta, in which very simple functions are sufficient to approximate within epsilon.

</comment></comment></comment></comment><comment><USER35> Can neural networks solve the halting problem?

<comment><USER36> No. Neural networks are still computed on Turing machines, which are mathematically proven to not be able to solve the halting problem.

<comment><USER37> It doesn't matter if neural networks are computed on Turing machines or not. The term _" compute"_ or _" computation"_ is commonly defined _by_ a Turing machine, as all other models have been shown to have equivalent power, and so far there is no indication that the Church-Turing thesis is false. So if one says a model can perform arbitrary computation, it cannot be stronger than a Turing machine, unless one is talking about hypercomputation, which is still largely a conjuncture.

Just my two cents, correct me if I'm wrong.

<comment><USER38> Well, you're not exactly wrong but what you're saying is a bit weird.

Technically something capable of arbitrary computation in the Turing machine sense can be stronger than a Turing machine (the obvious example being a Turing machine with access to a halting oracle).

Also if you want to show something is limited by the capabilities of a Turing machine it's way easier to point out it's being run on a Turing machine, as opposed to showing it's capable of arbitrary computation (which might not even be sufficient, as I explained above).

As it stands it's not entirely obvious that a neural network with access to arbitrary precision arithmetic might not be more powerful than a Turing machine, but since we couldn't possibly construct a neural network precise enough that's a bit of a moot point.

</comment></comment></comment></comment><comment><USER39> > neural nets can approximate any continuous function

So-called "neural nets" are just logistic regression with a fancy name. Seems "deep learning" is just a wavelet transform with a sigmoid basis. (So, boring math stuff we already knew forever, plus marketing mumbo-jumbo.)

<comment><USER10> > Seems "deep learning" is just a wavelet transform with a sigmoid basis

Well... more like an iterated transform.

You're right, most of the mathematics is very old indeed. What changed was the hardware (parallelism), software (easy-to-use autodiff packages) and the availability of data.

There's a lot of hype in the field, but some of that hype is deserved. Computer vision was practically in crisis in the late 00's and early 10's. No significant progress was being made on problems, and there were few strategic directions to move in that hadn't been done to death already. Then _smash_ : along comes deep learning, which changed everything.

</comment></comment><comment><USER40> I'd like to see a neural network that can compute a hash function.

<comment><USER41> [http://cs.nju.edu.cn/lwj/L2H.html](http://cs.nju.edu.cn/lwj/L2H.html)

<comment><USER42> This is just crazy! I can't even begin to understand what is going on... Bravo

</comment></comment></comment><comment><USER43> title is false since there exist uncomputable functions, no?

</comment><comment><USER44> Can it compute y=sin x?

<comment><USER45> > First, this doesn't mean that a network can be used to exactly compute any > function. Rather, we can get an approximation that is as good as we want. By > increasing the number of hidden neurons we can improve the approximation.

<comment><USER46> Also, the article doesn't mention a crucial part of the universal approximation theorem: It is about functions on compact subsets of R^n, so it doesn't say anything about functions that take the whole of R as input.

<comment><USER47> It's also important to note the theorem doesn't help you find the right weights, just notes they exist.

</comment></comment></comment></comment><comment><USER48> Any orthonormal ~set~ basis of functions can represent any function. So what?

<comment><USER49> No, the set must be an orthonormal _basis_. For example, two Fourier components technically form an orthonormal set, but do not form a complete basis.

<comment><USER48> Yes, I meant basis. My point still stands: so what?</comment></comment></comment>


OpenSSH and the dangers of unused code - <AUTHOR> http://lwn.net/SubscriberLink/672465/4c0bced62cb3e625/ <comment><USER2> Use memset_s, people. The compiler isn't allowed to remove calls to it: [http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1381.pdf](http://www.open- std.org/jtc1/sc22/wg14/www/docs/n1381.pdf)</comment>


VRChat concurrency steadily returning to "Ugandan Knuckles" peak of 2018 - <AUTHOR> https://nwn.blogs.com/nwn/2020/05/vrchat-concurrency-growth-steam.html <comment><USER2> People have learned the way.

</comment><comment><USER3> More people are watching it on twitch.tv than going into the virtual world. Hm.

<comment><USER4> You don't need to own a headset to watch a stream so that's not entirely surprising.

The level of interest is encouraging because hopefully some of that will translate into hardware ownership.</comment></comment>


How to Convert 97% of Visitors Who Do Not Fill Out Contact Form - <AUTHOR> http://www.criminallyprolific.com/2014/03/how-to-convert-97-of-visitors-who-do-not-fill-out-the-contact-form/

<comment><USER2> Creepy in the extreme. If I visited a website and didn't identify myself, and then got an email from them, I'd block their domain. This is NSA-style spying, masquerading as good marketing.</comment>


Type-safe GraphQL with OCaml - <AUTHOR> https://andreas.github.io/2017/11/29/type-safe-graphql-with-ocaml-part-1/ <comment><USER3> If ReasonML is able to form a real community, I have high hopes for its long- term prospects. Such an enjoyable language to use! I think their general approach of bootstrapping a community by lowering impedance with the JS ecosystem is a decent one.

In case anyone on the OCaml team is reading this though, there are two language-level changes that I think could do wonders for wider adoption. The first is modular implicits: it feels so kludgy to have to type `a + b` for integers, `a +. b` for floats and `a ^ b` for string concatenation. I know it sounds like a small thing, but it makes the language feel inelegant, and aesthetics are important. The second is a good concurrency story, ideally one that is compatible with JS-style async/await keywords for easy interop.

I know those are both being worked on; I just hope they become available in time to coincide with the wave of interest in ReasonML!

<comment><USER4> > The first is modular implicits: it feels so kludgy to have to type `a + b` > for integers, `a +. b` for floats and `a ^ b` for string concatenation. I > know it sounds like a small thing, but it makes the language feel inelegant, > and aesthetics are important.

That's interesting, as being forced to use the same operator for _addition_ and for _concatenation_ (and what's more with the result of mixed types if allowed often dependent on the order of the parameters) has always seemed extremely inelegant to me.

Addition and concatenation are not the same thing. Why they should share a symbol when they don't share some properties integral to their nature (it's non-commutative) is beyond me, and I think it's caused a lot of bugs that didn't need to happen.

Not allowing the addition of floats and ints together is less of a fundamental issue, but it also helps quite a few problems. Al alternative solution, if you didn't want to reply on _implicit_ coercion would be to _explicitly_ convert one operand to the appropriate type so they match.

Or you can go whole hog and provide an entirely separate set of operators for different types, like Perl did (string concatenation is '.', and equivalents comparitors are eq,ne,gt,lt,ge,le). That works well in Perl's case, but that's mostly because for Scalars Perl really just wants to know whether you are treating it as a number or a string, so there's only two types to account for.

<comment><USER5> Couldn't the type system still allow using the + operator, but requiring the values on both sides to have the same type? You could do more magic like having int + float return a float, but I'd even prefer typing "int.toFloat + float" than "int +. float".

<comment><USER6> > Couldn't the type system still allow using the + operator, but requiring the > values on both sides to have the same type?

'course it could, multiple languages already do that e.g. Rust ([https://play.rust- lang.org/?gist=530fa94d3f451e896ac0d3ddeaf...](https://play.rust- lang.org/?gist=530fa94d3f451e896ac0d3ddeaf66ab1&version=stable)), Haskell ([https://repl.it/repls/FrozenBlondUmbrellabird](https://repl.it/repls/FrozenBlondUmbrellabird)), Swift ([https://repl.it/repls/LuckyNaiveBream](https://repl.it/repls/LuckyNaiveBream))

</comment></comment></comment></comment><comment> aaron-lebo I wish OCaml had the libraries and community of Go or Rust, I think it'd be the most useful all-around language out there.

<comment><USER7> I'm hoping the movement around ReasonML[0] could lead to both the web community being able to reap the benefits of OCaml's fundamentals, while also giving people a point of introduction to the OCaml community through web dev.

It has been my experience that the ReasonML community is incredibly welcoming to new comers, and is moving at a break-neck pace to find the right target of being approachable for people who are familiar with JS, but also empowering users to use all of OCaml's power to create web apps that are more simple and correct than they would otherwise be.

[0]: [https://reasonml.github.io/](https://reasonml.github.io/)

<comment><USER8> I really don't understand why they had to invent a brand new syntax.

<comment><USER9> The short answer is that Reason's syntax is simpler and more enjoyable to use. I simultaneously learned both OCaml and ReasonML syntaxes and find Reason to be much easier to work with.

Perhaps people in Reason core will chime in with a more detailed answer. Here's some official information: [https://reasonml.github.io/guide/ocaml/](https://reasonml.github.io/guide/ocaml/)

<comment><USER8> Yeah, I guess the complaint comes from a guy that was already familiar with OCaml's syntax.

I guess if you don't know OCaml, maybe the Reason syntax is more appealing.

<comment><USER10> I learnt Reason syntax first, then OCaml second. I prefer the OCaml syntax, it seems simpler, cleaner, and doesn't hide the nice things about the language behind JavaScript semantics.

The biggest example I can think of is that OCaml uses let..in, which reminds you that every function is a statement. By contrast, the `;` in Reason hides that fact.

That said, it was the Reason syntax that first brought me to the ecosystem, and I think it's going to be the catalyst that makes OCaml a big player in front end.

<comment><USER11> > "The biggest example I can think of is that OCaml uses let..in, which > reminds you that every function is a statement. By contrast, the `;` in > Reason hides that fact."

... Except in OCaml modules/files where you don't use "in". OCaml still has "semicolons" for let bindings - but they are just spelled as "in" or "let () =" depending on the the context. All but one of these "semicolon" forms have nothing to do with language semantics and are only used to help the parser figure out how to group bindings and values. It doesn't make OCaml's core semantics worse or better- though it might make it harder to learn initially or copy/paste code between different contexts.

The point of ; in Reason is merely for consistency - to have exactly one way to form bindings whether you are in a module or expression, allowing you to copy paste lines between the two contexts. Compare that to OCaml which requires different syntax depending on the context and copying values from module bodies to expressions requires a lot of editing. There may be other ways to achieve the same kind of consistency without semicolons and we are open to them - just so long as they are consistent across all contexts and easy to learn. (And as long as they don't have major foot guns like JS's ASI).

(Often people object to ; as a parsing separator because they think it means "side effect". It doesn't. Not in Reason. Not in OCaml. OCaml features ubiquitous use of semicolons for everything from arrays, lists, to records field separators, all things that have nothing to do with side effects. And if you still haven't had your fill, there's the ;; double semicolon - <USER2> actually does typically imply side effects).

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> If you're interested in typed APIs, also check out RESTyped: [https://github.com/rawrmaan/restyped](https://github.com/rawrmaan/restyped)

It's an end-to-end way to type check REST API calls and responses using TypeScript.

<comment><USER13> We're using restyped over at habitat in production - makes API integrations a breeze!

</comment></comment><comment><USER14> Would wiring up ocaml-graphql-server resolvers to OCanren[+] have any interesting use cases?

[+] [https://github.com/dboulytchev/OCanren](https://github.com/dboulytchev/OCanren)

</comment><comment><USER15> Having spent my entire career, 15+ years, in "weakly typed" or whatever you call it, languages, such as basic, vbScript and JavaScript I don't get this type hype. In "unsafe" languages that have overflows I get it _will_ help to make it less unsafe, but in high level languages such as JavaScript why do you even need static (not sure I'm using the right vocabulary) typing !? Such as HypeScript, err I mean TypeScipt. Is there an entire field of programmers out there that get bugs because they are mixing numbers and strings !? I also did that a lot as a beginner in JavaScript as the plus sign is used both as concatenation and addition. I read a study here on HN a while ago (that probably was sponsored by $M) that stated using TypeScript would prevent most of the bugs found on GitHub, but of course there where no examples of where type annotation would have helped. So what's with this type frenzy ?

<comment><USER16> Dear z3t4,

I write this letter from the distant past, late in the month of November in the distant pass of 2017. From your lofty throne upon a future so bright, I urge you to remember the sad lives we lead as a return code type mismatch caused every Mac OS X machine running modern software to be accessible by anyone with physical access by typing "root" into the login field then hammering on the Enter key like a 9 year old.

Morale is high, because we know we cannot be sued for this act of gross incompetence. We have decided to solve this problem by shaking our heads at people who code in C and ignoring any similarities to our own toolkits.

Please remember us and our backwards ways.

Sincerely,

A time traveler from about 3 days ago.

<comment><USER17> > a return code type mismatch caused every Mac OS X machine [...]

I don't doubt you, but I was just trying to read up on details of this and the internet is so full of fluff pieces that I can't find anything technical real quick. Would you have a link to a writeup of the bug behind this issue?

<comment><USER18> [https://www.theregister.co.uk/2017/11/29/apple_macos_high_si...](https://www.theregister.co.uk/2017/11/29/apple_macos_high_sierra_root_bug_patch/)

The relevant function returns an opaque integer to signal failure/success. If this were typed properly — e.g. a type that represents either "Success" or "Failure" explicitly (rather than implicitly via an int) — the bug would be unlikely to happen, since it would require the function in question to explicitly return "Success" when in fact it had failed (as opposed to the opaque 0x01).

<comment><USER19> In this specific case, strongly typing the CryptVerificationResult as an enum would have helped. But, generalizing the problem, if you had more complicated criteria for whether that branch should be taken, it can be far too easy to save an intermediate result into a (strongly typed) variable but never end up using it in the correct way in the condition statement itself.

Rust goes part of the way here by ensuring that Result variables get checked: [https://doc.rust-lang.org/std/result/#results-must-be-used](https://doc.rust- lang.org/std/result/#results-must-be-used) which to my knowledge is not something you can mimic in C/C++. But you could still forget a negation or use && instead of || somewhere, and have an uncommon code path fail.

Code review reduces but doesn't eliminate the probability of these complex logic errors. What's really needed is tooling that ensures test coverage on a phrase-by-phrase, not line-by-line, basis. (Basic line coverage would have said that all these lines of code were executed in testing.) And you need a culture around paying attention to those results. That can be very difficult to build, but for mission-critical software (security included) you absolutely need that level of attention to detail.

<comment><USER16> > In this specific case, strongly typing the CryptVerificationResult as an > enum would have helped. But, generalizing the problem, if you had more > complicated criteria for whether that branch should be taken, it can be far > too easy to save an intermediate result into a (strongly typed) variable but > never end up using it in the correct way in the condition statement itself.

We can capture that requirement with something called Linear typing, but even if we don't go for a compiler-enforced consumption the creation of a _universally used_ family of result enums brings enormous discipline and reliability to error handling. In no small part because when considering the result of such an enum, the compiler can demand a total pattern match, which forces developers to consider what that failure means in context and present SOME kind of strategy (even if it's hard failure).

The approaches of languages with type inference and more sophisticated type systems like OCaml and Haskell go even a step further because they can create workflows around these types, creating composite workflows that make it _easy_ to handle errors. It becomes harder to ignore them, or write functions that ignore them.

One of the reasons it's so easy to write parsers in languages like Haskell is that algebraic data types and applicative functor composition make it easy and even convenient to talk about the logic within the context of non-trivial error flows. It's much more frustrating to write a parser without a combinator framework in OCaml or Haskell. Similar stories exist for Validator, Either, and Maybe/Option.

These techniques don't mandate error processing, but they make it more convenient to compose error-handling functions and offer more compiler checking when the results must be handled.</comment></comment></comment></comment></comment></comment>


Twitter Bootstrap 2.0 pre-release demo - <AUTHOR> http://bootstrap.io/Demo/ * bootstrap.io is not from or sanctioned by the Bootstrap Team  <comment><USER2> Please note that this is a demo (outdated too) and not really authorized by the project itself. It's unfortunate that some folks feel a need to put something up so quickly.

If you want to look at the current status of 2.0 and help test the release, please look at the 2.0-wip branch: <https://github.com/twitter/bootstrap/tree/2.0-wip>

The team expects to release something in a few weeks.

<comment><AUTHOR> Good point. It is a bit confusing since it looks fairly official and all links point to the project. Hadn't seen this discussion previously: [https://groups.google.com/forum/#!topic/twitter- bootstrap/ux...](https://groups.google.com/forum/#!topic/twitter- bootstrap/uxQT_TfokfM)

</comment></comment><comment><USER3> It bugs the hell out of me that they apply styling to vanilla tables. I wish they'd namespace it with a class because it messes up things like datepickers on JQuery-UI.

<comment><USER4> Couldn't the same argument be applied to JQuery UI then?

<comment><USER5> Not that I've checked, but common sense dictates jQuery UI (and any other such lib) does use a class to identify elements.

That doesn't, however, mean they don't inherit from the style of the base element. Which they will, no matter how they're classed or ID'd, if the base elements have been styled in CSS.

</comment></comment></comment><comment><USER6> I've been working heavily with 2.0 for a couple of months now and it is a huge improvement over 1.x. I've converted 90% of a $20 template that I bought over to it and it cut out a ton of bad css (you get what you pay for I guess).

It is still a bit in flux (ie: they just renamed a bunch of css for alerts and tables), but if you don't mind tracking the progress (made easy with your own git branch), it is a great basis to start a website from.

</comment><comment><USER7> Glad to see there are some variables for setting things like the navbar colors - I just started adapting a site to the 1.4 version and had to start out by changing all of the rules individually so I could implement a different color scheme.

Edit: Actually, I take it back as there are still hardcoded colors and the assumption that you are using white as the text. Would be nice if it was based off a few variables instead.

<comment><USER8> Couldn't this be changed in the 'less' files?

<comment><USER7> Those are the files I'm referring to - if you look in navbar.less for example, you'll see lots of

      color: @white;

in the various navbar rules. It would be great if there was a single variable:

      @navbarTextColor: @white;

and then all the rules could include:

      color: @navbarTextColor;

which is essentially what I've ended up doing.

</comment></comment></comment><comment><USER9> The link just redirects to the 1.4.0 version of bootstrap.

<comment><AUTHOR> After talking with the Bootstrap developers, I believe they asked the people who put up the demo, which was unofficial, to take it down and it looks like they complied: [https://twitter.com/#!/synapticarbors/status/159390827217559...](https://twitter.com/#!/synapticarbors/status/159390827217559552)

</comment></comment><comment><USER10> I'm just getting redirected to the original bootstrap page at <http://twitter.github.com/bootstrap/>

</comment><comment><USER11> I built <https://www.becouplydates.com/> on the 2.0-wip branch. We've been very pleased with it.

<comment><USER12> Browsing your source: the  tag is deprecated, friend.

<comment><USER11> Haha, I'm well aware ... and pretty embarrassed. :)

<comment><USER13> Don't be embarrassed :) Have you done a view source on Hacker News? It works.

<comment><USER14> It is also used on Google Search. There is nothing more alive than the center- tag.

</comment></comment></comment></comment></comment><comment><USER15> This isn't an official release yet.

<comment><AUTHOR> I'm changing the title to reflect that it is a pre-release demo

<comment><USER16> Thanks, it was kind of confusing before.

A lot of great stuff going on in the 2.0 version. Excited for it's release.

</comment></comment></comment><comment><USER17> I just used this bootstrap, to make this: <http://www.piparollcall.com/>

pretty awesome. very small when minified, even without less.

love it!

<comment><USER17> so it turns out im getting a HUGE response from this website. over 2000+ tweets to senators, now listed on craigslists sopa page... and couldn't have done it as fast as i did without the bootstrap. thanks twitter <3

</comment></comment><comment><USER18> it just takes me to twitter bootstrap github, is the site down?

</comment><comment><USER19> I put up a call-to-action site for sopa the other day. Due to the timely nature of the site, we had to get it up fast. Ended up using bootstrap for the first time. Was highly impressed - we were able to get a decent looking site up in around an hour. Looking forward to 2.0.

</comment><comment><USER20> I still prefer <http://getskeleton.com> as a boilerplate over Twitter Bootstrap. Bootstrap tries to do too much. Skeleton does just enough to be useful and then gets out of the way.

<comment><USER21> I'm fond of skeleton as well. The only drawback I've found is that it uses a 16-column layout. I find I often want to divide the screen in thirds and 12-columns would be much handier.

</comment></comment><comment><AUTHOR> The release data of Bootstrap 2.0 has been announced: <https://dev.twitter.com/blog/open-source-summit-bootstrap>

</comment><comment><USER22> Why are CSS frameworks becoming so prominent only now? Why weren't they coming out as much years ago? It seems like they would have been even more useful then.

<comment><USER23> Broad browser support for the visually interesting parts.

</comment></comment><comment><USER24> Here are an alternative private link to bootstrap v2.0 <http://mrtopf.de/bootstrap/docs/>

<comment><USER24> *EDIT, it seems that the link are 404 since today, i'm unable to locate alternative

</comment></comment><comment><USER25> Look at <http://bootstrap.io/Demo/BaseCss> in FF (PC) -- anyone else see anything odd?

<comment><USER26> Not when navigating to that link directly, but I do when I click "Base CSS" at the top.

</comment></comment><comment><USER27> Does anyone else see the "Example Blockquotes" section all f __*ed up or is it just me. (FF 9, Ubuntu)

</comment><comment><USER28> The link no longer works. Redirects to v1.x.

</comment><comment><USER29> is there any changelog for 2.0?

<comment><USER30> The 2.0 is not yet in the change log: <https://github.com/twitter/bootstrap/wiki/Changelog>

But you'll find some indication of the work done on the road map: <https://github.com/twitter/bootstrap/wiki/Roadmap>

</comment></comment><comment><USER31> I'd love for someone smarter than me to compare Zurb Foundation and this. It seems like Twitter has a few except things (pill-button callouts, etc), but Foundation seems VERY responsive-focused whereas Twitter Bootstrap seems to have added responsiveness in.

<comment><USER32> We looked closely at both and, while Bootstrap has far more features / UI elements, the attention to detail in building responsive pages is better in Foundation, IMO.

The elements are nice to have in Bootstrap but we are building our own elements on Foundation's solid platform and feel better about it over the long term.

<comment><USER31> My understanding is that responsive layouts is a big part of the 2.0 of Twitter Bootstrap. Did you evaluate it or the 1.0 version?

<comment><USER32> It must have been the 1.0 version. I'll give it another look.</comment></comment></comment></comment>


Comcast won't give new speed boost to Internet users who don't buy TV service - <AUTHOR> https://arstechnica.com/information-technology/2018/04/comcast-wont-give-new-speed-boost-to-internet-users-who-dont-buy-tv-service/ <comment><USER2> I already have to subscribe to Comcast's "basic" cable (which is what used to be called lifeline; it has nothing my antenna doesn't, not even the History Channel/Discovery Channel type stuff that used to be on 'basic).

The reason is that they charge me less when I'm also willing to be a TV 'subscriber'. TV+Internet is cheaper than Internet alone. The cable box just sits in its cardboard box in the attic, I still use my antenna because the quality is better.

<comment><USER3> > TV+Internet is cheaper than Internet alone

Not true. Check your bill. TV+Internet might be cheaper when only counting the base rate of TV, but when you get TV you also get tons of fees piled on. FCC fees, Local Cable Access fees, Franchise fees, Cable Box fees, Taxes, etc. It will be different depending on where you live, but when I added up all the fees it added almost $15 extra per month just for basic cable.

It's still cheaper to just pay extra for internet without cable TV and get an OTA antenna.

<comment><USER4> It really depends on the market. Comcast's prices and service can very significantly based on your zip code. That's why they require you to put in a house number before they'll even let you look at plans or prices. Also, if you put in an address without Comcast service in your neighborhood you'll get very different offerings than if you use your own address.

<comment><USER5> Used to be 90$ ish a month for years. Then they forced us into a promotional thing that ran out. And now the bill is 150$ a month for tv+internet+landline.

The option to just outright buy internet doesn't exist in their plans. Didn't give me any other options.

Theifs. Liers. Con artists.

I'm so fucking done with Comcast I'm building up a blueprint to help my town get community owned fiber access.

Everything I keep running into says don't. It doesn't work. It costs to much.

I hope it costs to much. I want Comcast to burn in hell for eternity.

<comment><USER6> Are they the only provider in your area?

Every year when my contract is about to expire they tell me my rates will be increasing from $60 to $90/mo., I call in and say I want to cancel and go to CenturyLink unless there is a comparable retention offer, and they continuously offer me a similar rate if I sign a new contract. It takes about 5 minutes, though I wish I didn't have to jump through hoops.

In a competitive market, they will do this for me within 2 calls usually with no escalations.

My friends in places where there is no other option go all the way up the chain with no results, since their threat to leave has no teeth.

It was crazy observing the difference in customer service when I moved to a major metro.

What I'm trying to say is that I agree that they suck, but they do subsidize the cities with higher fees in the country, and also that haggling is important.

<comment><USER7> > [comcast] do subsidize the cities with higher fees in the country

That may be true, but cities also cost less to serve than rural areas. Less density means that equipment serves fewer customers, each customer requires more cable to serve, technicians need to travel further between calls (or you need more of them), etc.

</comment></comment></comment></comment></comment></comment><comment><USER8> "We've increased speeds 17 times in the last 17 years."

My experience is that they increase the speed, and then a few months later they raise the price. Then I have to switch to a lower speed to get a price similar to what I was paying before. It's dishonest and sleazy.

<comment><USER9> > It's dishonest and sleazy

It's comcast™

<comment><USER4> ic™

</comment></comment></comment><comment><USER10> Why don't cable companies charge by megabyte used, instead of by speed? That way they would have an incentment to give you the fastest possible connection, since that would potentially mean, that you would be consuming more data. They might even give you a discount on your Netflix subscription.

Is the current pricing structure simply because consumers have become so accostumed to playing a flat rate, or is there something else, that I am missing?

<comment><USER11> > Why don't cable companies charge by megabyte used, instead of by speed?

Because "speed" sells, and the customers Comcast wants don't use much bandwidth.

The #1 source of revenue for Comcast is the customer who has cable, has high speed Internet, doesn't really use the Internet for much, and just pays their cable bill every month without really thinking about it.

The family with 3 teenagers all watching Fortnite live streams or whatever the kids are doing these days is Comcast's second worst customer, only superseded by the guy streaming those videos.They're taking up a significant chunk of their area's local bandwidth, and that costs real money to upgrade. Comcast has no incentive to allow for this use case unless they can find a price tier that makes you a good customer again (notice that for $50/month, Comcast will remove the bandwidth caps).

It's effectively the same reason that Comcast doesn't let you sign up for individual cable channels.

<comment><USER12> I have 1Gb + unlimited data right now. I regularly use 1.2-1.5TB of data every month. I'm sure they hate me almost as much as I hate them.

</comment></comment></comment><comment><USER13> Confirmed my suspicions. FWIW in SW Florida after severing Xfinity TV service ties, the replacement with ROKU boxes, et al, DID result in significant throttling of internet connections even after the speed increases were announced by Xfinity. The home 'Blaster' package saw a reduction in large .mp4/.zip file download speeds from 12MB/s to 5. That was coupled with frequent connection drops while viewing ROKU content. And you could forget about 4K content. Miraculously, when an Xfinity app was installed on ROKU which required a supplemental CATV account, which conveniently Xfinity marketed at a 2 yr. super discount to undercut the DirectTV app package, the internet speeds increased from a throttled 5 to a consistent 15MB/s on non-VPN downloads (using IDM on Win7, similar results in Linux Mint). And 4K viewing was practical. Amazing! /s

<comment><USER14> Did you do any testing with a VPN?

When I was visiting someone in Atlanta GA, the speeds weren't good for what they advertised, but once I put on a VPN the speeds almost tripled.

They just have internet through Comcast too, so I was wondering if something was up.

<comment><USER13> From here, a VPN with servers in Toronto yielded speeds of about 8 MB/s max for IDM, uGET, and qBittorrent, which is about 1/2 what non-VPN connections delivered. VPN servers in Netherlands delivered a little less than that.

</comment></comment></comment><comment><USER15> This seems rather anti-competitive. It'd just be a matter of time until Netflix, etc. only run well on the upgraded speed.

Here's hoping someone takes this to the FTC and gets this stopped. I wish I were a little more hopeful.

<comment><USER16> > It'd just be a matter of time until Netflix, etc. only run well on the > upgraded speed

I think you overestimate the bandwidth requirements of Netflix.

I only have a 30 mbps internet connection, and even that's more than enough for Netflix's highest bitrates.

Source: [https://help.netflix.com/en/node/306](https://help.netflix.com/en/node/306)

<comment><USER17> Comcast will throttle traffic from Netflix to well below acceptable levels unless you're on one of their approved plans.

Remember, net neutrality is no longer a thing.

</comment></comment></comment><comment><USER18> I am so, so excited that I will be able to leave Comcast for good in November. Sonic, a local ISP, has been blitz building out fiber in the East Bay Area. Comcast is abusive of their monopoly status in areas and their demise cannot come quickly enough.

<comment><USER19> I switched from Comcast (@ 300 Mb/s) to Sonic (@ 30 Mb/s) just to support them. I really wish Sonic well as they seem to be the last honest ISP left.

<comment><USER20> I also have Sonic in the East Bay, and it has been pricy and disappointing. It is rebranded AT&T FTTN, I'm subscribed to 50mbps but am lucky to get 24mbps @90/mo after associated fees.

Still, its that or non-rebranded AT&T or Comcast with data caps.

</comment></comment></comment><comment><USER21> > Customers with 60Mbps Internet download speeds are being upped to 150Mbps; > 150Mbps subscribers are going to 250Mbps; and 250Mbps subscribers are > getting a raise to 400Mbps or 1Gbps.

I'd be surprised that any regular household would notice being upgraded from 60 to 150Mbps.

<comment><USER22> Unless it's fiber to the home, I doubt there's any difference. I assume they just make up numbers or relax some constraints so you can get "up to" some arbitrary bandwidth, but your latency will still be garbage, you still won't have upload, and you're still sharing the same pipe with your neighborhood.

<comment><USER23> Ya, I went from 100 to 250, and saw no difference. While my old apartment had 30MB fiber, and damn that was fast, way faster.

Its all about consistency, ping and packet loss.

</comment></comment></comment><comment><USER24> If you live in Palo Alto you can get a decent deal on gigabit internet service from Comcast, but it's really hard to actually get (or at least it was when I got it). It took multiple attempts since the phone sales people didn't know what it was.

I wrote up detailed instructions here since there was very little information available online at the time: [https://www.reddit.com/r/bayarea/comments/6xc5e4/bay_area_ge...](https://www.reddit.com/r/bayarea/comments/6xc5e4/bay_area_gets_gigabit_comcast_internet_service/)

<comment><USER25> If you can get it, go with AT&T. It's at least 500mbit up and down for only $80. It rarely ever hits over 800mbit but it's not like you can really know if it's AT&T or the other side (even when doing speedtests).

<comment><USER24> I've lived in three different places around Palo Alto and I've never lived in an area that has non-DSL AT&T - I'm not sure where this actual is available.

<comment><USER25> I'm in San Carlos. Came available last six months.

</comment></comment></comment></comment><comment><USER26> I almost switched to comcast this month since Frontier is charging me ~150 for 150/150 fiber. Asked comcast what their upload speed was in my area and they didn't want to initially tell me, but eventually they said its only ~10mbps. I get faster on my phone so that ended that discussion real fast. They also seemed really confused why I thought 10mbps was too low.

Edit: I'm in the area that would be getting this "new upgrade"

<comment><USER27> I would keep your symmetrical plan. Comcast upload speeds are anemic. I have their "Gigabit" service and while I do get a solid 900+ down, they cap my upstream at 50.

<comment><USER26> Yeah, that's what Im doing until there's a better option. It's sad frontier doesn't want to actually offer symmetrical gig. They've got gig here, but it's only at most 200 up for 300+ a month. Not a very good deal

</comment></comment></comment><comment><USER28> I've noticed the "increased" data speeds are basically just to speedtest.net.

We're paying $75/month for >60MBit (can't remember....) down, but we frequently get less than 6 to amazon and netflix.

I tried to downgrade my service, and they said the lower speed data options (without "blast" in their name) are only for low income customers, despite the fact that they are clearly advertised if I'm logged out.

Also, it is not just us. The average measured speed of comcast connections to netflix is 4mbps in the US. I don't care that they're ranked #1; it is well over an order of magnitude lower than what they advertise: [https://ispspeedindex.netflix.com/country/us/](https://ispspeedindex.netflix.com/country/us/)

I wish we had a decent WISP in Silicon Valley (sonic is through at&t here, so you have to use a crappy at&t router that somehow breaks two-level NAT...)

</comment><comment><USER29> What I'm wonder is if Netflix has explored entering the ISP game. Google experimented with this a bit but has apparently bowed out, but I could see it maybe being a valid direction for someone like Netflix. ISPs are going to keep squeezing customers, and companies alike until something gives, because it's their one leverage point. They've all but lost the battle on cable television, especially as all the major sports leagues have begun their own streaming services. Netflix probably has the market cap to afford the upfront costs of rolling their own fiber, and I'd imagine they'd save millions just from not having to pay the cable companies fees for Fast Lanes.

<comment><USER30> If Google couldn't make it work, and by consequence made the other ISPs raise their defensive shields, why would Netflix try?

</comment></comment><comment><USER31> Honestly I don't think this is that big a deal even though it is a crappy thing for Comcast to do.

Most services that cord-cutters use heavily (Netflix, Hulu, YouTube, etc.) are built to operate normally on LTE connections, where average bandwidth is something like 30Mbps. So 60Mbps is actually fine.

</comment><comment><USER32> Doesn't this violate standard vertical tying laws?

 _" The basic idea is that consumers are harmed by being forced to buy an undesired good (the tied good) in order to purchase a good they actually want (the tying good), and so would prefer that the goods be sold separately. The company doing this bundling may have a significantly large market share so that it may impose the tie on consumers, despite the forces of market competition."_

[https://en.wikipedia.org/wiki/Tying_(commerce)](https://en.wikipedia.org/wiki/Tying_\(commerce\))

</comment><comment><USER33> Not just high speed, I think I originally got the 40 Mbps plan and they made me get TV cable service when I just wanted Internet. I really don't understand why. They said they couldn't offer Internet by itself. The box isn't even plugged in and hasn't been for years.

Everything is handled by a different department by them. I upgraded to the 1 Gbps cable plan and it wasn't just a different plan, it was a different department. They had to take the old modem back and get a new one even though it was already compatible with the newer speeds.

</comment><comment><USER34> Cue the Simpsons meme:

"Am I out of touch? No, it's the cord-cutters who are wrong!"

Stupid tactics like this are only prolonging the inevitable (and signal incredibly poor, visionless management).

</comment><comment><USER35> I know this might be wishful thinking but I'm really hoping that 5G Wireless Technology or Elon's Satellite Internet Technology will be an alternative for people who currently don't have many alternatives and have to use some of these able companies for providers.

</comment><comment><USER36> I have a Comcast cable box sitting in my cupboard in the original packaging. I had to get it as part of a deal to get 300mbps internet for $95/mo (1 year contract). It's going to sit there in the original packaging until I cancel my service and return it, I guess.

<comment><USER37> Check your bill, we found a charge on ours for rental on the also unused box. Took it back to the service center, and removed the charge.

<comment><USER36> I'll check. Thanks for the tip!

</comment></comment></comment><comment><USER38> You'd think they'd want to get the TV price/cost as low as reasonable to fight cable cutters.

<comment><USER16> Alternatively, they should be acknowledging that they're becoming more of an ISP and less of a TV provider, consumers are less interested in traditional TV service, and that they need to adapt in some way.

</comment></comment><comment><USER39> San Jose has AT&T gig fiber for 80 a month, with no cap. Way better deal than Comcast.

</comment><comment><USER40> I pay 19.99 for ~30 Mbps internet only, no TV.</comment>


Two women unlock possible key to HIV vaccine - <AUTHOR> http://www.plusnews.org/Report/96613/SOUTH-AFRICA-Two-women-unlock-possible-key-to-HIV-vaccine <comment><USER2> > SOUTH AFRICA: Two women unlock possible key to HIV vaccine

"Unlock" ... "key"? In this fast-breaking story, another journalist mixes another metaphor.</comment>


Ask HN: What are interesting features of older programming languages? - <AUTHOR> Hey HN!
What are interesting features of old(er) programming languages that haven't made it into mainstream/newer languages?
Unusual control structures, etc.
For example, I find it interesting that Common Lisp is image based, which I haven't seen in any other language except Smalltalk. <comment><USER2> > interesting that Common Lisp is image based

The first Lisp in 1960something was already using images.

</comment><comment><USER3> APL - "notation as a tool of thought"</comment>


We're not going to Venus anytime soon - <AUTHOR> http://www.slate.com/articles/health_and_science/science/2017/12/we_re_not_going_to_venus_anytime_soon.html <comment><USER2> > If Venus ever decides to chill out, it will be millions or billions of years > from now, as a natural process.

Why would Venus cool down? Isn't the sun getting hotter over these timescales?</comment>


San Diego Hacker News Meetup is Tomorrow, 7/30 at 7:30 PM - <AUTHOR> http://cses.ucsd.edu/wiki/index.php/San_Diego_Hacker_News_Meetup#Upcoming_meetups

<comment><USER2> I demand to know whether the 7/30-7:30 thing was intentional or mere coincidence.

<comment><USER3> Historical records show that it's mere coincidence, as we have been consistent with our day of month and time of day. <http://bit.ly/sdhackernews>

I MEAN. It was intentional :)

</comment></comment><comment><USER4> Everyone is welcome, but please note that an RSVP is requested if at all possible: <http://www.facebook.com/event.php?eid=145752418769809> (Previous meetups have been large enough that the coffee shop owner has asked to get an approximate attendance in advance.)

</comment><comment><USER5> Cool, hopefully will make it.

(btw, did anyone else from San Diego attend the YC 'Work at a Startup'? I went: [http://clemesha.org/blog/2010/jun/22/my-experience-at- ycombi...](http://clemesha.org/blog/2010/jun/22/my-experience-at-ycombinator- work-at-a-startup) and would love to talk more about experiences, etc. It was a very cool event.)

<comment><USER3> Hey Alex. I was there at the post-party reception. Hope you'll join us!

</comment></comment><comment><USER6> I would like to make it to one of these, but the timing's always been wrong. Tomorrow our youngest daughter will be eleven days old, so we're a bit preoccupied with her.

</comment><comment><USER7> Is anyone heading up from downtown? I would like to make it but my wheels are in the shop.

</comment><comment><USER8> Sorry I'm not going to be there guys :/ - out of town this weekend.

</comment><comment><USER9> Awesome. I didn't even know we had one of these.</comment>


Open source analog dev breadboard withaudio IO jacks, power, knobs, and bypass - <AUTHOR> https://www.crowdsupply.com/macrofab-inc/fx-development-board <comment><AUTHOR> I just backed these guys. Although it may not seem like it is worth $150, the nice thing it presents a clean breadboard for designing circuit so you don't have to worry about wiring the audio i/o jacks, the power supply, the control knobs, or the bypass. So can focus only on what you care about.</comment>


Possible UFO caught on video (cnn.com video) - <AUTHOR> http://www.cnn.com/video/#/video/us/2009/06/16/dnt.va.ufo.sighting.wavy

<comment><USER2> I don't doubt the video itself (the footage, not the CNN commentary). However, it's quite a hazy circle (wider at one end, almost nonexistent at the other), and it seems to me as though Denna Smith was re-imagining it as something more "perfect" than it actually was.

I saw somebody blow a smoke ring for the first time today, and at first sight it was quite magical. The chances of some smoke from a ride forming a vague ring are much higher than the chances of UFOs (or even super-hi-tech military antigravity planes, one common explanation for these phenomena -- but I think that's unlikely in this case).

</comment><comment><AUTHOR> Does anyone believes in this?</comment>


Thiel to support Trump at RNC Thursday - <AUTHOR> http://www.nytimes.com/2016/07/21/technology/peter-thiels-embrace-of-trump-has-silicon-valley-squirming.html?smprod=nytcore-iphone&smid=nytcore-iphone-share <comment><USER2> Peter has made a huge fortune by seeing things other's did not.

This might be a good idea for people who are staunchly anti republican to reexamine their beliefs and look to see what Peter sees. Here is the current GOP platform if you are interested:

[https://www.gop.com/platform/](https://www.gop.com/platform/)

I mean if Trump is going to be president, and to be honest I can't see it happening, don't you want him surrounded by some incredibly smart people like Thiel that can talk him down from some of his more "bolder" ideas?

The Republican's have some very good platform points they are pursuing. The return of Glass Stegal is the biggest one I can see. There is almost no way I can see the Democrats under Clinton proposing this.

<comment><USER3> How much of that platform can I actually believe? For example, one of their planks is "living within our means." The Republicans have been the party of fiscal discipline my whole life. Yet in that time, Republican administrations have grown the Federal budget deficit, and Democratic administrations have brought it down. Later on they talk about protecting the Fourth Amendment, yet the last Republican administration carried out a huge assault on those rights. Then they talk about supporting the troops, when the last time they had power they got thousands of our troops killed in a fruitless and idiotic invasion. Am I to believe that the party has completely reversed itself on all of these things in eight years?

Much of it is stuff I'm just plain opposed to, of course. "The Continuing Importance of Protecting the Electoral College"? Ridiculous. They go on about the importance of freedom of speech, then they drop this gem: "By whatever legislative method is most feasible, Old Glory should be given legal protection against desecration." So what is the Republican platform, "freedom as long as we like it"? Continuing on, they want to outlaw abortion, encourage coal burning, restrict marriage rights, and preserve our bloated defense budget.

Here's a real gem: "The Internet must be made safe for children.... Current laws on all forms of pornography and obscenity need to be vigorously enforced." How obscenity laws are compatible with their supposed belief in freedom and liberty is beyond me.

Yes, there are some good things in there. But not nearly enough to get me to see past all this stuff above, and a lot of it is just generic platitudes.

(And don't respond to any of this with "but the Democrats...." I don't like them either. Although I dislike them somewhat less.)

</comment></comment><comment><USER4> Thiel is smarter than nearly everyone posting here at HackerNews.

Ideally, this fact would cause people to pause and reflect.

<comment><USER5> Does being "smart" (however you define it) mean that you know the best way to govern? Does it mean you know how to make it happen in the real world? Does it mean you can pull together all the moving parts of a republic to turn ideas into policies? If so, the smartest world leaders would be the best, wouldn't they?

I think Vladimir Putin is one of the smartest world leaders currently. Barack Obama probably is, and it would be contradictory for someone to argue that both he and Peter Thiel are correct about how the US should be governed. Elizabeth Warren and Karl Rove are also both seemingly very intelligent.

Someone took a stab[1][2] at assessing and ranking the smartest presidents, and they're ideologically mixed (from Roosevelt to Reagan).

1\. [http://www.eoht.info/page/Dean+Simonton](http://www.eoht.info/page/Dean+Simonton)

2\. [http://www.acsu.buffalo.edu/~jcampbel/documents/SimontonPres...](http://www.acsu.buffalo.edu/~jcampbel/documents/SimontonPresIQ2006.pdf)

<comment><USER4> _Does being "smart" (however you define it) mean that you know the best way to govern?_

I suspect there is an inverse relationship.

</comment></comment></comment><comment><USER6> Can someone explain this? Mr. Trump doesn't seem very libertarian which is what Thiel identifies with, so why is he supporting him?

Thiel also seems to hold some confusing opinions (not very pro-immigration despite working closely with and benefiting from immigrants such as Elon Musk and Max Levchin).

<comment><USER7> He probably thinks a Trump administration will be better for him than a Clinton administration. It's pretty much down to those two.

It's also an opportunity for him to raise his own profile in political circles.

</comment></comment><comment><USER8> As he should. Democrats and big business are leading us down an orwellian rabbit hole (with the help of two Bush presidencies), but Rebulicans and Libertarians are still the two parties of principle and debate.

All the Democrats care about is power. Witness the shadiness with which Democrats forced Hillary as the nominee and then let her get off when she obviously broke the law and had been lying about it for a year.

When a group wants power _that bad_ it's my job as an American citizen to keep them out of power.

<comment><USER3> The Republicans just officially nominated a twice-divorced guy with no consistent positions on anything and no political experience, who has threatened to jail women who get abortions and blatantly violate the constitution by imposing religious tests on immigrants, on the basis that he's the guy to advance their platform of family values and freedom.

And I'm supposed to believe that they're a party of _principle?_

<comment><USER8> Hmm... I'm not granting anything in your post because there are a number o inaccuracies... But...

The level of debate that existed during the primaries, that continues to exist inside the party, the discussion of supporting a 3rd party candidate (in this case libertarian) is all centered around principles and positions.

Meanwhile, the complete lack of candidates, let alone debate among the democrats during the primary, the fait accompli of nominating Hillary, the complete disinterest in holding her accountable for breaking the law and putting national security at risk.... This is all centered around power.

<comment><USER3> What inaccuracies? I can accept that "no consistent positions on anything" is probably going to be debated, but the rest seems pretty much factual as far as I know.

If the result was this guy, does it even matter if the primary debates were centered around principles?

I'm not commenting on the Democrats here, so the nature of their process is not really relevant. I am not arguing for them in any way, and will cast my vote in that direction only with great reluctance.

</comment></comment></comment></comment><comment><USER9> It's a shame because if people like him actually got behind the Libertarian party this year Johnson actually has a real chance to win. I know there are a lot of people here who will say a third party can never win but this is a perfect storm of opportunity if the party can raise enough to stay in the public eye.

</comment><comment><USER10> He's probably looking for an exit for Palantir. You know, making America safe again :)

</comment><comment><USER11> ... Aaand, thread is downmodded.

<comment><USER12> Users flagged it.

Thiel is mostly on topic here, of course, but Trump is mostly off topic, so there's a tradeoff. I don't think HN gets better if we resolve that in favor of more arguing about Trump.

<comment><USER11> Fair. Just noticed it , because i couldnt find it.</comment></comment></comment>


Signal, Not Solution: Notes on Why Sci-Hub Is Not Opening Access - <AUTHOR> https://thewinnower.com/papers/3489-signal-not-solution-notes-on-why-sci-hub-will-not-open-access <comment><USER2> I use sci-hub all the time, because my institution has a limited library. The entire argument here is a red herring.

Sci-hub is a solution that complements open access, for the transitory period after which we expect big publishers to die off. Of course it's illegal, just like it is immoral for scientists around the world to use their taxpayer's money and their time to pay three big publishers, NPG, elsevier and spiegel.

This is pure civil disobedience of the noble kind.</comment>


Ask HN: What should be my next programming language? - <AUTHOR>

I am trying to decide what programming language to learn next. Couldn't think of a better place than HN to ask for recommendations and start discussions about programming languages.
I've worked on ruby/rails for over a year, so that's the language I'm most comfortable with, but these days I work on C and PL/SQL. I'm trying to pick up a language that's very different from the ones I've worked with. Here are the languages I'm considering:
Erlang/Haskell/Common Lisp: Understanding functional programming would be a challenge, coming from ruby's object oriented world and these languages seem the top contenders in that category.
Scala: It's has both object-oriented and functional features, so will it be easier to catch up with functional programming in Scala than with a purely functional language like Haskell?
Smalltalk: It would be fun to learn a language that's been around for over three decades and has had so much influence on the design of other languages.
Any other language? Clojure? Go? Brainfk? ;-) Tell me what language you think would be most interesting to learn and why you recommend it? <comment><USER2> I vote for haskell. There are a couple of great online resources for free[1], and if you are at all like me, you'll benefit immensely from it, even though you never use it directly. Basically it is so weird that you have to learn new ways to think. The cool thing is those weird things end up being applicable in boring ruby/python/c type situations. Also, you start wishing everything had a badass type system, because you start seeing problems that could easily be solved by codifying them to ADTs and letting the type system sort out the rest.

1\. Learn you a haskell for Great Good -- <http://learnyouahaskell.com/>

Real World Haskell -- <http://www.realworldhaskell.org/>

<comment><AUTHOR> I've taken a look at those resources. In fact, I even read a bit of Learn You a Haskell and tried writing some code.

And yes, I am not looking for a language that I will use on a daily basis. If I wanted to build something now, I will pick ruby because that's the language I know best. Instead, I'd rather learn a language that makes me write code differently.

Thanks for the advice. :)

</comment></comment><comment><USER3> If I decide to pick up a new language, it'll probably be Scala. My only real reasoning for that is because the language is younger, which just seems more exciting. Now, if I could just find time or a reason to start using Scala then that would be awesome. :)

<comment><AUTHOR> Yeah, Scala looks exciting, and from what little I've seen of its syntax, it looks different enough to be interesting. Plus there's an excellent online book that I could use to get started with it.

<comment><USER4> Scala also hits the sweet spot of both new but usable in production. Linkedin, Foursquare, and Twitter all have significant portions of their apps written in Scala.

I'd be a little more hesitant about creating a production app with Haskell, though it's been done.

</comment></comment></comment><comment><USER5> I'd recommend Clojure for two reasons: You'll get experience with functional programming, and you'll be introduced to the JVM at the same time. If you learn Clojure and later want to learn another JVM language, you'll be halfway there.

<comment><AUTHOR> My past attempts at understanding Clojure have failed badly. (I must say I didn't try that hard, though.) Would a foundation in Lisp make it easier to learn Clojure?

<comment><USER5> Nah. Find a good book though, like _The Joy of Clojure_ or _Programming Clojure_ to get you through the fundamental bits.

</comment></comment></comment><comment><USER6> I picked up Erlang a couple of years ago because I needed to hack on a Jabber server. Never mind the functional aspect; Erlang stands out for concurrency, distribution, and fault tolerance. Several of my Erlang projects have been running, at scale, trouble-free for months. I get a kick out of never getting service alerts.

Lisp is another good answer to your question. It's different. And the cliché is true: even if you never use it, your coding will improve if you understand Lisp. (Land of Lisp is a fine primer.)

However, with Erlang it has been much easier to find actual projects to do.

<comment><AUTHOR> Thanks for the recommendations. A lot of people are suggesting different functional programming languages here -- Erlang, Clojure, Haskell, Scala and Lisp. I'm becoming more and more interested in learning Lisp before trying the other languages. What do you think of such an approach? Would it help me understand Erlang/Haskell/Clojure/Scala better in the future?

<comment><USER6> I am just now getting into Lisp so I can't say how learning it would affect subsequent language exploration. Functional programming is good but if it's the most interesting part of any language, that would be a boring language. Erlang's functional style and pattern matching syntax were novel but the immutable bindings, process spawning, and message passing made it interesting to me. In Lisp, I am interested in S-expressions and macros (and wishing it had those other Erlangly bits I mentioned!).

</comment></comment></comment><comment><USER7> Factor, it is a stack based language that is fairly different from the rest of the stack based languages(it counts lisp as one of its major influences. ) It has a good standard library that includes both a web framework and a GUI framework.

</comment><comment><USER8> Other than the language being different, what are your goals in learning a new language?

<comment><AUTHOR> The main reason I'm looking for a new language to learn is so that I could understand programming concepts better. I took up electronics in college and then moved to software development, so my foundation in programming isn't very good. That's what I'm trying to change.

<comment><USER8> I also had three years of electical/electronics in college before I started programming. I have been a java developer for eleven years and just recently started programming in groovy. Both of these are native to the jvm and have extensive apis for client and web programming. The grails framework which harnesses the power of groovy, spring framework, and hibernate is like rails in concept but it is its own. If I didn't know these languages, this would be my next move.

<comment><AUTHOR> Please correct me if I am wrong here, but isn't Groovy/Grails too similar to Ruby/Rails and Python/Django to make it much of a challenge to learn it? How different is it from Ruby or Python?

</comment></comment></comment></comment><comment><USER9> Have you think about learning how to write your own programming language. It would give you a deep understanding in topics that would make you appreciate other languages.

If you do the exercises till the metacircular evaluator in SICP book it will teach you Lisp and about how to develop a naive lisp-1 interpreter. Its a great exercise.

<comment><AUTHOR> I've wanted to read the SICP book, but do you think the book may be too advanced for someone who knows next to nothing about Lisp and functional languages?

<comment><USER9> I think is ok, if you already know how to program. The SICP book is not the easiest book ever, but is also not that complicate. SICP teach you many things, not only lisp. YOu can also follow the lectures in the MIT open course web[1].

If you dont feel comfortable with the SICP book (many people dont like it), you can start with How to Design Programs(HTDP)[2]. It teach scheme/racket, and is one of the better books to teach programming that I've seen, and the people in the mailing list and irc channel are very friendly.

The good thing is that both of them are free[3], so you can take a look and see if the fit your expectations.

[1] [http://ocw.mit.edu/courses/electrical-engineering-and- comput...](http://ocw.mit.edu/courses/electrical-engineering-and-computer- science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/)

[2] <http://www.htdp.org/2003-09-26/Book/>

[3] <http://mitpress.mit.edu/sicp/full-text/book/book.html>

<comment><AUTHOR> Thanks for the advice. I'll take a look at both of them and choose the one I'm more comfortable with. Both the books look quite interesting.

</comment></comment></comment></comment><comment><USER10> Learn a dependent-typed programming language like Agda or Epigram or Coq.

<comment><AUTHOR> To be honest, I had to Google those names to find what the languages were like. :) Those are definitely going into the list of languages I would like to take another look at some day.

</comment></comment><comment><USER11> I'm going to try RoR, I hear it is a lot of fun, and as a programmer I want to have fun with my work :)

<comment><AUTHOR> Yeah, developing applications with ruby and rails is a lot of fun. It's easy to pick up the language, and once you know the basics of rails, building complex web apps becomes incredibly easy.</comment></comment>


Google Chrome Beta Now Supports C/C++ - <AUTHOR> http://www.readwriteweb.com/cloud/2011/08/google-officially-announces-cc.php <comment><USER2> A four day old story that is a re-wording of the Google blog post but with errors added in.

How the hell does this get voted up?

<comment><AUTHOR> I searched before posting[1] and didn't see anything relevant, so I posted the story.

In retrospect I should have posted the original link from the chrome blog. I see someone has already dug the original out and posted it[2].

Anyway, the four day old story never made it onto HN to begin with, so that's not a valid complaint.

[1] [http://www.hnsearch.com/search#request/all&q=chrome+c%2B...](http://www.hnsearch.com/search#request/all&q=chrome+c%2B%2B) [2] <http://news.ycombinator.com/item?id=2881946>

</comment></comment><comment><USER3> In case anyone's interested, here's the original story:

[http://chrome.blogspot.com/2011/08/building-better-web- apps-...](http://chrome.blogspot.com/2011/08/building-better-web-apps-with- new.html)

</comment><comment><USER4> A big challenge will be cross-browser support and last time I checked (March), Mozilla said that they're 'not excited by it'. Source: [http://www.gdcvault.com/play/1014716/Emerging- Technologies-R...](http://www.gdcvault.com/play/1014716/Emerging-Technologies- Review-SOGS-Tech) [~46min]

</comment><comment><USER5> Yuck. ActiveX, just sandboxed and without COM weirdness. The very imagination that someday we'll see «this website requires x86-64» makes me shiver.

The article is weird, too. NaCl does not run C (or C++ or whatever) code, it runs native code. C was mentioned as just an example ("... like C or C++ ...").

</comment><comment><USER6> Running C code in the browser... what could possibly go wrong?</comment>


Modern Books for Revolutionizing Your Life - <AUTHOR> https://joebalcom.blog/2020/07/16/11-modern-books-for-revolutionizing-your-life/ <comment><USER2> I see a Tony Robbins book listed here. I know very little about him, and find it hard to get a dispassionate description about who he is, what he does, and why I should/shouldn't get to know his work better.

</comment><comment><USER3> Book links are Amazon affiliate links (tag balcomjoe-20).</comment>


Construction Zones on the Ethernet Roadmap - <AUTHOR> http://www.nextplatform.com/2016/03/24/construction-zones-ethernet-roadmap/ <comment><USER2> I find it pretty depressing that faster ethernet is not migrating to SOHO environments. Everybody and his brother wants to sell you wireless hardware that is allegedly faster. I have been looking at upgrading to 10G ethernet but the economics are still awful and following an entirely different trajectory than new speeds did in the past.</comment>


Facebook users say yes to changes - <AUTHOR> http://news.bbc.co.uk/2/hi/technology/8016532.stm

<comment><AUTHOR> As I understand it the title - quoted directly from the BBC - is misleading. The changes voted for are those that "return" control of content to users. The changes originally imposed by Facbook took that control away from them. Either the BBC is being breathtakingly ignorant of what the fuss was about, or deliberately misleading in its construction of its headline.

Either way, allegedly the voting is being audited externally. Can we trust them?</comment>


Needora . Get what you need. Sell what your don't - <AUTHOR> https://www.needora.com <comment><USER2> How it is different than local craigslist?

<comment><AUTHOR> Hi! Needora is a reverse marketplace, it's focused on having people post what they need to buy, and sellers, rather than posting what they need to sell, they can proactively search if there is someone who already is needing their product. Thanks for asking and let me know if you want more information. You can see this video to know more about needora: [https://vimeo.com/167479865](https://vimeo.com/167479865)</comment></comment>


ProofCheck: Checking Mathematical Proofs written in TeX - <AUTHOR> http://pyvideo.org/video/732/31-proofcheck-checking-mathematical-proofs-writ

<comment><USER2> It sounds promising, but it is hard to see how this would be useful on something that is anything above basic.</comment>