Ask HN: Teach me something new
11–20 of 782 posts
Re: Ask HN: Teach me something new
#12Re: Ask HN: Teach me something new
#13In your terminal Ctrl+a will return you to the start of whatever line you have typed, and ctrl+e will return you to the end.
C-r will search backward in your history allowing you to type partial matches (like, "I know I compiled foo.c, but what options did I use?" type `C-r foo.c` and repeatedly type C-r until I find the compiler command I used).
https://www.gnu.org/software/bash/manual/html_node/Bindable-... - for a lot more options
You can switch to vi keybindings with `set -o vi`.
Re: Ask HN: Teach me something new
#14Re: Ask HN: Teach me something new
#15Re: Ask HN: Teach me something new
#16In your terminal Ctrl+a will return you to the start of whatever line you have typed, and ctrl+e will return you to the end.
Re: Ask HN: Teach me something new
#17Example:
7-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1-4-2-1-4-2-1...
Any positive integer you take, you end up in a 1-4-2-1 loop.
It's not proved yet but there's no number found yet that satisfies otherwise. That's the Collatz Conjecture or the 3n+1 problem.
Probably the easiest conjecture to explain to someone.
Good day/night!
Re: Ask HN: Teach me something new
#18Re: Ask HN: Teach me something new
#19Take a positive integer. If it's odd, multiply it by 3 and add 1. If it's even, divide it by 2. Example: 7-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1-4-2-1-4-2-1... Any positive integer you take, you end up in a 1-4-2-1 loop. It's not proved yet but there's no number found yet that satisfies otherwise. That's the Collatz Conjecture or the 3n+1 problem. Probably the easiest conjecture to explain to someone. Good day/n…
Re: Ask HN: Teach me something new
#20A wonderful nostalgic way to play the game.