|
i'm working on a project and I'm doing it in python with curses. seems cool so far. it tells me when the terminal size changes and I can write text to the screen and handle input. I'm not having too much trouble finding documentation/examples. should I be using some other bullshit? curses is available on the host I'm working with (sdf dot org) and I assume its available on a wide variety of platforms so it seems natural to me. also is it normal to wrap the write function so it doesn't crash the program every time you accidentally write outside the screen buffer
|
# ? Feb 11, 2024 02:15 |
|
|
# ? Apr 29, 2024 11:51 |
|
I hosed around with curses for some roguelike projects it’s kinda of a pita. wrapping most of it in a function to cleanly exit on an exception or something without loving your terminal up is pretty normal I think
|
# ? Feb 11, 2024 02:25 |
|
also the y, x coordinate convention is stupid
|
# ? Feb 11, 2024 02:26 |
|
I learned you can type stty sane ^J to unfuck the terminal
|
# ? Feb 11, 2024 02:31 |
|
using python is enough of a curse xD
|
# ? Feb 11, 2024 02:39 |
|
I like python. first love I guess
|
# ? Feb 11, 2024 02:41 |
|
Silver Alicorn posted:I learned you can type stty sane ^J to unfuck the terminal huh TIL
|
# ? Feb 11, 2024 03:32 |
|
i think u need to talk to a computer witch
|
# ? Feb 11, 2024 04:48 |
|
hm. I know one of those on co host
|
# ? Feb 11, 2024 04:49 |
|
im programming a curse on you right now
|
# ? Feb 11, 2024 05:13 |
|
curses is one of those libraries that makes you think “oh drat, I could do a whole aesthetic in this. why did computers ever evolve guis?” and then “I want to kill myself” like 5 mins later
|
# ? Feb 11, 2024 06:06 |
|
i like rich for just easily prettying up a program: https://github.com/Textualize/rich the sister project textual is something to have seen once, but rather a step too far for any need i've ever had: https://github.com/Textualize/textual
|
# ? Feb 11, 2024 09:41 |
|
love a good tui, lazygit and k9s being examples of stuff i use at work because of its nice tuish nature if you can stomach go, i’ve been meaning to give https://github.com/charmbracelet/bubbletea a try
|
# ? Feb 11, 2024 10:03 |
|
Armitag3 posted:if you can stomach go, let me stop you right there,
|
# ? Feb 11, 2024 14:22 |
|
idk i've never even seen go code. is it any good?
|
# ? Feb 11, 2024 14:22 |
|
curses is just linuxailures failing to copy turbovision
|
# ? Feb 11, 2024 14:30 |
|
Sweevo posted:curses is just linuxailures failing to copy the Minitel
|
# ? Feb 11, 2024 14:44 |
|
Silver Alicorn posted:idk i've never even seen go code. is it any good? quote:designed at Google
|
# ? Feb 11, 2024 15:38 |
|
code:
|
# ? Feb 11, 2024 15:42 |
|
well I'm having an ok time programming with curses, it seems to do what I need. I'm wrapping functions to make them do what I want (i.e. a wrapper around getkey() to handle inputs like KEY_RESIZE in a useful way). i'll let you know if I find any cool tricks
|
# ? Feb 11, 2024 16:33 |
|
I just got mouse input working I've done all this before, it's kinda sad how much I forgot after 8? months
|
# ? Feb 11, 2024 16:56 |
|
notcurses looks pretty cool
|
# ? Feb 11, 2024 16:59 |
|
loving programming
|
# ? Feb 11, 2024 19:48 |
|
ah, screen.getstr() returns a bytes object and not an actual string, so I have to decode it from utf8 or whatever to actually use it. strange choice
|
# ? Feb 11, 2024 21:31 |
|
some of those that program curses are the same that run posix
|
# ? Feb 11, 2024 22:30 |
|
Sweevo posted:curses is just linuxailures failing to copy turbovision They ported turbovision to linux https://github.com/magiblot/tvision
|
# ? Feb 11, 2024 23:24 |
|
this isn’t so much curses as general python but I worked out how to make a tree
|
# ? Feb 15, 2024 04:18 |
|
If you wanted a tree skip the python and just bury a seed, ya silly!
|
# ? Feb 15, 2024 04:41 |
|
I tried growing an avocado once but it got some kind of rot and died
|
# ? Feb 15, 2024 04:46 |
|
op make a yospos roguelike green, natch
|
# ? Feb 15, 2024 04:55 |
|
im making a game but not that.
|
# ? Feb 15, 2024 05:02 |
|
curses is pretty cursed i like urwid for python tuis. it was abandoned for a few years but seems to be alive again now \o/
|
# ? Feb 15, 2024 09:09 |
|
i curse a lot when i'm programming, does that help op?
|
# ? Feb 15, 2024 09:25 |
|
10 PRINT “gently caress THIS poo poo” 20 GOTO 10
|
# ? Feb 15, 2024 09:35 |
|
i program curses for enemy technowizards
|
# ? Feb 15, 2024 09:50 |
|
Grum posted:some of those that program curses
|
# ? Feb 15, 2024 10:20 |
|
thanks for the suggestions for alternatives but I don’t think I’m able to install them on the SDF public access Unix system. maybe I can ask though
|
# ? Feb 15, 2024 14:06 |
|
oh btw I tried loading my game on Windows and it just quits back to the command prompt after like 5 seconds, without displaying anything. dunno what’s up with that. yes I have python and curses installed
|
# ? Feb 15, 2024 16:56 |
|
Silver Alicorn posted:oh btw I tried loading my game on Windows and it just quits back to the command prompt after like 5 seconds, without displaying anything. dunno what’s up with that. yes I have python and curses installed i can’t help you op. i also don’t know why
|
# ? Feb 15, 2024 17:15 |
|
|
# ? Apr 29, 2024 11:51 |
|
thanks anyway
|
# ? Feb 15, 2024 17:17 |