Recent submissions

Comment · 4 years ago
I mainly use three different pans: 1) A carbon steel wok 2) A cast iron skillet 3) A dutch oven.

The wok is very versatile. I use it for most things by default.

The skillet is great for pan frying.

The dutch oven is great for braising without me stirring it too often.

Cast iron is situational because it has large heat opacity: you can think of it as a pizza stone for pan frying.

The advantage is you can compensate by long preheating if your stove is inferior.

The disadvantage is it's slow to respond: When you turn to high it delays a while, when you want to lower the temperature you still need to wait.

Comment · 4 years ago
This is my favorite book!

But I think it could be more straight forward if the first interpreter didn't use Java, but a modern main stream language that can avoid code generation and Visitor Pattern. Those parts feels like unnecessary detour.

Comment · 4 years ago
> You want to sell Javascript based solutions, go for it. But don’t push this nonsense like “No language like Javascript”. The only reason Javascript has a wider adoption than others is that it’s forced upon us.

It is forced upon us doesn't mean it can't be universal. On the contrary, it usually is. It's like how USD is kinda forced around the world but it's universal nonetheless.

Comment · 4 years ago
Thank you, GitHub, this is one of the best things!

No, it cannot make me write code I couldn't write before. It does not autopilot and does all the coding by itself. But it still boosts my productivity greatly, making me relaxed while coding and focusing on the important part rather than errands.

Comment · 4 years ago
> A simulation of a brain cannot produce consciousness any more than a simulation of the weather can produce rain.

What's wrong with the rain though? A perfect simulation of rain is perfect rain. It's not rain in the outside world but it's perfect rain nonetheless.

A perfect simulation of brain is a brain. It has consciousness, it can think, it can suffer, and you can exchange information with it if you want.

Comment · 4 years ago
Me: dynamic -> static

What did I feel during the transition: Feel like an insulted because of the under-expressiveness. Everyday I find some ideas that are natural to me and non-tech people couldn't be codified directly.

Although statically typed languages are getting better each year, I still think there's a trade-off among three camps:

1. Dynamic (Ruby, JavaScript)

2. Under-expressive static (Java, C#)

3. Expressive static (Scala, TypeScript)

I worked on a full-stack project and people have different backgrounds and have to switch from time to time, here's my impression:

- Most "underexpressive-static -> dynamic" people hate dynamic programming, because they mostly lose typing for nothing - they usually don't leverage the expressiveness because that is how they were coding all along.

- Some "dynamic -> underexpressive-static" people liked the discipline, while some hated the under-expressiveness, it depends.

- The "Expressive static" was the new thing. Everybody need to learn some part. Usually, there's a learning curve, some people like the challenge while some people hate it. That also depends on how steep the curve is (TypeScript is very smooth but not Scala).

Even though I think it's still trade-off, I can see the balance is shifting toward the "expressive static" camp:

- People get more familiar when they're exposed to the concepts. Higher-order functions like map/filter/reduce were considered exotic in the 90s, but now they're everywhere. Monadic-like programming like Promise or Optional is also popularized, they're not hard at all once "everybody else" learned that. Advanced type systems are no different.

- Language creators have more experience in choosing trade-offs that makes sense. Scala was getting a bad rap during its day, but Kotlin didn't. In other words, the creators are getting better at spending their "novelty budgets"[0] to yield optimal results.

P.S. I still couldn't wrap my head that Dart spent NO "novelty budget" whatsoever... They have zero chance against TypeScript if there was no Flutter or other Google platforms that use Dart.

[0] https://shimweasel.com/2018/08/25/novelty-budgets

Comment · 4 years ago
The problem is there are no sane in-between options.

On one end of the spectrum are either neat platforms like Heroku or Vercel or ssh and bear-metal with simple scripts.

On the other end of the spectrum, we have Kubernetes.

Everything in between:

- The learning curve is much steeper than Heroku and Vercel

- The skill is not likely to transfer to the next job

- The ecosystem is not as complete as Kubernetes

Most mid-sized companies went for Kubernetes because the in-betweens are not very optimal and need to take some risks on betting them.

Comment · 4 years ago
> Static Typing reduces bugs.

This matches my experience. People say otherwise might need to put more effort on writing better tests.

That said static typing usually catch minor problems like typo faster. But for dynamic typing it's going to catch by tests a bit later. But usually tests run faster with dynamic languages, so it's a tradeoff.

My favorite approach is the mixed approach like TypeScript:

1. Faster feedback loops: Usually statically typed languages compiles slower thus slower feedback loops. But languages like TypeScript can skip type check and emit only to the runtime, making test watcher very fast - as soon as I hitting Cmd-S I can see the result.

2. Optional typing: Sometimes a function signature is going to be 10x larger than the body, which is really a hassle. Sometimes I just skip them, or skip typing module private functions as long as it's properly tested.

Comment · 4 years ago
Comment · 4 years ago
This. I find open source projects written in Go or Rust are usually more pleasant to work with than Java, Django or Rails, etc. They have less clunky dependencies, are less resource-hungry, and can ship with single executables which make people's life much easier.

Just think about Gitea vs GitLab.

Comment · 4 years ago
You can't. You trade a crypto coin on the market and you have a price.

The price is hugely affected by how many people in the whole world believe it's a decent currency.

Comment · 4 years ago
Anecdote: I live in Asia, and when I was in middle school, AFAIR there were only 3 people (out of 40-ish) don't wear glasses including me.

Parents nowadays blame screens for short-sightedness, but the truth is back then my classmates are almost all doing reading and writing all the time, and nobody was using screens (Symbian Nokia only took off years later).

It's only me and the other two boys who spend all the time and money on online video games - the other two guys were almost score zero in every single exam.

Comment · 4 years ago
I agree what you're saying, but they were talking about Python and TypeScript - it doesn't make sense to bring up type erasure in this context.
Comment · 4 years ago
> It strips type info and runs it as Javascript, though. There's no native typescript runtime, AFAIK (it doesn't enforce types at runtime, only at build time)

Java strips type info and runs it as JVM byte codes. There's no native Java runtime, AFAIK(it doesn't enforce types at runtime, only at build time).

What's the problem?

Comment · 4 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton