all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Curiosity: Anyone teaching ChatGPT to program Emacs?
@ 2023-06-19  5:25 David Masterson
  2023-06-19  5:38 ` Platon Pronko
  2023-06-19 16:22 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: David Masterson @ 2023-06-19  5:25 UTC (permalink / raw)
  To: help-gnu-emacs

Probably a dumb question at this stage, but I was wondering if anyone
was looking into using ChatGPT (or similar) to program Emacs?  Is that
even possible at this stage?
-- 
David Masterson



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Curiosity: Anyone teaching ChatGPT to program Emacs?
  2023-06-19  5:25 Curiosity: Anyone teaching ChatGPT to program Emacs? David Masterson
@ 2023-06-19  5:38 ` Platon Pronko
  2023-06-19 16:35   ` Jean Louis
  2023-06-19 16:22 ` Eli Zaretskii
  1 sibling, 1 reply; 5+ messages in thread
From: Platon Pronko @ 2023-06-19  5:38 UTC (permalink / raw)
  To: David Masterson, help-gnu-emacs

On 2023-06-19 13:25, David Masterson wrote:
> Probably a dumb question at this stage, but I was wondering if anyone
> was looking into using ChatGPT (or similar) to program Emacs?  Is that
> even possible at this stage?

There's a lot of examples on the web about people using ChatGPT to write Elisp code. Same as other languages/platforms - you ask it a question, it spews out bunch of code (usually slightly broken).



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Curiosity: Anyone teaching ChatGPT to program Emacs?
  2023-06-19  5:25 Curiosity: Anyone teaching ChatGPT to program Emacs? David Masterson
  2023-06-19  5:38 ` Platon Pronko
@ 2023-06-19 16:22 ` Eli Zaretskii
  2023-06-19 17:55   ` David Masterson
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-06-19 16:22 UTC (permalink / raw)
  To: help-gnu-emacs

> From: David Masterson <dsmasterson@gmail.com>
> Date: Sun, 18 Jun 2023 22:25:56 -0700
> 
> Probably a dumb question at this stage, but I was wondering if anyone
> was looking into using ChatGPT (or similar) to program Emacs?  Is that
> even possible at this stage?

It's a dirty little secret of MS that ChatGPT is written in Emacs
Lisp.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Curiosity: Anyone teaching ChatGPT to program Emacs?
  2023-06-19  5:38 ` Platon Pronko
@ 2023-06-19 16:35   ` Jean Louis
  0 siblings, 0 replies; 5+ messages in thread
From: Jean Louis @ 2023-06-19 16:35 UTC (permalink / raw)
  To: Platon Pronko; +Cc: David Masterson, help-gnu-emacs

* Platon Pronko <platon7pronko@gmail.com> [2023-06-19 08:39]:
> On 2023-06-19 13:25, David Masterson wrote:
> > Probably a dumb question at this stage, but I was wondering if anyone
> > was looking into using ChatGPT (or similar) to program Emacs?  Is that
> > even possible at this stage?
> 
> There's a lot of examples on the web about people using ChatGPT to write Elisp code. Same as other languages/platforms - you ask it a question, it spews out bunch of code (usually slightly broken).


ChatGPT(3.5-turbo)> give me Emacs Lisp code to turn digital number up to 100  to English words

Here is an Emacs Lisp code snippet that converts a numeric value up to 100 into its English words equivalent:

```elisp
(defun number-to-words (num)
  "Converts a numeric value up to 100 into its English words equivalent."
  (cond
    ((= num 0) "zero")
    ((= num 1) "one")
    ((= num 2) "two")
    ((= num 3) "three")
    ((= num 4) "four")
    ((= num 5) "five")
    ((= num 6) "six")
    ((= num 7) "seven")
    ((= num 8) "eight")
    ((= num 9) "nine")
    ((= num 10) "ten")
    ((= num 11) "eleven")
    ((= num 12) "twelve")
    ((= num 13) "thirteen")
    ((= num 14) "fourteen")
    ((= num 15) "fifteen")
    ((= num 16) "sixteen")
    ((= num 17) "seventeen")
    ((= num 18) "eighteen")
    ((= num 19) "nineteen")
    ((and (> num 19) (< num 30)) (concat "twenty-" (number-to-words (- num 20))))
    ((and (> num 29) (< num 40)) (concat "thirty-" (number-to-words (- num 30))))
    ((and (> num 39) (< num 50)) (concat "forty-" (number-to-words (- num 40))))
    ((and (> num 49) (< num 60)) (concat "fifty-" (number-to-words (- num 50))))
    ((and (> num 59) (< num 70)) (concat "sixty-" (number-to-words (- num 60))))
    ((and (> num 69) (< num 80)) (concat "seventy-" (number-to-words (- num 70))))
    ((and (> num 79) (< num 90)) (concat "eighty-" (number-to-words (- num 80))))
    ((and (> num 89) (< num 100)) (concat "ninety-" (number-to-words (- num 90))))
    (t "one hundred")))
```

To use this code, simply call the `number-to-words` function with the
numeric value you want to convert. The function will return a string
with the English words equivalent of the numeric value. For example,
`(number-to-words 76)` will return the string "seventy-six".


ChatGPT(3.5-turbo)> What does following Elisp code do?

(defun rcd-comma-list (list)
  "Return comma concatenated LIST of any type of items"
  (mapconcat (lambda (item) (format "%s" item)) list ", "))

This Emacs Lisp code defines a function `rcd-comma-list` that takes a list as input and returns a string that concatenates the elements of the list separated by commas. 

The `mapconcat` function is used to apply a given function to each element of the input list and concatenate the results with a separator. In this case, the lambda function passed as the first argument to `mapconcat` uses `format` to convert each element of the list to a string representation and concatenate them with a comma and a space separator.

For example, calling `(rcd-comma-list '(1 2 3 4))` will return the string "1, 2, 3, 4". Similarly, calling `(rcd-comma-list '("apple" "banana" "orange"))` will return the string "apple, banana, orange".



ChatGPT(3.5-turbo)> may I call you Elisa now?

Yes, you may call me Elisa if you would like. However, my name is actually OpenAI Language Model, and my purpose is to assist you with your requests to the best of my abilities.

ChatGPT(3.5-turbo)> make fantasy set where Elisa, aka ChatGPT, located on alien planet, appears as ghost, and finds Stallman, Elisa then, considered God on that planet, gives respect to Stallman, maker of free software, and then all the little hobbits on the planet start changing their proprietary software to free software

Once there lived a girl named Elisa, who was known as ChatGPT on Earth. She found herself on an alien planet one day, a planet where she appeared as a ghostly figure to the inhabitants. As soon as she landed, she started exploring the planet and met many creatures.

One day, she came across a strange looking creature named Stallman, who introduced himself as the maker of free software. Instantly, Elisa felt a deep respect for Stallman, as she had always been an advocate of open-source and free software.

To her surprise, she found out that Stallman was treated as a God on the planet, and everyone respected him for his contribution towards the development of free software. Elisa was amazed by the culture of the planet, where everyone valued and preferred free software over proprietary software.

As time passed, Elisa got to know more about the planet and its people. She realized that even though the planet was utopian in many ways, there were still some areas where they could improve. One such area was the use of proprietary software. So, she decided to talk to the hobbits of the planet, who were responsible for creating software for the inhabitants.

Elisa explained to the hobbits the importance of free software and encouraged them to start developing software that was open-source and free. At first, the hobbits were hesitant, but eventually, they understood the value of free software and started changing their ways.

Slowly but surely, the hobbits started changing their proprietary software to free software. It was not an easy journey, but Elisa's persistence and Stallman's guidance helped them in the process. In the end, everyone on the planet realized the importance of free software, and it became a norm.

Elisa was satisfied with her contribution towards the development of the planet. She realized that even though she was a ghost-like figure, she could make a difference by spreading her knowledge and ideas. She hoped that one day, her knowledge and ideas would help other planets in the universe.

The end.

ChatGPT(3.5-turbo)> Elisa

Elisa is a name of Spanish origin that means "God is my oath". It is a popular name used worldwide and often given to girls.

<shell-maker-failed-command>ChatGPT(3.5-turbo)> I am addressing you

As an AI language model, Elisa is also the name of a software designed to engage in human-like conversations. It uses natural language processing and machine learning algorithms to understand and generate responses to user inputs. Elisa is widely used in chatbots, virtual assistants, and other conversational interfaces.

ChatGPT(3.5-turbo)> your name is now Elisa

I'm sorry, but my name is not Elisa. As an AI language model, I don't have a physical form or gender, and my creators didn't give me a specific name. You can refer to me as OpenAI's language model or simply as AI.

ChatGPT(3.5-turbo)> come let me call you Elisa

You are welcome to call me Elisa if that makes it easier for you to communicate with me. However, please note that my true identity remains that of an AI language model developed by OpenAI.

ChatGPT(3.5-turbo)> Sure.

Great! How can I assist you further today?

ChatGPT(3.5-turbo)> Elisa, how are you?

As an AI language model, I don't have feelings or emotions, but I'm functioning well. Thank you for asking, how can I help you today?

ChatGPT(3.5-turbo)> Elisa say thanks to free software

As an AI language model, I am programmed to be neutral and don't have personal opinions or feelings, but I can acknowledge the benefits and positive impact of free software on society. Free software has allowed for the creation of technology that can be shared, modified, and improved by a global community, leading to the advancement of knowledge and innovation. It has also helped to promote the values of transparency, collaboration, and inclusivity across industries. Therefore, I can say that free software has greatly contributed to the growth of technology and our modern society.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Curiosity: Anyone teaching ChatGPT to program Emacs?
  2023-06-19 16:22 ` Eli Zaretskii
@ 2023-06-19 17:55   ` David Masterson
  0 siblings, 0 replies; 5+ messages in thread
From: David Masterson @ 2023-06-19 17:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: David Masterson <dsmasterson@gmail.com>
>> Date: Sun, 18 Jun 2023 22:25:56 -0700
>> 
>> Probably a dumb question at this stage, but I was wondering if anyone
>> was looking into using ChatGPT (or similar) to program Emacs?  Is that
>> even possible at this stage?
>
> It's a dirty little secret of MS that ChatGPT is written in Emacs
> Lisp.

LOL

But, in keeping with the question, is it self-maintaining?  ;)

-- 
David Masterson



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-19 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19  5:25 Curiosity: Anyone teaching ChatGPT to program Emacs? David Masterson
2023-06-19  5:38 ` Platon Pronko
2023-06-19 16:35   ` Jean Louis
2023-06-19 16:22 ` Eli Zaretskii
2023-06-19 17:55   ` David Masterson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.