Live data from Hacker News

Ask HN: Teach me something new

news.ycombinator.com

11–20 of 782 posts

Re: Ask HN: Teach me something new

#13

In 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.

This is if you have emacs-based keybindings (which is the default). M-f/M-b (Meta, often the alt key or option key) will move forward/backward a full word. C-f/C-b moves forward/backward a character. C-w kills the previous word (if you're in the middle of a word it leaves everything from the cursor to the end intact).

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

#17
Take 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/night!

Re: Ask HN: Teach me something new

#19

Take 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…

Very interesting. whats the use case of this?

Re: Ask HN: Teach me something new

#20
In "Magic the Gathering Old School 7 Points Singleton" you play the card game Magic the Gathering but only with cards printed in the first 2 years (93/94) and only maximum 1 copy of each in your deck. And power cards are limited to 7 points according to a table found here https://ligaoldschoolmadrid.wordpress.com/2021/03/25/7-point...

A wonderful nostalgic way to play the game.

Post reply on HN