Instead of using ctrl and meta modifiers, use a leader key like escape or semicolon or comma or some such thing as the prefix key for key bindings. In fact, this desire for leader-key-based, non-modal text editing led me to write devil-mode for Emacs: <https://susam.github.io/devil/>.
I know many people like to remap Caps Lock to function as Ctrl. However that setup does not quite work for me. There is only one Caps Lock key on the left side of the keyboard. I need Ctrl on both sides of the keyboard, so that I can use the left Ctrl key while typing Ctrl+P but the right one while typing Ctrl+A.
There are other options as well, like remapping the Enter key to act as Ctrl when chorded or using sticky modifiers. I think using an ergonomic keyboard with two large Ctrl keys on both sides of the keyboard is probably the best solution. I've discussed some of these alternatives in more detail <https://susam.github.io/devil/#why>.
I just leave Ctrl where it is and press it with the knuckle of my little finger. I do it just like the guy in the pic on this page, pressing the control key with his little finger: http://xahlee.info/kbd/how_to_press_control_key.html - because that pic is of my hand. (Xah might not recommend doing this all the time, but I've been doing this for nearly 20 years now and I've had no problems.)
For the past 3 years I’ve done the following remap Caps -> lctrl/esc, enter -> rctrl/enter, tab -> lalt/tab, backslash -> ralt/ backslash. Also have the physical right alt mapped to multi key/dead greek.
It works really well, and makes emacs much more comfortable to type in.
Downside is this keeps me locked to X11 and fighting the occasional app that reads the key codes directly.
Instead of making it an additional Ctrl key, you can also make it a new separate modifier key with XKB[1]. I've found this very useful over the years for WM-related key bindings, leaving the other modifiers for applications.
Tangentially, I really loathe how Wayland has no alternative to this. I'm expected to configure keyboard layouts in every DE or WM I use, which is a much worse UX.
I was very disappointed that Apple gave up that fight.
They also at some point joined the PC world in moving the nubs on their keyboard from "d" and "k", where you were more likely to notice if your fingers are not in their proper place on the home row. Now if your right hand is offset slightly to the right, you won't feel anything, which is less immediately noticeable than if the nub were under the wrong finger.
emacs is not its keybindings. you can bind your emacs keyboard to do what you are asking for; as you said, you wrote a mode for emacs that works the way you want, and it wasn't necessary to rewrite Emacs.
Making modal editing with a leader key the default rather than an option it currently is, is a pretty trivial thing to bring up as the stand-out "feature" a rewrite could provide.
I haven’t kept track of how much traffic it brings to the whole website but I have some data about how much traffic it brings to the particular page that is trending on the HN front page: https://susam.net/from-web-feed-to-186850-hits.html
To summarise that post, it brought me about 95000 hits on the first day. That was a simple, static, standalone HTML page and the traffic was way below what Nginx can handle without breaking a sweat, so never had any trouble on the web server.
The Libera IRC ##math community [1] has been around for over 29 years now! Originally based on the Freenode network, the community migrated to Libera in May 2021 following a controversial shift in Freenode's management.
This community played an instrumental role in my early days of beginning to study mathematics seriously. During its prime, weekly mathematics seminars [2] were organised by the members, which I thoroughly enjoyed. I still vividly remember the IRC user "TRWBW", who seemed to have an answer for every question, no matter how complex. TRWBW's ability to explain even the most challenging concepts with clarity and precision was very impressive. Sadly, he hasn't been seen in several years.
Although many of the original regulars have come and gone over the past three decades, the community continues to remain active. It still remains a good forum for discussing mathematics as well as asking and answering questions.
Both channels above are bridged together. So joining either one of them is enough to follow all conversations.
This isn't specifically targeted at professional mathematicians though. Most members come from a computing background. However, mathematics is a central topic here, with much of the discussion revolving around computer science and mathematical literature. Recent reading and discussions have been about topics like theorem provers (Z3, Lean, etc.), real analysis, Galois theory, distributed consistency, compiler and interpreter development, Standard ML, etc.
> ... I don't know what pjmlp means by "Lisp-2", which I normally interpret as meaning a Lisp with different namespaces for functions and variables ...
> The sentence “Let x⋆ be the solution to the optimization problem” implicitly asserts that the solution is unique. If the solution is not unique or need
not be unique, write, “Let x⋆ be a solution to the optimization problem.”
I know this point is meant to be about precision in writing but this reminded me of Perron's Paradox, which highlights the danger of assuming the existence of a solution without proper justification. The problem can be demonstrated through the following argument:
Let n be the largest positive integer. Then either n = 1 or n > 1. If n > 1, then n^2 > n contradicting the definition of n. Hence n = 1.
This fallacy arises from the mistaken assumption that a largest integer exists in the first place.
The original post is a great submission, by the way. Thank you for sharing it on HN. Bookmarked already!
These are tiny hobby projects I've developed in the limited spare time I get. They serve as creative outlet and keep alive the fun in computing I first discovered many decades ago while learning the Logo programming language.
I'm curious to see what others here do to keep the fun in computing alive for themselves.
I struggled a bit with finding the right way of controlling this, but with some patience you can set up a cloud of nicely rotating particles, and try to reverse the overall direction of the swirl by adding particles that rotate in the other direction.
Thanks! Full disclosure: by the time this was done, the actual question that prompted this was long forgotten. I got a "huh, that's nice." for my trouble (:
I found it intriguing that the original post there claims that
(cons (list 1 2) (list 3 4))
intuitively seems to have the length 2 whereas the correct length is 3. I find 3 more intuitive though. It could be because right from my early days of learning various Lisps, I learnt about lists in terms of cons cells.
There are many ways to explain this, such as by drawing diagrams of the cons cells from first principles, printing out each cons and list on a REPL and confirming the equivalences, etc. Here's one that happens to be my take on it. I'll be (ab)using the equals sign (=) to mean that the expression on the LHS and the one on the RHS are equivalent.
First let us build a list of three items using cons cells:
> intuitively seems to have the length 2 whereas the correct length is 3. I find 3 more intuitive though. It could be because right from my early days of learning various Lisps, I learnt about lists in terms of cons cells.
That's just how cons is defined. the first argument is a list and the second is an arbitrary object, and the result has the elements from the list plus the other object. It doesn't take a bunch of algebraic manipulation to understand this definition. It just takes a recognition that an "arbitrary object" could be a list, as well as a recognition that the other definition you imply ("make a new list with both arguments as elements") would have to either be variadic (which in turn would obviate `list`) or would only ever be able to make lists of exactly 2 elements. (The point is that `cons` can serve as a simpler primitive, and `list` can be implemented in terms of it.)
Note that the value returned by cons is guaranteed to have type cons, and it is guaranteed that a fresh cons is created. Neither is true for list*; note that its return type is t.
As the years go by, I find myself increasingly in the minority of those who still prefer the unified diff view.
My favourite tool for diffing has always been “diff -u”. I sometimes even use “diff -U10000” when I want to see the entire file as context.
Thankfully, GitHub still supports unified diff view, so I don’t feel left out while reviewing GitHub pull requests.
In fact, once upon a time, when there was no GitHub or GitLab and there were no “pull requests”, open source developers used to email each other .diff files (often also named .patch files) which were nothing but unified diff files. A reviewer would apply the patch on their copy of source code with something like “patch -p0 < new.diff” and test it locally on their system. That was the CI of that era.
> As the years go by, I find myself increasingly in the minority of those who still prefer the unified diff view.
Wait, so what does the majority prefer these days then? I might be out of the loop, last time I checked (which was today) git still defaulted to unified diffs.