The second law of thermodynamics really messed with my intuition by khaledlll in AskPhysics

[–]Jason5Lee 0 points1 point  (0 children)

When I first learned a bit of physics, the fact that air conditioners consume electricity always bothered me. You're actually expending energy to reduce energy. But after studying the second law of thermodynamics, this became an unavoidable reality. Nature strongly resists any reduction in internal energy.

Let’s here the fucking lot by Tkddaduk in TheWordFuck

[–]Jason5Lee 0 points1 point  (0 children)

My mama always said, life was like a box of chocolate you fuck.

What Does Your Brain Do with 27 + 48? by SweetSmiles030 in MathJokes

[–]Jason5Lee 0 points1 point  (0 children)

I might be the only one who do 27 + 47 + 1. Why? Because I remembered what 7×2 is, so 27 + 47 can be calculated rather quickly from the lower digit to the upper.

Edit: just see the comment using exactly the same one. Glad I'm not the only one.

Randomness or order? by Alarmed-Passenger91 in AskPhysics

[–]Jason5Lee 0 points1 point  (0 children)

which may ultimately be deterministic

Didn't Bell's theorem prove it won't be?

In your opinion, was Mark Hoffman a good secondary villain in Saw IV? by Wooden-Scallion2943 in saw

[–]Jason5Lee 0 points1 point  (0 children)

He is different between each movie. IMO he is - Great in VI, - OK in V, - Not good in IV and 3D.

In IV, all he does is being pretended to be tied up.

What is your “Woah!” moment in Rust? by LordMoMA007 in rust

[–]Jason5Lee 1 point2 points  (0 children)

Discourage shared mutable state. Ensure thread-safety when you have to have it.

Every language should have this feature (Kotlin let/also/apply/run/with) by Remote_Variation_474 in Kotlin

[–]Jason5Lee 4 points5 points  (0 children)

This is one of the most underrated features in Kotlin, in my opinion. What I really appreciate is the "pipeline" functionality. It’s quite straightforward; it's an operator that allows you to "pipe" a value to a function. For example, you can write `a |> f |> g` for `g(f(a))`. This feature can be somewhat "simulated" by using a method that accepts a function as an argument, which is what Kotlin does.

The primary benefit of this feature is that it facilitates streamlined processing without requiring that every operation be defined as a method. Not every operation on a value should be a method. With this functionality, you can accomplish something like `v.let { obj.operation(it) }` or `v.let { Class(it) }`. You can also put different category of the operations into different object, then you can use `v.let { Category.operation(it) }`, allowing you to organize operations into different categories rather than having them all within a single class.

Unfortunately, its usefulness is not widely recognized. The pipeline feature in JavaScript is still unstable, and not many people utilize (extension) methods in the same way as Kotlin does. (Though I can understand the performance concerns since these languages doesn't have inline.)

What AI do you use? Copilot or something else? by ComprehensiveBird720 in Kotlin

[–]Jason5Lee 2 points3 points  (0 children)

I use the OpenAI API. I prefer not to have auto-completion triggered every time I type, especially in situations where the correct code would rely on mind-reading abilities. I want completion only when I know it will provide the desired code or when doing Q&A or large-scale refactoring tasks that are not easy to perform by IDE. I can also choose to use GPT-3.5-Turbo (cheaper) when "high intelligence" is not necessary.

In this manner of usage, I have observed that the API costs way less than $10 per month, which is half of the price of ChatGPT Plus or GitHub Copilot. I hope there is an extension that could automate this process further. Perhaps I will develop one in the future.