reshared this
reshared this
ed(1) conference and bignose reshared this.
This question doesn't lend itself well to plain text, so I LaTeX'd and screenshotted it. I'll do my best with the alt text.![Is there a way of writing the expression<br>\[ \sum_{n=1}^m f(n) \]<br>in a way that omits the term where $n=a$?</p><p>I know it could be written as<br>\[ \left( \sum_{n=1}^m f(n) \right) - f(a) \]<br>but this doesn't work when $f(a)$ is undefined. Is there a way of writing the expression<br>\[ \sum_{n=1}^m f(n) \]<br>in a way that omits the term where $n=a$?</p><p>I know it could be written as<br>\[ \left( \sum_{n=1}^m f(n) \right) - f(a) \]<br>but this doesn't work when $f(a)$ is undefined.](https://social.jlamothe.net/photo/13528377976a61653463c9a386467268-1.png)
#math #maths #mathstodon #AskFedi
Edit: It turns out that Friendica has a MathJax addon. Who knew?
Also, it seems like there are a number of options. The one I like best is:
$$\sum_{\begin{matrix}1 \le n \le m\\n \ne a\end{matrix}} f(n)$$
Edit 2: It looks like this doesn't render properly when federated to a server without MathJax support. I suppose I should've seen that coming.
Mathematics Channel reshared this.
Sensitive content
math.stackexchange.com/questio…
I'm gonna miss stack exchange.
Commonly we use $\sum$ symbol to compactly describe the sum of a collection or a series, e.g. $\sum_{i=1}^{5} = 1 + 2 + 3 + 4 + 5$. Is it possible to describe the summation with a number removed fr...Mathematics Stack Exchange
Jonathan Lamothe likes this.
Sensitive content
Sensitive content
Jonathan Lamothe likes this.
reshared this
Dave Marquardt and Faraiwe reshared this.
@superketchup Right, I started using nnatom in the past few weeks and noticed its part of Gnus now. I've also running Gnus v5.13. Maybe there was no version bump when they brought nnatom in?
I had problems getting nnatom to work. IIRC it does not want http:// or https:// when specifying the server, unlike nnrss.
Okay, I need to do a hacky #elisp thing. Yes, I know it's terrible.
Basically, I have an existing defun. Let's call it foo. I need to replace it with a new function that calls the old one and transforms its output before returning it.
I naïvely assumed I could do it like this:
(let ((oldfunc (function foo)))
(defun foo ()
(my-transform (funcall oldfunc))))I'm sure there's a way to do this.
#AskFedi
Edit: Got it. It's:
(let ((oldfunc (symbol-function 'foo)))
(defun foo ()
(my-transform (funcall oldfunc))))Also, there's still something Gmail isn't liking. Looking at the differences in the headers between emacs and my other clients (whose mail does get through), the next most obvious difference is that the Content-Type header doesn't specify an encoding. Whether this is the actual problem or not, I should probably fix that. I'm just working on how.
The usual way to do this would be to "advise" the function with an "around" advice. gnu.org/software/emacs/manual/…
Okay, so I wrote this hacky nonsense in my ~/.emacs.d/init.el, but it doesn't seem to be having any effect. The function in question seems completely unaffected.
Perhaps this code is being evaluated before the original function is defined?
;; Mail hack
(defvar jrl-mail-hack nil
"Flag to prevent from overloading the function a second time")
(let ((oldfunc (symbol-function 'message-unique-id)))
(unless jrl-mail-hack
(defun message-unique-id ()
(secure-hash 'sha256 (funcall oldfunc)))
(setq jrl-mail-hack t)))
@Daniel It turns out that the better solution was here:
The usual way to do this would be to "advise" the function with an "around" advice. gnu.org/software/emacs/manual/…
Sensitive content
Jonathan Lamothe likes this.
Sensitive content
Here's a cleaner version that should work. However, I'd be surprised if it's actually the message IDs that are the problem.
```
(defun jrl-message-unique-id (orig &rest args)
"Hash the output of ORIG.
ARGS are passed on to ORIG"
(secure-hash 'sha256 (apply orig args)))
(advice-add ''message-unique-id :around #'jrl-message-unique-id)
```
Jonathan Lamothe likes this.
No, you can't do that, especially not in elisp.
However there's defadvice sitting just around the corner waiting to help you solve your problem.
See also:
lispworks.com/documentation/lw…
emacsninja.com/posts/a-piece-o…
stackoverflow.com/questions/15…
I have rewritten and stand-alone tested the behaviour of an inner function invoked by one of the Emacs functions bundled with Emacs 24. What is the preferred way of incorporating - e.g. in my init....Stack Overflow
Of course there's a question about your underlying logic lurking here: Why don't you just define a new function that calls the old function and transforms its output and then just call the new function.
Transforming the output of an existing function risks breaking all other callers of that function.
Hey all,
I have a friend who's been trying to get on Mastodon but tells me that it doesn't seem to play well with screen readers. I know there are plenty of people on the fedi who do use screen readers, but I have no experience with them myself, so I can't really direct him.
Can someone who does use a #ScreenReader point me in the direction of some resources that might be useful?
#AskFedi #a11y
like this
lain likes this.
reshared this
deananorth, Kevin Davy, fedops 💙💛, Amin, minor deity of the legume realm, Sam D, KendrickLmao, Jules she/her, Luminex, Yvan, Emsquared, MCDuncanLab, Aubrieta, woe2you, kabel42, BashStKid, Quixoticgeek, Lyle Solla-Yates 🦇 🦇 🦇, Tony Hoyle, Alex Haist, David Cantrell 🏏, Hesperalis, Cassana 🍻, trending_bot, Play Ball and Fight Fascists, nebulos, Psil, M. E. Garber, Aslak Raanes, Cozy Trends, yelling jackal, 🏳️🌈🎃🇧🇷Luana🇧🇷🎃🏳️🌈, hype, Starryeyesswitched, IndyHermit, Fieryzard ⭐️🖌️, royal, hype, hypebot, Carsten, Trends der PnP-Nachbarschaft, Jay Grant 🏳️⚧️, HypeBot 🔥, epicdemiologist, Ashe Dryden 🙆🏼♀️, Stomata, Pumpkin Spice Eve, Bruno Girin, Hypebot 🤖, SlightlyCyberpunk, Jayne 🇪🇺🏳️🌈, DieMadColonizer, Joni, cms, clear, Daniel Johnson, some kinda cat, hypebot, ts 🫖, *|FNAME|*, MostlyBlindGamer, not ch1c, avatastic, Robot-Queb, hypebot, Momgoth, Sindarina, Edge Case Detective, Peter Goulborn, Daniël Franke, Harald Wagener, Rich Stein (he/him), Bill Sharpe Gadfly, Angela G, Toni, Sean Lynch and 283 other people reshared this.
@The Witchy Bitches @👩🦯The Blind Fraggle @Matt Campbell @ADHDeanASL @Panamanian❤️🔥 @Superdave! @Lanie I believe he's recently switched to a Linux distribution* (which I understand doesn't play well with screen readers to begin with). I can ask him for more details. Unfortunately he's in the UK, so I can't assist in person.
* I don't know which.
👻 Furbland's Very Spooky Account™ 👻 reshared this.
A fediverse client with better support for Akkoma, glitch-soc, and Iceshrimp instances.enafore.social
An unofficial guide to using Mastodon and the Fediversefedi.tips
Ping @JonathanMosen
Jonathan: @me
is asking about Mastodon clients and screen readers in the toot above.
This special episode is devoted to Mona, a Mastodon app for iOS, iPadOS and MacOS. It has exceptional VoiceOver accessibility, and during its development, the developer has consulted extensively with the blind community.Living Blindfully
A fediverse client with better support for Akkoma, glitch-soc, and Iceshrimp instances.enafore.social
A fabulously gay blind author.sightlessscribbles.com
Jonathan Lamothe likes this.
I've tried using some of the fedi web apps with a screen reader and yeah they tend to be horrible
There may be some native apps that do better in that regard
An unofficial guide to using Mastodon and the Fediversefedi.tips
This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.
ed(1) conference
in reply to Jonathan Lamothe • • •For just capturing the output of a command, you can use:
r !somecommandBut if you want to filter a range of lines through an external filter with POSIX
ed(1), you need some sort of temporary storage (whether a file, the system clipboard, atmuxbuffer or whatever). There's no analog to:10,20! rot13offered by
vi/vim.Someone (can't find the post/author at the moment) did hack this functionality into
ed, but it's a custom fork of POSIX functionality.Jonathan Lamothe likes this.
ClaudioM reshared this.
Jonathan Lamothe
in reply to ed(1) conference • •ed(1) conference
in reply to Jonathan Lamothe • • •Using temporary/transient storage can avoid the temp-file cleanup step though:
or
Ameliorates it by a wee bit, but still a hassle that I'd fix if I had a time machine
Jonathan Lamothe
in reply to ed(1) conference • •ed(1) conference
in reply to Jonathan Lamothe • • •xclipinstead (similar functionality on X),pbcopy/pbpasteon OSX, or some similar tool on Wayland or Windows.bun microsystems likes this.
SirWumpus 🍁🎃 ⚔️
in reply to Jonathan Lamothe • • •ednot that I know. Withex/vi/ehyes. They have pipe through command some region of the buffer or all of it, eg.!{fmt -w68Harka
in reply to Jonathan Lamothe • • •Jonathan Lamothe
in reply to Harka • •!command. The contents of the buffer can either be piped into the command or piped out of it, but not both.Jonathan Lamothe
Unknown parent • •Norman Wilson
in reply to Jonathan Lamothe • • •Toronto qed (descended from ed in the late 1970s, not the 1960s editor that inspired ed) has three commands for exchanging text with other programs:
>command # send to command's standard input
<command # receive from standard output
|command # send to stdin, read from stdout, replacing original addressed lines
Of course > and | take an address range and < a single address, like w and r.
I use | quite often either in ed or in sam; latter written by the guy from whom I caught the qed bug.
Implementing | takes some thought to avoid deadlock if pipes fill and block. Qed does it by spawing a temporary process to do the writing, while the main process reads into the buffer.
Jonathan Lamothe likes this.
Norman Wilson
in reply to Jonathan Lamothe • • •@ed1conf @buffet Sam runs just fine on Linux; I use it there daily (alongside Toronto qed). I think it has been ported to OpenBSD, FreeBSD, and even Windows.
It amuses me that people associate it only with Plan 9; it was originally written for ~9th edition Research Unix, before the Plan 9 project started. (I was there, and an early adopter.)
Jonathan Lamothe likes this.
Harka
in reply to Jonathan Lamothe • • •Jonathan Lamothe
in reply to Harka • •