Are there any #Lisp programmers out there who use a #ScreenReader? Given how messy Lisp can be to read without proper indentation (which I imagne wouldn't translate well on a screen reader) I can't see it is being an easy language to work in without being able to see it.

I've been thinking about a way to make an editor that lets you explore a Lisp program by walking through the forms in the program in a manner similar to the way one might navigate in a MUD. Is this a crazy idea, or one with some merit?

reshared this

in reply to Jonathan Lamothe

Not to discourage new ways to solve old problems, I just want to point out that your lisp journey will be much easier if you use an editor designed for the task, which includes learning a set of editor operations that function at the "form"/s-exp level.

In emacs these operations include traversal functions like `forward-sexp`, and the very useful `indent-sexp` function. They're part of basic emacs behavior, you don't even need to do change emacs configuration to enable them, and they're useful on data other than lisp source code.

Once you can easily navigate up, down, and around forms, checking to see where a form starts and ends is easy without any sensitivity to how it's indented.

in reply to Jonathan Lamothe

Seemingly plain (lambda () ...) is a macro that expands to (function (lambda () ...)). #'(lambda () ...) uses a reader macro to expand to the same (function (lambda () ...)).

clhs.lisp.se/Body/m_lambda.htm

Function is a special operator that returns a function. It takes either a function name or a lambda expression. The second case is what is happening here.

clhs.lisp.se/Body/s_fn.htm#fun…

A lambda expression is a list of the symbol lambda, a lambda list, and a body.

clhs.lisp.se/Body/26_glo_l.htm…

I've been taking a bunch of tests to qualify for a transcription job. They're not easy and I need a perfect score to pass. I finally failed one of the tests but managed to pass it on the retry.

They're really picky about their style guide. Fortunately, it basically amounts to syntax rules and I've been dealing with compilers that are equally picky about syntax for decades.

It also helps that all throughout my schooling my mother worked at the local university proofreading research scientists' papers and she insisted on proofreafing all my essays too.

I never thought I'd end up being happy about that.

in reply to Jonathan Lamothe

After a closer review of the style guide, I have come to realize that the question I was repeatedly getting wrong was one that wasn't even on my radar as a candidate. I misremembered a stupid trivial detail from the guide.* I was rabbit holing on the wrong two questions, one of which I still maintain can be argued to have two correct answers, but I now know which one they're looking for.

Not looking forward to sinking another ~5 hours on this thing.

* That would have had virtually zero impact on my ability to successfully do this job.

Jonathan Lamothe reshared this.

Don't do AI. Look for people selling electronics they don't need anymore and use them to make the machine. Make a god out of discarded parts, and don't let it die. Use it for whatever the hell you feel like. Give it the ability to sense its reality and start programming it not to speak, or interact with anyone, but to show people echoes of the past.

reshared this

elisp
God, my tab completion function is a hacky mess:
(defun lambdamoo-tab-complete ()
  "Complete user input using text from the buffer"
  (interactive)
  (when (memq (char-before) '(?  ?\r ?\n ?\t ?\v))
    (user-error "Point must follow non-whitespace character"))
  (let (replace-start
        (replace-end (point))
        replace-text found-pos found-text)
    (save-excursion
      (backward-word)
      (setq replace-start (point)
            replace-text (buffer-substring replace-start replace-end))
      (when (or (null lambdamoo--search-text)
                (not (string-prefix-p lambdamoo--search-text replace-text t)))
        (setq-local lambdamoo--search-text replace-text)
        (set-marker lambdamoo--found-point (point)))
      (goto-char lambdamoo--found-point)
      (unless
          (setq found-pos
                (re-search-backward
                 (concat "\\b" (regexp-quote lambdamoo--search-text))
                 (point-min) t))
        (setq-local lambdamoo--found-point (make-marker))
        (user-error "No match found"))
      (set-marker lambdamoo--found-point found-pos)
      (forward-word)
      (setq found-text (buffer-substring found-pos (point))))
    (delete-region replace-start replace-end)
    (insert found-text)))

#emacs #lisp #moo #mud #LambdaMOO

reshared this

elisp

Me realizing that festival uses a Lisp dialect:

Oh cool, I can add accessibility features to my Emacs stuff by procedurally generating the code in elisp.


Me realizing that festival's symbols are case sensitive:

Welp, I guess I can just do
(defun festival-saytext (text)
  (format "(SayText %S)" text))
and do the rest of the processing in elisp directly. That's probably all I wanted anyway.
Jonathan Lamothe reshared this.

The media in this post is not displayed to visitors. To view it, please go to the original post.

In 1959, a cement mixer with a full load of cement, wrecked near Winganon, Oklahoma πŸ‡ΊπŸ‡Έ

By the time a tow truck came to haul it away, all of cement had hardened inside of mixer. Tow truck was not able to remove all wreckage at same time because of weight, and decided to haul only cab/frame and would come back for detached mixer later, which never happened.

Today, 67 years later, it still sits where it fell. Locals have painted it and added "rocket thrusters" to make it look like a space capsule.

in reply to Knightmare

@LanceJZ @isaackuo
That's a piece of Art, and congratulations to the locals for maintaining it.

(Actually the capsule would have had thrusters: there would be Capsule:Flotation Bag:Heat Shield:Thruster Pack, with the thruster pack held on by straps so it could be jettisoned after deceleration but before hitting atmosphere. On one mission they re-entered with the thruster pack attached because the flotation bag light had come on and they were concerned about the heat shield.)

in reply to Cadbury Moose

@Cadbury_Moose @LanceJZ While this is true of the Mercury, Gemini, and Apollo capsules (including the Apollo service module), a reusable capsule could enter nose first rather than tail first.

Nuclear missile reentry heat shields are blunt cones entering nose first.

That said, Dragon does do tail first reentry, placing the thrusters on the sides rather than the tail. I just think it "looks" wrong.

in reply to Isaac Ji Kuo

@isaackuo @Cadbury_Moose @LanceJZ That is only true for modern ballistic missile RVs, initially they were launched blunt end forward, since the materials of that time didn't allow a more accurate short end forward reentry because these cause higher temperatures. (That is also why the Space Shuttle got a rather blunt nose)

Also, there are far more than just one kind of capsule. Imagine this as a biconic lifting body, and it isn't that much fictive to retain its aft thrusters.

in reply to Knightmare

The media in this post is not displayed to visitors. To view it, please go to the original post.

@LanceJZ @Cadbury_Moose This is what people think of when they think of the Apollo "capsule". It has a big main thruster in the tail, and lots of thruster clusters all over the place.

That's the reason why the artists modifying the cement mixer tank felt the need to add thrusters. It didn't look right without them, because the overall shape looks like a capsule plus its service module.

in reply to Knightmare

@LanceJZ @Cadbury_Moose I know what you mean, but that's what people think of.

One reason they think of the Apollo "capsule" as the Command Module and Service Module is that there isn't any footage of the Command Module by itself in space. No one left on the Service Module to shoot the Command Module after separation.

(The Command Module is just the return capsule.)

in reply to skryking

@skryking

The photo looks like a rural highway to me. This means fairly high speeds. If a car "hits the ditch," a bumpy ride turns into a fatal accident.

I suspect the jurisdiction belongs to whoever owns the highway. It could be the state or it could be the county.

A couple of heavy tow wreckers could move this machine. Less than $5000.

But there may be political pressure to keep the machine in place. It does look cute.

in reply to skryking

@skryking

There may indeed be more to the story.

I come from a rural background. Many people drive 80 kph (50 mph) on these roads. And they hit the ditch more often.

There might be some weight restrictions that prohibit big trucks on this road. The pavement in the photo (or oily gravel) looks a little on the weak side to me.

Anyways, we need more info to know why this thing has remained in the ditch for 67 years.

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 Fanny Bui

@Brailly615 In another comment it has been said that its about Linux, there I unfortunately can't help. I use Webclients, unfortunately they don't get any Updates anymore or I'd have recommended something. I only use them because I haven't found something better yet that I don't need to install. @Clio09 @C3nC3 @me @MonaApp @pachli

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.

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

Jonathan Lamothe reshared this.

The media in this post is not displayed to visitors. To view it, please go to the original post.

Evergreen

#OpenBSD #RunBSD #Linux #Jokes

This entry was edited (4 weeks ago)
in reply to sotolf

[size=small]This post uses ruby annotations and likely will display only in degraded mode in TUI clients like tut.[/size]

@sotolf @rl_dane @stefano @kabel42 no, no reference. Not い぀みMario (γƒžγƒͺγ‚ͺ).

Literally just γ‚€γƒ„γƒŸγƒžγƒͺγ‚ͺ (γƒžγƒͺγ‚ͺです). Katakana syllabic writing for what is supposed to be English speech, then read by a Japanese speaker-or-TTS.

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

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.

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

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"))))))

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

⇧