Skip to main content



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

in reply to Jonathan Lamothe

I know @elettrona has some experience with software accessibility. Maybe she could give some advice ✨
in reply to Jonathan Lamothe

In Windows the worst experience with screen readers comes from auto-scrolling. Posts which scroll automatically on the page, so focus jumps. I've even tried to set in the interface to avoid scrolling but I don't have a good experience in reading from web. I rather use tweesecake on windows and Mona app on iOS. Also trying another one called icecubes


elisp question

I'm certain I have reinvented a wheel here, but for the life of me I can't find it. Have I?

(defmacro jrl-extract-list (vars list &rest body)
  "Split a list into indiviual variables"
  (let ((list* (gensym)))
    (append
     `(let ,(cons (list list* list) vars))
     (seq-map (lambda (var)
                `(setq ,var (car ,list*)
                       ,list* (cdr ,list*)))
              vars)
     body)))

#emacs #lisp #elisp

Edit: Of course it was pcase.

in reply to Jonathan Lamothe

elisp question

Sensitive content

This entry was edited (1 day ago)
in reply to Jonathan Lamothe

elisp question

Sensitive content



Ready to clock in for work. I don't even get to take #caturday off.

reshared this



medical, vague ST:SNW spoiler

Was loading stuff onto my Jellyfin server for my mom to watch in the hospital. She liked Star Trek and I thought Strange New Worlds might be a good idea because it's a more fun show than a lot of the other recent Trek shows.

I started watching the first episode to be sure it was working, and realized I'd forgotten the whole thing about what happens with Captain Pike.

...maybe this show isn't the vibe after all...



ph

Fuck.

My mother had a major stroke today. All I can do right now is sit in the waiting room... waiting.

in reply to Jonathan Lamothe

ph
Don't want to overshare, and it's way too soon to have concrete answers yet, but we have cause for cautious optimism.
in reply to Jonathan Lamothe

re: ph

Sensitive content

in reply to Jonathan Lamothe

ph

She spoke! A whole damn sentence!

Of course, it was to chew my dad out for wearing a sweater full of cat hair.

He's never been so happy to be given the gears. πŸ˜€

in reply to Jonathan Lamothe

ph

Sensitive content




When a #neurodivergent person tells you about how something is difficult for them, rather than thinking of them as whiny, consider that this probably means they have a certain level of trust in you to drop their mask enough to do so.

Invalidating that struggle is likely also a pretty effective way of eroding that trust.
#ActuallyADHD

in reply to Jonathan Lamothe

That <insert_expletive_here> boss of mine totally doesn't get this at all, yet somehow he became a people leader.

Has the people skills of a bowling ball

in reply to Sonikku

@Sonikku All too freaking common.

A good boss should reduce or remove barriers that impede their subordinates from doing their job effectively. Shockingly few can actually accomplish this.



I thought a touchscreen keyboard was the worst possible input device, but they're way more hateful when you only have one working eye. My depth perception has never been great, but...


Just learned that they're shutting the power off tomorrow for 4-5 hours.

That's gonna suck.

in reply to Jonathan Lamothe

From all available evidence the boiler is still dark too. I guess that shower can wait a while longer.
in reply to Jonathan Lamothe

Our radiator is now lukewarm instead of ice cold, also the beeping from the panel has stopped. Can it be that they've finished fixing the power? πŸŽ‰


elisp question

I just put a call to eval in my code and I feel dirty now.

The context went something like this:

(eval (cons 'concat (my-function arg1 arg2)))

I had initially hoped to use
(concat . (my-function arg1 arg2))

...but this resulted in a call to
(concat my-function arg1 arg2)

Which was not what I expected.

Is there a better way I could've written this?
#emacs #lisp #elisp

Edit: Got my answer. I wanted:

(apply 'concat (my-func arg1 arg2))

Edit 2:
It turns out the code I really wanted was:

(string-join arg2 arg1)

I love reinventing the wheel because I didn't know it was already there.

Edit 3:
Here's the actual code:

(defun lambdamoo-run-text-replacements (str)
  "Perform text replacements on the string"
  (dolist (vals lambdamoo-text-replacements)
    (let* ((from (car vals))
           (to (cdr vals))
           (split (split-string str from)))
      (setq str (string-join split to))))
  str)

Let's see if there's anything else I've reinvented here.
in reply to Jonathan Lamothe

elisp question

Sensitive content

#lisp
in reply to Simon Brooke

elisp question

@Simon Brooke What I was looking to do was to call concat with the list returned by (my-function arg1 arg2) used as arguments.

As it turns out, all the functionality I was looking for was already supplied by the string-join function. I just didn't know it existed.

in reply to Simon Brooke

elisp question
@Simon Brooke Also, I don't like calling eval unnecessarily, as it can open you up to security vulnerabilities if not done carefully.


I just wrote a bunch of #elisp code like this:
(catch :abort
  ;; do something
  (when condition
    (message "A bad thing happened")
    (throw :abort nil))
  ;; do something else
  )

When the functionality I really wanted was:
(progn
  ;; do something
  (when condition
    (user-error "A bad thing happened"))
  ;; do something else
  )

I knew the former felt sketchy, but I couldn't think of a better way to do it until just now.
#emacs #lisp

FOSS Dev reshared this.



One thing I miss in #Lisp coming from #Haskell is the ability to search for functions by their type signature. I hadn't realized how much I relied upon this ability until I lost it.
in reply to Jonathan Lamothe

As a Schemer (and formerly/sometimes still Objective-C), everything is pretty verbose, and my own functions even more so, so I can search by function name knowing the type and parameters. (vector-index vec searchfunc), (draw-rect-with-edge-color rect edge-width color), etc.

There's no excuse for hardcore Lisp functions like (wadsf w q) "wander down stack frames for word query" (fictional but not unlikely).
#lisp

#lisp


#Elisp logic:

All interned symbols can be found in a lookup table. This table is bound to the obarray symbol.

Hang on a minute...

I can only assume that the underlying C code has its own pointer to this table and the obarray symbol is only provided as a convenience for elisp functions that can't see this pointer?
#emacs #lisp

in reply to Jonathan Lamothe

No no, the obarray you see from elisp is the same one used by the reader. Elisp is an old-style Lisp here, and the obarray is a first-class thing: you can make a new one, rebind obarray, etc.

That's the sort of thing people don't do much anymore, but used to do. The documentation covers it reasonably well gnu.org/software/emacs/manual/…



ph: vague

I'm starting to get the impression that my doctor's office is trying to drum up business by giving me repeated heart attacks with vague voicemails about some test results I'm waiting on.

For the record, according to the information I have at this very moment, everything is (probably) fine.



Wrote my first non-trivial #elisp macro yesterday. Macros were the thing that scared me away from #lisp the first time I tried learning it.
#emacs

Shannon Prickett reshared this.

in reply to James Endres Howell

@James Endres Howell
I'm a little self-conscious about it as non-trivial is relative, but...
(defmacro lambdamoo-chatter-interact
    (func-name to msg docstring fmtstr &rest vals)
  "Define a function for interacting with another player"
  (let ((proc (gensym))
        (str (gensym)))
    `(defun ,func-name (,proc ,str)
       ,docstring
       (let ((,to lambdamoo-chatter)
             (,msg (substring-no-properties (lambdamoo-command-text ,str))))
         (if ,to
             (funcall lambdamoo-send-line ,proc
                      (format ,fmtstr . ,vals))
           (message "No chatter specified"))))))
in reply to Jonathan Lamothe

That's awesome. I need to hear my own advice, of course, but don't be inhibited to share something that isn't finished. It's the Fediverse! We're all anarchists! The kind sort, I mean.

Lisp macros are just so powerful.

in reply to James Endres Howell

@James Endres Howell They really are. They're a little bit of a mind bender until you really get them, but once you do they're such a game changer.
in reply to Jonathan Lamothe

Wait, how do you get the awesome code formatting? Anybody know how to configure this on fediscience.org?

AM I GOING TO HAVE TO SPIN UP MY OWN INSTANCE AGAIN

in reply to James Endres Howell

@James Endres Howell Frendica has a markdown add-on.

I just typed:

```lisp
...code...
```

Typing that however was trickier.


RIP Sterrance (my #sourdough starter) who met a tragic end in his glass jar at the hands of gravity and the kitchen floor.

Also, happy birthday to Stella who is going to take a bunch of work to make into another viable starter.

reshared this

in reply to Jonathan Lamothe

when Stella is good and bubbly and produces good loaves, dry a bit and store it in a jar.
in reply to Jonathan Lamothe

it is a way of preserving viable starter in case life happens. It will be much faster to restart.
in reply to Jonathan Lamothe

No backup, no mercy. As an IT-guy you know that of course. ;)


I'm finally MOOing from #Emacs. I've still got a bunch of work to do to port my customizations over from my old client, but it's Emacs... I'm sure it can do that.
#LambdaMOO #moo #mud


@screwlisp @Judy Anderson
I've been looking to migrate more of my workflow into emacs, in this particular case I'm looking to moo via emacs which I believe you both do?

I believe @screwlisp has mentioned using rmoo, but the only repo I found for that hasn't been updated in over a decade. Is there something more recent I'm not aware of?

in reply to Jonathan Lamothe

> had do a little finessing to get it to installed

out of curiosity: what was the problem?

Is it that I didn't make a (M)ELPA package out of it? (nobody just drops things in their ./emacs directory anymore?)

or some other issue?

screwlisp reshared this.

in reply to Jonathan Lamothe

ok, so the answer is indeed
"nobody just drops things in their ./emacs directory anymore"

(really, that's all it's supposed to be.

well okay, that plus
M-x load-library mud-mcp

which is the old-school way of doing things)

(wRog needs to learn MELPA. Film at 11.)

screwlisp reshared this.

in reply to Roger Crewβœ…βŒβ˜‘πŸ—ΈβŽβœ–βœ“βœ”

@Roger Crewβœ…βŒβ˜‘πŸ—ΈβŽβœ–βœ“βœ” @Judy Anderson @screwlisp It essentially already was a valid ELPA package with the mentioned exception.

I'm currently in the process of adding my own custonizations. I've added a rudimebtary shim that processes lines entered bu the user so that it can support commands that get processed on the client side.

Here's an excerpt:

(require 'mud-mcp)
                                                                                 (defun lambdamoo ()
  "Connect to LambdaMOO"
  (interactive)
  (mud-mcp-connect "LambdaMOO" "lambda.moo.mud.org" 8888)
  (setq lambdamoo-send-line comint-input-sender
        comint-input-sender #'lambdamoo-process-line))

(defconst lambdamoo-commands
  '(("send" . lambdamoo-send)
    ("test" . lambdamoo-test))
  "Command functions")

(defvar lambdamoo-send-line nil
  "The function that is called to send a line to the server")

(defun lambdamoo-process-line (proc str)
  "Process input sent by the user"
  (if (string-prefix-p "/" str)
      (lambdamoo-process-command proc str)
    (funcall lambdamoo-send-line proc str)))

(defun lambdamoo-process-command (proc str)
  "Process a command"
  (let* ((words (split-string str))
         (command (string-trim-left (car words) "/"))
         (found (assoc (downcase command)
                       lambdamoo-commands
                       #'string=))
         (func (and found (cdr found))))
    (if func
        (funcall func proc str)
      (message "Command '%s' not found." command))))

After I wrote all this, I found comments in the file detailing how to add functionality.

Is there a more "proper" way I could've done this?

Shannon Prickett reshared this.



I've got to stop writing code on my phone. The combination of a touchscreen keyboard and tiny screen allows stupid typos to make their way into my code that I would be much more likely to catch on a proper computer.
in reply to Jonathan Lamothe

I gotta ask... What motivated you to write choice on a phone in the first place?
in reply to Darcy Casselman

@Darcy Casselman It was mostly written properly. They were just little edits that I was too lazy to go over to the computer to make.
in reply to Jonathan Lamothe

I strongly prefer being able to write code on my phone when I need to but I try to keep it to code that I plan to run once immediately and discard.

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.

⇧