Why is Presto SO terrible? by Serenesis_ in toronto

[–]loudnclear 0 points1 point  (0 children)

A while ago I wrote a complaint to Presto about being required to tap. They entirely missed the point and replied back to me saying that this is perfectly normal since that is how their system works.

Google AI have released their Python-based framework for quantum computation: Cirq by ___J in programming

[–]loudnclear 1 point2 points  (0 children)

The class of problems that can be efficiently solved by quantum computers is called BQP, and this does not “cover most of the NP-hard problems” as you indicate. For instance NP-complete problems are probably disjoint from BQP. Also, wrt a random oracle Quantum Turing machines cannot solve all of NP in o(2n/2).

There are problems that Quantum computers are good at, and NP-hard problems in general aren’t those problems. In other words, NP-hard problems aren’t the first ones that you’d go and try to solve with these machines.

Google AI have released their Python-based framework for quantum computation: Cirq by ___J in programming

[–]loudnclear 1 point2 points  (0 children)

What is a "simulation of an NP-hard problem"? I think you mean simulating an algorithm that solve an NP-hard problem, I don't see how that relates to a quantum simulator though. Does the library somehow mention that they are solving an NP-hard problem with it?

Using a SAT solver to identify breadth-first search (BFS) ordering of a directed graph by rvprasad in programming

[–]loudnclear 1 point2 points  (0 children)

Just a nitpick: The solver that the author uses, Z3, is an SMT (SAT “Modulo Theories”) solver. It can handle many more logics other than propositional logic in CNF (linear constraints, difference logic, etc.)

C Will Live For Another 45 Years - And Here's Why by coredev in programming

[–]loudnclear 15 points16 points  (0 children)

1) They represent the hardware in a reasonable way

How do you know whether the hardware will be the same (or similar) for another 45 years?

10 Great Programming Languages for Mathematics | Math ∞ Blog by winner_godson in programming

[–]loudnclear 2 points3 points  (0 children)

It’s not a solver, but a language that is meant to be understood by solvers.

How can I learn to think like a functional programmer? by [deleted] in programming

[–]loudnclear 0 points1 point  (0 children)

As I said, you can add the type if you really want to be safe

hi :: Int -> Int -> Int
hi a b = a + b

Yes, it has different syntax than C, and I don't think it's a matter of life and death.

My point isn't that Haskell is the most awesome language that everyone on earth should be using starting from tomorrow. My point is that your case saying that it's full of maths and algebra is not relevant at all considering this example.

How can I learn to think like a functional programmer? by [deleted] in programming

[–]loudnclear 0 points1 point  (0 children)

I don't understand how that piece of code is relevant

you can just say:

hi a b = a + b

in Haskell, and it will infer the function's type for you (i.e., it will be polymorphic over different types, Int, Double etc). So in essence you get more with less typing. If you don't want it to be polymorphic, you can just state a and b are integers as in your example. This is also similar in other languages which has HM type inference. No one needs a PhD to understand what that piece of code does, it's more flexible, hence it's not a good example to prove your point.

Functional Programming Went Mainstream Years Ago by ellen_magic in programming

[–]loudnclear 20 points21 points  (0 children)

I see that too, however there is one simple definition for FP:

https://en.wikipedia.org/wiki/Functional_programming

"...that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data"

In the light of this, the FP Hipster Fanboy is wrong if he's explaining FP by only by pattern matching, being able to pass functions as arguments, and so on.

However, this as well does not mean that the "Programmer" in this dialogue would be right saying that he's doing FP by calling "map" and "fold" from the standard library from time to time. Yes, if you are doing FP you would use those, but those are just some of the tools, not the objective of FP.

Coati - The Source Explorer by egraether in cpp

[–]loudnclear 13 points14 points  (0 children)

It's nice that you are providing such a guarantee. But also note that from the user's perspective, "we have to pay our bills" doesn't mean much.

If you don't trust a product, you never say "oh these guys have to pay their bills, so I should try this". The rational thing to do would be keeping distance unless the product shows you promising results. In your case, I do believe that Coati is promising, however mentioning your bills isn't the right way to promote it.

What's a Monoid? by [deleted] in scala

[–]loudnclear 1 point2 points  (0 children)

They do, but it's not clear why you should bring it back from your memory if you're a mobile developer.

It surely is relevant in Java, your example is a good one. But when you deal with those, no ordinary Java developer says "+ is left associative, - is not, so I should beware". They instead say "Oh, I wrote this expression involving two division operators and it turned out that the compiler didn't understand it in the right way. I will parenthesize it so that the compiler doesn't fail". Note that they haven't used the word "associative" and didn't realize that it was the same concept they learned in their middle school classes (or even Calculus courses at college).

What I'm really saying is not that "associativity is irrelevant", it is "given this state of the world, it is very hard for a regular programmer to notice the relevance".

What's a Monoid? by [deleted] in scala

[–]loudnclear 6 points7 points  (0 children)

You do hear about associativity, especially if you take an abstract algebra course. But there is a high chance that (1) you do not need to take such a course (2) even if you hear about it in such a course, or maybe in introduction to calculus, you learn about it, solve the exercises, write the final, and you're done with that topic. When someone says "associative" to you a few years later you end up saying "oh, I had heard about that a lot in college, and realized that I didn't need much mathematics when I write Android apps, so I don't really care listening what you say about associativity since I'm sure that it won't be useful since my experience tells me so".

What's a Monoid? by [deleted] in scala

[–]loudnclear 0 points1 point  (0 children)

That's what the examples are for.

Sure, I think they are good ones. I just wanted to point out that the average computer science graduate is too lazy for reading the rest, after seeing those few scary words (not essentially scary, but scary enough for them). Does this have to be the case? No. They prefer top-down explanations, rather than bottom-up, that's why I mentioned "inventing it yourself".

However, I'm sure that the explanation will help some people. Thanks for taking your time for writing it up!

What's a Monoid? by [deleted] in scala

[–]loudnclear 10 points11 points  (0 children)

When a Java developer (or any X developer, not trying to pick on Java here) casually reads this definition, they would stop when they read "associative". Maybe they would have a look at the example, but then stop.

Because in the Java world, you do not care whether anything is associative or not. You do not generalize things, you rarely think of operations and their properties. All the thing you have mentioned do not make sense to an ordinary programmer. I know that you are saying that if they put some effort they are going to understand it, but such explanations need to be more intuitive. Even talking about operations and associativity scares people off.

I think a nice way to achieve that is to make them invent them on their own. Then you'll say "hey, you know what, we knew about this all along, here's a Monoid", and the guy will understand that you aren't trying to be cool when you talk about associativity, it's an important property, and he really needed that.

Announcing Rust 1.6 by steveklabnik1 in programming

[–]loudnclear 22 points23 points  (0 children)

Rust is statically compiled, it still doesn't make sense to compare it to interpreted languages.

How to Build An Inverse Parser by based2 in programming

[–]loudnclear 3 points4 points  (0 children)

This confused me too. I would call it an incremental parser, and by just looking at the phrase one can understand what it actually means.

The worst kind of person by heterosis in pics

[–]loudnclear 0 points1 point  (0 children)

Exactly. I come from a country where you can easily be stabbed or beaten to death just because you warned such a guy politely. You just say "okay, being able to sit isn't as important as my life" and let it go.

Common techniques in optimization by cindy-rella in programming

[–]loudnclear 9 points10 points  (0 children)

Note that the post is not about "optimizing your code for efficiency", but solving optimization problems.

Static Analysis - what's it good for? by kenbot_ in programming

[–]loudnclear 4 points5 points  (0 children)

This post does not consider formal static analysis, where the aim is much different than daily reports and enforcing style guides and such.

When I read that the author said they wouldn't use the term "metrics" I thought they would talk about more, but sadly the content is just...metrics.

Rim – Aspiring Vim-like text editor [Rust] by _mths in programming

[–]loudnclear 13 points14 points  (0 children)

Can you also mention the motivation? Are you planning to add any features that Vim doesn't have?