stOneskull

joined 1 year ago
[–] stOneskull 3 points 1 year ago

you can see how i use it here: godschat

read from the bottom up

[–] stOneskull 1 points 1 year ago

my head exploded before the end

[–] stOneskull 2 points 1 year ago* (last edited 1 year ago) (2 children)

i've found a good alternative is returning functions

eg. you have a function like this:

def cycle(func): while True: func=func()

then you start with cycle(main)

def main(): return intro

if __name__ == '__main__: cycle(main)

and then main returns the next function, and following functions return functions..

def intro(): if thisthing: return thisfunc if thatthing: return thatfunc

return is being used like goto

[–] stOneskull 1 points 1 year ago* (last edited 1 year ago)

the OpenAI API doesn't like 3.11 at the moment but yeah, it's easy enough to use an earlier version, especially with conda

6
Flip it around (self.python)
submitted 1 year ago by stOneskull to c/python
 

A friend of mine told me once: make dumb algorithms and smart data. This has stuck with me, and I’ve often been annoyed at the annoying annoyance of making the data.

As an amateur, hobbyist, novice programmer, I want to try things. Right now, I want to make a game. Just a simple little game where you travel through the ‘procedural generated’ dungeons and fight monsters. The algorithms can be pretty easy..

here = Room() world.append(here) here.describe()

You could basically make the Room class do everything.

The shitty part is where you think, ‘Ok, what rooms can there be? What monsters do we fight?’

Then it’s like ‘oh, far out, so cool, data entry..’

Data entry work gets you minimum wage. It’s like a sweeping job or working on a conveyor belt in a factory. Compare that to a programmer wage. It’s a big gulf between. And then you waste your time typing all that garbage in. Your precious time.

Get the robot to make your data! The algorithms are easy for you. You don’t need to type all that data in. It’s so much easier to prompt: ‘make me a python dictionary of 23 unique monsters as keys, with values being another dictionary, with keys this and that, and this and that’ and get what you want back than trying to get it to write algorithms for you. It works so much better this way. Flip it around.

You can always go and edit the data. Tweak it how you like, especially the descriptions. And this is going to be easier and more pleasurable than editing and tweaking the shitty code you try to get it to write. Data is easy for these LLMs. It’s like they were born for it. Make them your data slave. You don’t even have to give them minimum wage.

[–] stOneskull 2 points 1 year ago

i've moved to just using conda environments. i find it's a lighter load on my old brain.

[–] stOneskull 0 points 1 year ago* (last edited 1 year ago) (2 children)

i wonder what python version should be recommended as standard? should it be what debian stable currently has as its lastest? i've found some things can't handle the new-ness of 3.11. so is it 3.10?