* Van Ly via Emacs news and miscellaneous discussions outside the scope of 
other Emacs mailing lists <emacs-tangents@gnu.org> [2025-04-04 16:17]:
> > Though maybe you think of consciousness in some other definition.
> 
> Natural philosophy science of the mind in 8-bit atari graphic resolution 
> simulcrom.

You missed a verb! But you are good at generating random words, almost like 
SmolLM2-135M-Instruct.

> So, the Starliner had 28 thrusters and 4 failed leaving no failover coverage 
> remaining.

(defun check-coherence (sentence)
  "Check if the given SENTENCE is coherent."
  (let* ((words (split-string sentence "\\s-+"))
         (has-subject (catch 'found
                        (dolist (word words)
                          (when (string-match-p "\\b[[:alpha:]]+\\b" word)
                            (throw 'found t)))))
         (has-verb (catch 'found
                     (dolist (word words)
                       (when (string-match-p 
"\\b\\(had\\|failed\\|leaving\\)\\b" word)
                         (throw 'found t)))))
         (has-object (catch 'found
                      (dolist (word words)
                        (when (string-match-p "\\b[0-9]+\\b" word)
                          (throw 'found t))))))
    (if (and has-subject has-verb has-object)
        "The sentence is coherent."
      "The sentence is not coherent.")))

;; Example usage
(check-coherence "The Starliner had 28 thrusters and 4 failed leaving no 
failover coverage remaining.")

Happy now?

> Maybe, 8✕1 serial and 8✕4 parallel p‑nodes are needed for Starship ITS AI and 
> the Tenstorrent RISC-V hardware will do for modernizing the Cray-1 general 
> purpose open free architecture.

Well, let's verify it:

(defun check-coherence (sentence)
  "Check if the given SENTENCE is coherent."
  (let* ((words (split-string sentence "\\s-+"))
         (has-subject (catch 'found
                        (dolist (word words)
                          (when (string-match-p "\\b[[:alpha:]]+\\b" word)
                            (throw 'found t)))))
         (has-verb (catch 'found
                     (dolist (word words)
                       (when (string-match-p 
"\\b\\(are\\|needed\\|will\\|do\\)\\b" word)
                         (throw 'found t)))))
         (has-object (catch 'found
                      (dolist (word words)
                        (when (string-match-p "\\b[0-9]+\\b" word)
                          (throw 'found t)))))
         (has-technical-terms (catch 'found
                                (dolist (word words)
                                  (when (string-match-p 
"\\b\\(p-nodes\\|Tenstorrent\\|RISC-V\\|Cray-1\\)\\b" word)
                                    (throw 'found t)))))
         (logical-coherence (string-match-p "\\bfor\\b" sentence)))
    (if (and has-subject has-verb has-object has-technical-terms 
logical-coherence)
        (if (string-match-p 
"\\b\\(Starship\\|ITS\\|AI\\|modernizing\\|general\\-purpose\\|open\\|free\\|architecture\\)\\b"
 sentence)
            "The sentence is not coherent. It lacks logical sense and 
functionality."
          "The sentence is not coherent. It lacks logical sense and 
functionality.")
      "The sentence is not coherent. It lacks logical sense and 
functionality.")))

;; Example usage
(check-coherence "Maybe, 8✕1 serial and 8✕4 parallel p-nodes are needed for 
Starship ITS AI and the Tenstorrent RISC-V hardware will do for modernizing the 
Cray-1 general purpose open free architecture.")

> Do Linuxheads make jokes at the expense of Plan 9?  Why is that?

Seems more effort to solve that one...

(defun check-gnu-jokes (sentence)
  "Check if the given SENTENCE is coherent and determine if GNU Users make 
jokes on Linuxheads and Plan 9."
  (let* ((words (split-string sentence "\\s-+"))
         (has-gnu (catch 'found
                    (dolist (word words)
                      (when (string-match-p "\\bGNU\\b" word)
                        (throw 'found t)))))
         (has-linuxheads (catch 'found
                           (dolist (word words)
                             (when (string-match-p "\\bLinuxheads\\b" word)
                               (throw 'found t)))))
         (has-plan9 (catch 'found
                      (dolist (word words)
                        (when (string-match-p "\\bPlan\\s-?9\\b" word)
                          (throw 'found t)))))
         (has-jokes (catch 'found
                      (dolist (word words)
                        (when (string-match-p "\\bjokes\\b" word)
                          (throw 'found t)))))
         (has-together (catch 'found
                         (dolist (word words)
                           (when (string-match-p "\\btogether\\b" word)
                             (throw 'found t)))))
         (logical-coherence (and has-gnu has-linuxheads has-plan9 has-jokes 
has-together)))
    (if logical-coherence
        "GNU Users make jokes on Linuxheads and Plan 9 together."
      "The sentence is not coherent. It does not indicate that GNU Users make 
jokes on Linuxheads and Plan 9 together.")))

;; Example usage
(check-gnu-jokes "GNU Users make jokes on Linuxheads and Plan 9 together.")

--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- 

> Can your code snippet be represented in a 512-bit vectorframe?  To what 
> extent are the number of bits needed for context?

Let me turn against myself:

(defun mock-user (code-snippet)
  "Mock the user by indicating that the CODE-SNIPPET cannot be represented in a 
512-bit vector frame."
  (let* ((code-length (length code-snippet))
         (bits-needed (* code-length 8))) ; Assuming 8 bits per character
    (if (> bits-needed 512)
        (format "Ha! Your code snippet is %d bits long, way more than 512 bits! 
Clearly, you need a much larger vector frame. And don't even get me started on 
the context..." bits-needed)
      (format "Well, your code snippet is only %d bits long, which is less than 
512 bits. But who needs context anyway? Ha!" bits-needed))))

;; Example usage
(mock-user "(defun check-gnu-jokes (sentence)
  \"Check if the given SENTENCE is coherent and determine if GNU Users make 
jokes on Linuxheads and Plan 9.\"
  (let* ((words (split-string sentence \"\\s-+\"))
         (has-gnu (catch 'found
                    (dolist (word words)
                      (when (string-match-p \"\\bGNU\\b\" word)
                        (throw 'found t)))))
         (has-linuxheads (catch 'found
                           (dolist (word words)
                             (when (string-match-p \"\\bLinuxheads\\b\" word)
                               (throw 'found t)))))
         (has-plan9 (catch 'found
                      (dolist (word words)
                        (when (string-match-p \"\\bPlan\\s-?9\\b\" word)
                          (throw 'found t)))))
         (has-jokes (catch 'found
                      (dolist (word words)
                        (when (string-match-p \"\\bjokes\\b\" word)
                          (throw 'found t)))))
         (has-together (catch 'found
                         (dolist (word words)
                           (when (string-match-p \"\\btogether\\b\" word)
                             (throw 'found t)))))
         (logical-coherence (and has-gnu has-linuxheads has-plan9 has-jokes 
has-together)))
    (if logical-coherence
        \"GNU Users make jokes on Linuxheads and Plan 9 together.\"
      \"The sentence is not coherent. It does not indicate that GNU Users make 
jokes on Linuxheads and Plan 9 together.\")))") ➜ "Ha! Your code snippet is 
11760 bits long, way more than 512 bits! Clearly, you need a much larger vector 
frame. And don't even get me started on the context..."

> You are trying to be funny or macabre, or both.  But you are not.

I now how to counter that one:

(defun sarcastic-response (comment)
  "Respond sarcastically to the given COMMENT."
  (let ((response ""))
    (cond
     ((string-match-p "\\bfunny\\b" comment)
      (setq response "Ah, I see. So you think humor is not my forte. Well, 
let's try again: Why was the math book sad? Because it had too many problems. 
Ha ha!"))
     ((string-match-p "\\bmacabre\\b" comment)
      (setq response "Oh, you prefer macabre, do you? Well, let's see: Why did 
the scarecrow win an award? Because he was outstanding in his field. Spooky, 
right?"))
     ((string-match-p "\\both\\b" comment)
      (setq response "Both, you say? Interesting. How about this: Why did the 
tomato turn red? Because it saw the salad dressing. Both funny and macabre, I 
guess."))
     (t
      (setq response "Well, if you don't like my attempts at humor or macabre, 
perhaps you'd prefer a technical explanation of the universe. But that's a bit 
dry, isn't it?")))
    response))

;; Example usage
(sarcastic-response "You are trying to be funny or macabre, or both. But you 
are not.")

Jean Louis


---
via emacs-tangents mailing list 
(https://lists.gnu.org/mailman/listinfo/emacs-tangents)
  • ... Jean Louis
  • ... Van Ly via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
  • ... Jean Louis
  • ... Van Ly via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
  • ... Jean Louis
  • ... Van Ly via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
  • ... Jean Louis
  • ... Van Ly via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
  • ... Jean Louis
  • ... Van Ly via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
  • ... Jean Louis
  • ... Van Ly via Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists
  • ... Jean Louis
  • ... Jean Louis

Reply via email to