Skip to main content




What if—and this is perhaps crazy—instead of giving me "AI" features, you gave me a usable, well documented API, so I could add my own automation features?



Oh, this bottle of coconut water has "no added sugar"; I wonder if it's okay for my diabetes?

*checks the macros*

(It's roughly equivalent to a can of coke.)

*drinks it anyway*



A question for the #lisp folx:
What, if anything, is the difference between #'(lambda ...) and just plain (lambda ...)?

They seem functionally equivalent to me.

#lisp
in reply to Jonathan Lamothe

Yes, functionally equivalent. (lambda …) was a late addition to #CommonLisp to make it more compatible with #ISLisp
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 just cleared my cookies and cache in Chromium and somehow stayed logged into Google. This is somehow both shocking and also not shocking at all.


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

I just failed the last section again. I'm starting to think that they're just messing with me.
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.



Just booked an appointment with my doctor to renew my #ADHD meds again. Now it's time to play my favourite game: is he going to fight me on this prescription again?
#ADHD


Yes Doctor, I'm over a half hour late with my meds, but you don't understand: there's a cat on me.

Judy Anderson reshared this.




It turns out that turning around on four hours sleep a night is not a sustainable strategy.


You may not think me very impressive, but I'll have you know that I'm a successful restauranteur in an obscure text-based multi-user virtual reality.
#LambdaMOO






Got my hands on a #shortwave radio, but the fact that I live in a giant concrete box doesn't seem to be helping my reception. Seeing what I can do about that.

Are there any broadcasts that are worth catching that I'd be able to get in Southern Ontario?

Kevin Davy reshared this.



So now that she's eating "real" food again, we took some of the curry we've been making lately to my mother. I was very happy to learn that she enjoyed it. Mind you, we're competing with hospital food, so it's not like the bar is terribly high.


I find the notion of an "off-grid" YouTuber to be... confusing.


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

in reply to Jonathan Lamothe

elisp

@Omar Antolín Actually, looking more closely at it, it might just do the trick.

I love it when I spend hours re-writing code that essentially already exists. ;)

in reply to Jonathan Lamothe

elisp

In the end, I wound up just binding tab to dabbrev-expand. 🙃

It might seem like I wasted a bunch of time writing that, but at least I learned a bunch along the way.



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.



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
in reply to Svenja

@svenja @Brailly615 @Clio09 @C3nC3 @MonaApp If it is about Linux, I can't help either. In Windows there is #Tweesecake. Although it seems that it is not updated anymore, we can work fairly well with it.


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

in reply to Thuna

elisp question
@Thuna Ooh... just noticed this now. I think I like seq-let a lot better.


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.

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