Better HN
topnewbestaskshowjobs
Log inSign up

simplify

2,061 karma · joined May 24, 2009 (17y ago) · 911 submissions

Submissions

comment 9y ago · link · parent

If you haven't thought much about type systems but want to understand what the big deal is, I wrote a post specifically for you [1]. It draws motivation for wanting a good static type system from first principles.

[1] https://gilbert.ghost.io/type-systems-for-beginners-an-intro...

comment 9y ago · link · parent

How do you normally handle those unknowns?

comment 9y ago · link · parent

I don't follow. What do you mean?

comment 9y ago · link · parent

It's the responsibility of the writer to connect the dots on why it's wrong, not the reader. Throwing out a blanket statement like "it's wrong" and expecting your audience to figure out why (or not and simply agree, since that would be more convenient) is poor communication at best, and intellectually lazy at worst.

comment 9y ago · link · parent

If the hate were towards a person, I would completely agree with you. But OP is only hating JavaScript-the-tool, so I have no contempt towards his opinion.

In contrast, if OP were hating on JavaScript programmers, then your indignation would be completely justified. But he's not, and I admit to holding a similar position: I hate C++ and prefer to never lay eyes on it again, but I have nothing against C++ programmers :) The difference between C++ and JS is C++ is less forced upon someone's career as the only language to work with.

comment 9y ago · link · parent

Try to be more charitable by seeing it from their point of view. Imagine being used to a language that helps you be rapidly productive and shields you from a huge catalog of mistakes. But one day you're forced to use JavaScript, and suddenly you've got nothing. It'd be like driving in a doorless jeep with no seatbelts on a high rise highway with no guard rails. Sure you can do what you want, and even in some nice, clever ways. But there are so many ways to hurt yourself, and no natural protections to prevent it.

To put it another way, it's like throwing a frontend developer into the world of C. Suddenly you have to be aware of and correctly manage your memory explicitly, whereas before you were safely protected from having to think about it.

Lastly, not everyone can voice their opinions so well. Communication is a difficult thing, and understanding what you're trying to communicate more so. If someone says they hate something, it's not always baseless. Instead of jumping to name-calling, have more patience in trying to understand why.

comment 9y ago · link · parent

Sorry dude, I'm going to have to step in; you're being too strong in your counter attitude. I've been writing and teaching JavaScript professionally for many years, and while I don't hate the language, I don't blame those who do. After learning and using a statically typed language, it becomes absurd how much effort you have to put in to debug a JavaScript type error – a problem that is amplified by the language design.

What happens when you add 1 + undefined? Other dynamic languages make the sane choice of throwing an error immediately. JavaScript, however, silently gives you back NaN and continues chugging along. By the time a "real" error happens, you're stack traces away from the cause.

What happens when you call a function f with one argument when it expects two? Other languages would throw immediately. Instead, JavaScript silently sweeps in an undefined and continues chugging along. Combine that with the other flaw I mentioned, and your runtime error will, again, be distant from the true cause.

There's a reason TypeScript is getting insanely popular. It's the only way to code large JavaScript projects and stay sane.

comment 9y ago · link · parent

How does this compare to Azure Cosmos DB?

comment 9y ago · link · parent

Practice, or mentally inhibited. Either way Lehrer's response is a selfish and horrid thing to say, as it attacks those who are already unable to defend themselves (can't communicate).

comment 9y ago · link · parent

If you don't mind, could you explain how Pharo and Glamor fit together?

comment 9y ago · link · parent

It's also going to make the name ReasonML even more confusing, considering you can apply the word "Reason" to machine learning...

comment 9y ago · link · parent

What's the difference between this newer iPad pro and the original iPad pro?

comment 9y ago · link · parent

Check out node-red[1], a visual language for creating node apps. It's a good demonstration of the potential of visual-based languages (but it's also far from that potential).

[1] https://www.youtube.com/watch?v=f5o4tIz2Zzc

comment 9y ago · link · parent

You're complaining in ignorance. Type systems – especially TypeScript's – does not weigh you down as one might remember Java's does. It's there to help you prevent mistakes and ease refactoring. You're free to ignore as much as you want to.

comment 9y ago · link · parent

By "oldie" function, do you mean functions that expect node-style callbacks?

  e.g. function myCallback (err, result) {...}

comment 9y ago · link · parent

Phoenix/Elixir can handle 2 million websocket connections on a single box. I would agree myself :)

http://www.phoenixframework.org/blog/the-road-to-2-million-w...

comment 9y ago · link · parent

Very nice. The levels are well-designed from a game design perspective, too.

comment 9y ago · link · parent

Did he say "silver bullet language"? It seemed like a good fit for his use case; I don't see him claiming anything more than that.

comment 9y ago · link · parent

If you squash merge into master, it's much easier to revert it later if something goes horribly wrong.

comment 9y ago · link · parent

FWIW, my side project[1] takes the opposite approach: start with a bare minimum project structure, and add pieces on top via a cli. So, for example, instead of starting with Flow by default and having to rip it out for TypeScript, you start with neither, and can run `pult add typescript` if you need to.

[1] https://github.com/Concatapult/pult

comment 9y ago · link · parent

There isn't. I said it was one of many answers, didn't I?

comment 9y ago · link · parent

Ah, but it does change. Given that big bang theory tells us the universe has a beginning, it's not unreasonable to think that something greater than the universe must have created it. One might be curious to see the intentions of this being, if possible :)

comment 9y ago · link · parent

It only covers it so far. A simple "what caused the big bang?" question brings us back to square one.

comment 9y ago · link · parent

I remember trying to learn continuations during my CS degree, and evidently even today I still don't understand them. The examples don't seem to help either – how exactly does the control flow function?

comment 9y ago · link · parent

Who could answer? If a being created time and space, we, constrained within that time and space, might not have the capacity to imagine what it's like exist outside of them, only that, as the creator, it is possible.

comment 9y ago · link · parent

The modern, rational perspective has not answered the question of "how did we get here?". A divine creator is one of many proposed answers to this ancient question.

comment 9y ago · link · parent

That's incredibly easier said than done, especially from a cozy armchair. Have you not heard of Stockholm syndrome? Situations like this are not so cut and dry.

comment 9y ago · link · parent

Certainly, I didn't mean to go so far as to say what we can see and touch might not be real. As far as I'm concerned, that's covered in the "common observances" I mentioned in my previous comment.

The "truths" I was referring to are things we can't verify ourselves (due to practicality or lack of knowledge), yet are commonly believed or taken for granted. Some examples:

- World maps

- Authorship (of music, books, etc.)

- Photos (see #bowwowchallenge for a good laugh)

- News

- The immutability of physics :)

comment 9y ago · link · parent

Ah, but then you get into the trouble of what "highly likely" means :) Outside of common observances, the "truths" that we know are only known because they happened to be spread by society – much like how DNS works.

Here's a thought experiment. The government has assisted in pushing the idea of "eggs are bad for you" for decades. In effect, many people truly believe that "eggs are bad for you" is a fact. If you, being slightly more knowledgable in the subject, tell one of those people that this is a load of bollox, and have a paper to back it up... would you actually convince them? You'd be one voice against many; a rebel against history. If you did managed to convince them, would it be due to raw truth, or due to the effectiveness of your rhetoric?

comment 9y ago · link · parent

Follower of Christ here. The short answer is, you can't trust anything. Science is neutral and good because, if true, you can reproduce and see for yourself. The problem is, you can't trust the reporting. I see science-related reports the same way I see political reports – bias with an incentive to lie.

If I were well-versed enough to read the white papers, I would probably trust it a little more. But even then you can't be certain unless you perform the experiment yourself; it's not uncommon for scientists to leave out inconvenient data to get the result they want.

Such is the state of this world – you can't truly know a fact for a fact unless you actually see it for yourself. And even then there's room for doubt :)

1
222324
31