Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wtetzner
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
38 ms
·
571.
▲
by
wtetzner
4y ago
> is it possible to be in a caloric deficit and still gain weight if this is true? No, that would defy the laws of thermodynamics. However, it is possible to consume more calories than you burn and lose weight, because there are comple
572.
▲
by
wtetzner
4y ago
> until you need cyclic references and have to use Rc<> or Refcell<> which means you can have memleaks. Memory leaks are not unsafe.
573.
▲
by
wtetzner
4y ago
Even without input lag, having to look at a screen to press a button is much more distracting than a physical button that can be found without looking.
574.
▲
by
wtetzner
4y ago
I’m not sure that optimizing readability for someone unfamiliar with the language is the right tradeoff. Rust code uses a Result<T, E> type for error handling: it can either be Ok(T) or Err(E), never both. The question mark operator t
575.
▲
by
wtetzner
4y ago
You could still have a restart "from scratch" feature in the OS. But persistent RAM could potentially mean the power dropping for a few seconds means you don't lose your session.
576.
▲
by
wtetzner
4y ago
The reason for JavaScript being so successful though is not really that interesting.
577.
▲
by
wtetzner
4y ago
Sure, but I guess my point is that it's not clear that going against the wishes of your employer is what's morally right.
578.
▲
by
wtetzner
4y ago
I'm not saying you should just do random refactorings. What I am saying is that if you are fixing something, and realize that you can fix it while improving the code at the same time, it is typically worth it. Obviously if the refactor
579.
▲
by
wtetzner
4y ago
Yes, it's all of the things you mentioned. I just meant that it's odd someone would go out of their way to write a comment like this, especially when the original post says it's just for fun/practice.
580.
▲
by
wtetzner
4y ago
I don't disagree that the convenience is useful, I guess I'm just saying that it's not specific to functional programming.
581.
▲
by
wtetzner
4y ago
Functional programming is about programming with pure functions, not lambdas. Lambdas are obviously very convenient in functional languages, but I think having access to high-quality immutable data structure implementations is more importan
582.
▲
by
wtetzner
4y ago
I think doing a refactor and bug fix in separate PRs makes sense. But I would say do the refactor first , and then do the bug fix on top of it. This solves two problems: * It can make the bug fix diff much easier to read/understand *
583.
▲
by
wtetzner
4y ago
> Speed is critical. More important than perfectionism or wish for well-structured, easy-to-read, maintained code. The thing is, poorly-structured, hard-to-read, unmaintained code is the enemy of speed. I don't think it's ever
584.
▲
by
wtetzner
4y ago
Maybe do a PR with the refactor first, and another PR on top of it with the bug fix. That way you can test that the refactored code doesn't change any behavior, and then you can do the bug fix (hopefully more easily once the refactorin
585.
▲
by
wtetzner
4y ago
They didn't ask how much of the planet is covered in light. They mean how large does the star appear in the sky from the planet's surface.
586.
▲
by
wtetzner
4y ago
What an odd comment when the post contains this: > It is mostly for fun and exercise in language design, I don't have any grand aspirations for it.
587.
▲
by
wtetzner
4y ago
Even wise people likely follow the incentives. What is wise about doing something that your employer doesn’t reward in exchange for doing something that they will reward?
588.
▲
by
wtetzner
4y ago
Typing and tests definitely help, but nothing works better than having well-factored, decoupled code, so a change in one place doesn’t impact the rest of the code base in unexpected ways. Unfortunately I don’t know of a good way to do that
589.
▲
by
wtetzner
4y ago
If you don’t put them in a code block, the URLs are automatically linkified by HN.
590.
▲
by
wtetzner
4y ago
I would argue their job is to solve problems with working code, which requires finding/avoiding bugs.
591.
▲
by
wtetzner
4y ago
Who calls Lisp a "write only language" other than people who don't know Lisp?
592.
▲
by
wtetzner
4y ago
> Lisps bad habbit of stacking all the parentheses like that is what makes it so hard to read. How much Lisp have you written/read? Closing parens on separate lines would be a nightmare to read in any real-world code. Also, what mak
593.
▲
by
wtetzner
4y ago
That sounds good in theory, but in practice whenever I run into code that declares all of the variables up front, I can't tell what those variables are for until I read the body of the function anyway. And often those variables end up
594.
▲
by
wtetzner
4y ago
There’s science that shows whole grains are not good for you, just as there are studies showing they’re good for you.
595.
▲
by
wtetzner
4y ago
I don't think superchroma claimed they were entitled to anything. They were just explaining why they don't like Sony's decisions.
596.
▲
by
wtetzner
4y ago
You may be right about many companies’ decisions, but I will say that Clojure is a very practical language. I think you’d just need to ask them why they chose it, and decide for yourself if you think it was a wise decision.
597.
▲
by
wtetzner
4y ago
> (and rust's structure definitions/etc I just find needlessly verbose for the way I use C structures) Do you have an example? What's verbose about Rust struct syntax?
598.
▲
by
wtetzner
4y ago
Using function call syntax for array indexing always made sense to me. Functions are mappings from inputs to outputs, and arrays are mappings from indexes to values.
599.
▲
by
wtetzner
4y ago
C++ itself was a language designed to interop well with a single language.
600.
▲
by
wtetzner
4y ago
> (some) reasons behind the longevity of many of those centenarians have been identified: low mTOR activity and high omega 3 intake. I wonder how true this is, given that carbs trigger mTOR harder and longer than protein, and the Mediter
More ›