unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Virtual pet for Emacs
@ 2022-04-24  3:25 vidak
  2022-04-26  9:08 ` Alex
  2022-05-04 11:34 ` Rudolf Adamkovič
  0 siblings, 2 replies; 14+ messages in thread
From: vidak @ 2022-04-24  3:25 UTC (permalink / raw)
  To: help-gnu-emacs

Hello! 

I am making a virtual pet simulation game for Emacs.

I want to be able to build physical versions of the pet, and fund
development  for the next release.

https://www.kickstarter.com/projects/vidak/uwuel-virtual-pet

This is my crowdfunding project page.

You'll note my code is GPLv3 (:

Thanks in advance!

~vidak.



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

* Re: Virtual pet for Emacs
  2022-04-24  3:25 Virtual pet for Emacs vidak
@ 2022-04-26  9:08 ` Alex
  2022-05-04  0:15   ` ~vidak
  2022-05-04 11:34 ` Rudolf Adamkovič
  1 sibling, 1 reply; 14+ messages in thread
From: Alex @ 2022-04-26  9:08 UTC (permalink / raw)
  To: help-gnu-emacs


Thats so cute!

Really nice, I love it. 

How can I download without running non-free JavaScript, fingerprinting
or bullshits alike?

maybe a git:// url?



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

* Re: Virtual pet for Emacs
  2022-04-26  9:08 ` Alex
@ 2022-05-04  0:15   ` ~vidak
  2022-05-04  0:20     ` Emanuel Berg
  2022-05-06 12:00     ` Alex
  0 siblings, 2 replies; 14+ messages in thread
From: ~vidak @ 2022-05-04  0:15 UTC (permalink / raw)
  To: Alex; +Cc: help-gnu-emacs


Hey!

I made an account at sr.ht--so you can use this git url:

https://git.sr.ht/~vidak/uwu.el

(:

hope this helps. please forgive me for not using a free platform, i am
sometimes caught between a rock and a hard place when i try and
distribute software...

you can also find a dev log on my gemini:

gemini://tilde.town/~vidak/programmes/uwu/index.gmi



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

* Re: Virtual pet for Emacs
  2022-05-04  0:15   ` ~vidak
@ 2022-05-04  0:20     ` Emanuel Berg
  2022-05-04  1:14       ` ~vidak
  2022-05-06 12:00     ` Alex
  1 sibling, 1 reply; 14+ messages in thread
From: Emanuel Berg @ 2022-05-04  0:20 UTC (permalink / raw)
  To: help-gnu-emacs

vidak wrote:

> I made an account at sr.ht--so you can use this git url:
>
> https://git.sr.ht/~vidak/uwu.el

You have a direct link to the source?

> hope this helps. please forgive me for not using a free
> platform [...]

"Forgive" is probably not the right word but yeah, some people
won't ever be cool with it.

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Virtual pet for Emacs
  2022-05-04  0:20     ` Emanuel Berg
@ 2022-05-04  1:14       ` ~vidak
  2022-05-04  4:34         ` Emanuel Berg
  0 siblings, 1 reply; 14+ messages in thread
From: ~vidak @ 2022-05-04  1:14 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]


Emanuel Berg <incal@dataswamp.org> writes:

>
> You have a direct link to the source?
>

I have attached the version 2 release to this email, because it is very
small.

I have also attached the README (:


[-- Attachment #2: uwu.el evaluatable code --]
[-- Type: application/emacs-lisp, Size: 7816 bytes --]

[-- Attachment #3: uwu.el data --]
[-- Type: application/emacs-lisp, Size: 13702 bytes --]

[-- Attachment #4: uwu.el README --]
[-- Type: application/octet-stream, Size: 1867 bytes --]


```
┬ ┬┬ ┬┬ ┬ ┌─┐┬ 
│ │││││ │ ├┤ │ 
└─┘└┴┘└─┘o└─┘┴─┘
```

Version 2.

By: ~vidak

=> mailto:vidak@riseup.net vidak@riseup.net

# LICENCE

``` 
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
```

=> https://www.gnu.org/licenses/quick-guide-gplv3.html A quick guide to the GNU GPL v3.

# README

Steps to get *uwu.el* running:

0. Download the two Version 2 files:

```
- uwu.el; and 
- uwu-graphics-v2.el
```

1. Save `uwu.el` and `uwu-graphics-v2.el` to your `~/.emacs.d/` load
  path.

2. Restart Emacs, so that the two files are automatically loaded.

3. If, for some reason, the two files fail to load, run:

```
M-x load-file ~/.emacs.d/path-to/uwu.el
```

and

```
M-x load-file ~/.emacs.d/path-to/uwu-graphics-v2.el
```

4. Open a blank buffer, like *scratch* (for instance) and type:

```
M-x uwu-mode
```

5. Observe the following image:

![](https://img.itch.zone/aW1nLzg2NDU3MzEucG5n/original/tnMX9I.png)

Line 247 in the image **contains your pet's hearts**. You replenish
your pet's hearts by executing:

```
M-x uwu-feed
```

Lines 242 and 243 **contain your pet's poops**. Clean your pet's poops
away by executing:

```
M-x uwu-clean-up
```

6. When you start the game, your 'high score' will, at first, equal
-10 (negative ten). Do not worry! This is normal! Your pet will not
hatch from its egg until your 'high score' reaches 0 (zero).

7. ???

8. UwU

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

* Re: Virtual pet for Emacs
  2022-05-04  1:14       ` ~vidak
@ 2022-05-04  4:34         ` Emanuel Berg
  0 siblings, 0 replies; 14+ messages in thread
From: Emanuel Berg @ 2022-05-04  4:34 UTC (permalink / raw)
  To: help-gnu-emacs

vidak wrote:

>> You have a direct link to the source?
>
> I have attached the version 2 release to this email, because
> it is very small.

Well, don't say that, it's 276 lines which is pretty normal
I'd say. Or let's just say it's exactly 276 ...

Use lexical scope; and make it a proper package - check this
with tools and functions mentioned here [1] ... I also know
Jean has tools for that? To come up with keywords?

I can't byte-compile it because I don't have
`www-graphics-v2', but if you have, and can, and it doesn't
complain about anything, then good.

The code looks good, only in Elisp we don't use the
conventions with +const+ and *dynamic-var* ...

[1] https://dataswamp.org/~incal/emacs-init/ide/pack-style.el

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Virtual pet for Emacs
  2022-04-24  3:25 Virtual pet for Emacs vidak
  2022-04-26  9:08 ` Alex
@ 2022-05-04 11:34 ` Rudolf Adamkovič
  2022-05-04 15:53   ` vidak
                     ` (2 more replies)
  1 sibling, 3 replies; 14+ messages in thread
From: Rudolf Adamkovič @ 2022-05-04 11:34 UTC (permalink / raw)
  To: vidak, help-gnu-emacs

vidak@riseup.net writes:

> Hello! 

Howdy!

> I am making a virtual pet simulation game for Emacs.

I wanted to try the pet today, but when I run ‘uwu-mode’, I get:

Error running timer ‘uwu-animation-loop’: (void-function return)

I tracked the problem down to:

(defun points-to-evolution (total-points)
  (dolist (points +pet-evolution-tree+)
    (if (> (car points) total-points)
	(return ;; <------------------- HERE
	 (nth 1
	  (assoc (car points) +pet-evolution-tree+))))))

My Emacs (v29 from Git) does not define "return".

Any ideas what to do?

Rudy
-- 
"Genius is 1% inspiration and 99% perspiration."
-- Thomas Alva Edison, 1932

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



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

* Re: Virtual pet for Emacs
  2022-05-04 11:34 ` Rudolf Adamkovič
@ 2022-05-04 15:53   ` vidak
  2022-05-04 18:36     ` Emanuel Berg
  2022-05-04 18:35   ` Emanuel Berg
  2022-05-05  2:14   ` Stefan Monnier via Users list for the GNU Emacs text editor
  2 siblings, 1 reply; 14+ messages in thread
From: vidak @ 2022-05-04 15:53 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: help-gnu-emacs

On 2022-05-04 19:34, Rudolf Adamkovič wrote:
> vidak@riseup.net writes:
> 
>> Hello!
> 
> Howdy!
> 
>> I am making a virtual pet simulation game for Emacs.
> 
> I wanted to try the pet today, but when I run ‘uwu-mode’, I get:
> 
> Error running timer ‘uwu-animation-loop’: (void-function return)
> 
> I tracked the problem down to:
> 
> (defun points-to-evolution (total-points)
>   (dolist (points +pet-evolution-tree+)
>     (if (> (car points) total-points)
> 	(return ;; <------------------- HERE
> 	 (nth 1
> 	  (assoc (car points) +pet-evolution-tree+))))))
> 
> My Emacs (v29 from Git) does not define "return".
> 
> Any ideas what to do?
> 
> Rudy

Hey! I just wanted to email back quickly to say I have seen your email,
and I think I have a quick fix!

I am just going to bed now, when I get back to my workstation I will
make the necessary changes (:

~vidak



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

* Re: Virtual pet for Emacs
  2022-05-04 11:34 ` Rudolf Adamkovič
  2022-05-04 15:53   ` vidak
@ 2022-05-04 18:35   ` Emanuel Berg
  2022-05-05  2:14   ` Stefan Monnier via Users list for the GNU Emacs text editor
  2 siblings, 0 replies; 14+ messages in thread
From: Emanuel Berg @ 2022-05-04 18:35 UTC (permalink / raw)
  To: help-gnu-emacs

Rudolf Adamkovič wrote:

> (defun points-to-evolution (total-points)
>   (dolist (points +pet-evolution-tree+)
>     (if (> (car points) total-points)
> 	(return ;; <------------------- HERE
> 	 (nth 1
> 	  (assoc (car points) +pet-evolution-tree+))))))
>
> My Emacs (v29 from Git) does not define "return".
>
> Any ideas what to do?

Remove it, the return concept is moronic anyway :)

In Lisp you don't need it since everything evaluates into
something anyway.

But I think there is a return in `cl-loop' actually ... the
exception that proves the rule, right?

  - Today we have a delivery to the Forbidden Zone.
  
  - Excuse me, are we even allowed in the Forbidden Zone?
  
  - Of course! it's just a name, like the Zone of Death or
  - Zone of No Return.

Lisp World! <3

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Virtual pet for Emacs
  2022-05-04 15:53   ` vidak
@ 2022-05-04 18:36     ` Emanuel Berg
  0 siblings, 0 replies; 14+ messages in thread
From: Emanuel Berg @ 2022-05-04 18:36 UTC (permalink / raw)
  To: help-gnu-emacs

vidak wrote:

> I am just going to bed now, when I get back to my
> workstation I will make the necessary changes (:

  A train station is a place where trains stop.

  A workstation is a place where work ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Virtual pet for Emacs
  2022-05-04 11:34 ` Rudolf Adamkovič
  2022-05-04 15:53   ` vidak
  2022-05-04 18:35   ` Emanuel Berg
@ 2022-05-05  2:14   ` Stefan Monnier via Users list for the GNU Emacs text editor
  2022-05-05  3:19     ` Emanuel Berg
  2 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-05-05  2:14 UTC (permalink / raw)
  To: help-gnu-emacs

> (defun points-to-evolution (total-points)
>   (dolist (points +pet-evolution-tree+)
>     (if (> (car points) total-points)
> 	(return ;; <------------------- HERE
> 	 (nth 1
> 	  (assoc (car points) +pet-evolution-tree+))))))

That should be `cl-dolist` and `cl-return`.


        Stefan




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

* Re: Virtual pet for Emacs
  2022-05-05  2:14   ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2022-05-05  3:19     ` Emanuel Berg
  2022-05-05  3:47       ` Emanuel Berg
  0 siblings, 1 reply; 14+ messages in thread
From: Emanuel Berg @ 2022-05-05  3:19 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier via Users list for the GNU Emacs text editor wrote:

>> (defun points-to-evolution (total-points)
>>   (dolist (points +pet-evolution-tree+)
>>     (if (> (car points) total-points)
>> 	(return ;; <------------------- HERE
>> 	 (nth 1
>> 	  (assoc (car points) +pet-evolution-tree+))))))
>
> That should be `cl-dolist` and `cl-return`.

Oh, so that's the intention, then rather than that use a list
(higher-order) function!

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Virtual pet for Emacs
  2022-05-05  3:19     ` Emanuel Berg
@ 2022-05-05  3:47       ` Emanuel Berg
  0 siblings, 0 replies; 14+ messages in thread
From: Emanuel Berg @ 2022-05-05  3:47 UTC (permalink / raw)
  To: help-gnu-emacs

>>> (defun points-to-evolution (total-points)
>>>   (dolist (points +pet-evolution-tree+)
>>>     (if (> (car points) total-points)
>>> 	(return ;; <------------------- HERE
>>> 	 (nth 1
>>> 	  (assoc (car points) +pet-evolution-tree+))))))
>>
>> That should be `cl-dolist` and `cl-return`.
>
> Oh, so that's the intention, then rather than that use
> a list (higher-order) function!

That code has a lot of things that can be improved,

- get away with `cl-return', use for example `cl-find-if'
  instead

- don't do (car points) twice

- don't search the list twice (first `cl-dolist', then
  `assoc')

- better names: if "points" are extracted from the
  pet-evolution (remove the CL naming conventions with plus
  signs around a constant; also there is no reason to say what
  data structure a data structure is in its name, cmp.
  `user-full-name' not "user-full-name-string")

I actually think all or almost all will be fixed if the first
issue is fixed ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Virtual pet for Emacs
  2022-05-04  0:15   ` ~vidak
  2022-05-04  0:20     ` Emanuel Berg
@ 2022-05-06 12:00     ` Alex
  1 sibling, 0 replies; 14+ messages in thread
From: Alex @ 2022-05-06 12:00 UTC (permalink / raw)
  To: ~vidak; +Cc: help-gnu-emacs

~vidak <vidak@riseup.net> writes:
> Hey!

> I made an account at sr.ht--so you can use this git url:

> https://git.sr.ht/~vidak/uwu.el

> (:

yay! UwU

add donate stuff in sr.ht

> you can also find a dev log on my gemini:

> gemini://tilde.town/~vidak/programmes/uwu/index.gmi

gemini! ill check it with elpher.el! Thanks!



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

end of thread, other threads:[~2022-05-06 12:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-24  3:25 Virtual pet for Emacs vidak
2022-04-26  9:08 ` Alex
2022-05-04  0:15   ` ~vidak
2022-05-04  0:20     ` Emanuel Berg
2022-05-04  1:14       ` ~vidak
2022-05-04  4:34         ` Emanuel Berg
2022-05-06 12:00     ` Alex
2022-05-04 11:34 ` Rudolf Adamkovič
2022-05-04 15:53   ` vidak
2022-05-04 18:36     ` Emanuel Berg
2022-05-04 18:35   ` Emanuel Berg
2022-05-05  2:14   ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-05-05  3:19     ` Emanuel Berg
2022-05-05  3:47       ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).