Post A1of5yYpIrHBi39fFI by nonetrix@neckbeard.xyz
 (DIR) More posts by nonetrix@neckbeard.xyz
 (DIR) Post #A1oJ7PeBsqcj0ywaTw by nonetrix@neckbeard.xyz
       2020-12-03T02:44:39.536457Z
       
       2 likes, 1 repeats
       
       this is how you debug code right?debug.png
       
 (DIR) Post #A1oJBG79GjCcbiK4f2 by battlepenguin@noagendasocial.com
       2020-12-03T02:45:19Z
       
       0 likes, 0 repeats
       
       @nonetrix hall-o-shame
       
 (DIR) Post #A1oJGNGK7VtiDy3NTM by icedquinn@blob.cat
       2020-12-03T02:46:16.494837Z
       
       1 likes, 0 repeats
       
       @nonetrix i wouldn't print numbers but yeah strategic printfs is what i use most of the time.
       
 (DIR) Post #A1oJItWh8NgYruueeG by fluffy@social.handholding.io
       2020-12-03T02:46:43.146011Z
       
       0 likes, 0 repeats
       
       @nonetrix Yes
       
 (DIR) Post #A1oJitlIsfC38295Dk by ink8@the9thcircle.club
       2020-12-03T02:49:43.823Z
       
       1 likes, 1 repeats
       
       @nonetrix@neckbeard.xyz You need the rubber ducky.You explain to that ducky the code, step by step, and eventually you throw him across the room in anger after realizing what you did wrong. Then you fix the code.#rubberduckyrights2020
       
 (DIR) Post #A1oJlJcdhhOFubFHXc by nonetrix@neckbeard.xyz
       2020-12-03T02:51:52.179976Z
       
       0 likes, 0 repeats
       
       @ink8 WHY IS IT FREEZING ON ch = stdscr.getch()WTFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
       
 (DIR) Post #A1oJn9kjMxbDshuLyq by icedquinn@blob.cat
       2020-12-03T02:52:11.807297Z
       
       0 likes, 0 repeats
       
       @ink8 @nonetrix this but mines a spider and i don't throw it. :agummyhug:
       
 (DIR) Post #A1oJolMl0dqCpJScUq by a7@pleroma.mouse.services
       2020-12-03T02:52:29.656273Z
       
       0 likes, 0 repeats
       
       @nonetrix ya sometimes, but i dont generally do it for every line
       
 (DIR) Post #A1oJu6QQ8iRhaWiif2 by nonetrix@neckbeard.xyz
       2020-12-03T02:53:27.589345Z
       
       0 likes, 0 repeats
       
       @icedquinn @ink8 I hate spiders
       
 (DIR) Post #A1oK3flA8UO5mZz9ou by a7@pleroma.mouse.services
       2020-12-03T02:55:11.245395Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 its probably waiting for that char
       
 (DIR) Post #A1oKDCt4L0sF8FEJhB by nonetrix@neckbeard.xyz
       2020-12-03T02:56:54.272046Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 but y
       
 (DIR) Post #A1oKW1qFd31yNRt2p6 by thatfightnerd@kiwifarms.cc
       2020-12-03T03:00:19.527710Z
       
       0 likes, 0 repeats
       
       @nonetrix Still better than most.
       
 (DIR) Post #A1oKWtMgdBT4NOTCEq by a7@pleroma.mouse.services
       2020-12-03T03:00:27.831575Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 i think you gotta set no delay or something and then check getch and unset and refresh
       
 (DIR) Post #A1oKhjWrXatl3YOoOe by icedquinn@blob.cat
       2020-12-03T03:02:26.026521Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 :blobcatglare:
       
 (DIR) Post #A1oKkcSoGZ100osbQm by Meeper@blob.cat
       2020-12-03T03:02:57.359298Z
       
       0 likes, 0 repeats
       
       @icedquinn @nonetrix @ink8 Spider is a qt
       
 (DIR) Post #A1oNxCYWCb9lHsF0fA by urusan@fosstodon.org
       2020-12-03T03:38:49Z
       
       0 likes, 0 repeats
       
       @a7 @nonetrix @ink8 By the time you are adding print statements to every line, you should probably just use a debugger.Assuming you don't have an IDE with a debugger, there's this: https://realpython.com/python-debugging-pdb/
       
 (DIR) Post #A1oO2IQHocKivqothg by a7@pleroma.mouse.services
       2020-12-03T03:39:45.163547Z
       
       1 likes, 1 repeats
       
       @urusan @nonetrix @ink8 na man screw that print statement every statement!
       
 (DIR) Post #A1oODx3x3f3s9wvllg by urusan@fosstodon.org
       2020-12-03T03:41:51Z
       
       1 likes, 0 repeats
       
       @a7 @nonetrix @ink8 Oh ya, you're right, what was I thinking!
       
 (DIR) Post #A1oOq6IbAN1FoEyMRU by urusan@fosstodon.org
       2020-12-03T03:48:44Z
       
       0 likes, 0 repeats
       
       @a7 @nonetrix @ink8 Oh, also, what happens when you use getstr() instead of getch()?
       
 (DIR) Post #A1oP0H3W1msq4Blj2O by nonetrix@neckbeard.xyz
       2020-12-03T03:50:36.198870Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 I'll checc when I stop being a lazy bimbo
       
 (DIR) Post #A1oP97tDTbqqFEAkhk by a7@pleroma.mouse.services
       2020-12-03T03:52:11.574670Z
       
       0 likes, 0 repeats
       
       @urusan @nonetrix @ink8 i think they are basically the same, idk, i havent played with ncurses consistently enough to have it in my head by default.but i do think default behavior getch is to wait for input, and you can set nodelay and set and unset checking if error when called and if not error means input or something - using it like polling
       
 (DIR) Post #A1oQeHDQx6QY6H2wUK by nonetrix@neckbeard.xyz
       2020-12-03T04:09:02.054132Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 anyway same issue..
       
 (DIR) Post #A1oQhl06fW6tLUTLhg by nonetrix@neckbeard.xyz
       2020-12-03T04:09:39.628123Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 tried the no delay thing but makes the keys not work might be doing something wrong idk
       
 (DIR) Post #A1oQpxjNDqAF8zYfmy by a7@pleroma.mouse.services
       2020-12-03T04:11:08.680943Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan should google around, i think theres a part in the classic ncurses tutorial in c that covers this, there also might be some samples in your python modules docs
       
 (DIR) Post #A1oQwaMCWWpyg8sTEO by nonetrix@neckbeard.xyz
       2020-12-03T04:12:20.643216Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan I like the C/C++ ncurses more but doing audio seems to be a nightmare if I could get that working would rewrite it in C or C++ tbh
       
 (DIR) Post #A1oR2Ru6rgeKCQXAyu by nonetrix@neckbeard.xyz
       2020-12-03T04:13:24.380796Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan been having issues with pygame might try to look into it again also rust seems to have some nice library's for audio but don't know too much about rust yet
       
 (DIR) Post #A1oR36x2FiLpVNDajY by a7@pleroma.mouse.services
       2020-12-03T04:13:31.312711Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan well it should likely be almost exactly the same in terms of functionality, maybe just some things wrapped together or maybe some name changes
       
 (DIR) Post #A1oR5bHETO0k8bqtay by a7@pleroma.mouse.services
       2020-12-03T04:13:58.386387Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan oh pygame, i thought you were just doing python ncurses
       
 (DIR) Post #A1oRBMDLOA1X9vmKbA by a7@pleroma.mouse.services
       2020-12-03T04:15:00.626405Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan oh  i see you are using pygame to play audiogotcha
       
 (DIR) Post #A1oREauVCnNnbhVcdU by nonetrix@neckbeard.xyz
       2020-12-03T04:15:35.902595Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan it's a music player so both
       
 (DIR) Post #A1oRML8xi49n1Xxwoa by nonetrix@neckbeard.xyz
       2020-12-03T04:16:59.315389Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan you can look at the source here currently still has the same problem but I didn't know when I made the commit oh well not like anyone uses this shithttps://github.com/nonetrix/YANMP
       
 (DIR) Post #A1oRuwQVbBiKV7fkSu by a7@pleroma.mouse.services
       2020-12-03T04:23:14.628230Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan https://docs.python.org/3/howto/curses.html#user-input>It’s possible to not wait for the user using the nodelay() window method. After nodelay(True), getch() and getkey() for the window become non-blocking. To signal that no input is ready, getch() returns curses.ERR (a value of -1) and getkey() raises an exception. There’s also a halfdelay() function, which can be used to (in effect) set a timer on each getch(); if no input becomes available within a specified delay (measured in tenths of a second), curses raises an exception.
       
 (DIR) Post #A1oS4WsjQdEaAfRfvM by nonetrix@neckbeard.xyz
       2020-12-03T04:24:57.195087Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan I am confusion but ok
       
 (DIR) Post #A1oSCmc6p09vHNbd68 by a7@pleroma.mouse.services
       2020-12-03T04:26:28.342879Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan i am always confusedcheck out my charlie chaplin
       
 (DIR) Post #A1oSKdKvCKmGp6JHQ8 by urusan@fosstodon.org
       2020-12-03T04:27:52Z
       
       0 likes, 0 repeats
       
       @nonetrix @a7 @ink8 PyGame is built on top of SDL https://wiki.libsdl.org/CategoryAudio
       
 (DIR) Post #A1oSOw35ZG9y171JC4 by nonetrix@neckbeard.xyz
       2020-12-03T04:28:40.615436Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 I'll look into SDL
       
 (DIR) Post #A1oST4oQvW8qM58jWy by urusan@fosstodon.org
       2020-12-03T04:29:24Z
       
       0 likes, 0 repeats
       
       @nonetrix @a7 @ink8 https://lazyfoo.net/tutorials/SDL/21_sound_effects_and_music/index.phpRest of the tutorial https://lazyfoo.net/tutorials/SDL/index.php
       
 (DIR) Post #A1oShZnSWaX4VOb9KC by nonetrix@neckbeard.xyz
       2020-12-03T04:32:02.081158Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 SDL seem pretty easy might play around with it in C or C++(I don't know which one to use tbh half of the time ;-;)
       
 (DIR) Post #A1oT0W0Uq4X0Fnj8dc by a7@pleroma.mouse.services
       2020-12-03T04:35:27.668984Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan i think you want something like thisstdscr.delay(False)if ch != curses.ERR                if ch == ord('c'):                    if pause == 1:                        pygame.mixer.music.unpause()                        pause = 0                    else:                        pygame.mixer.music.pause()                        pause = 1                if ch == ord('x'):                    pygame.mixer.music.stop()but with indentation that is correct
       
 (DIR) Post #A1oTYOT9N3EcinHfqy by nonetrix@neckbeard.xyz
       2020-12-03T04:41:34.774148Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan I think you got the name wrong it seems pretty much the same as I did tho'_curses.window' object has no attribute 'delay'
       
 (DIR) Post #A1oTfOFKb83Y3c9lZI by a7@pleroma.mouse.services
       2020-12-03T04:42:50.559667Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan there is something with the attribute delay somewhere, its in the docs docs don’t lie
       
 (DIR) Post #A1oTiZoE421SmszuoC by nonetrix@neckbeard.xyz
       2020-12-03T04:43:25.435787Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan ;-;
       
 (DIR) Post #A1oTr9PTaKKXWBVf5k by nonetrix@neckbeard.xyz
       2020-12-03T04:44:58.725027Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan I don't know what I did but it's working now
       
 (DIR) Post #A1oTt7CalSVxFYQ5wm by a7@pleroma.mouse.services
       2020-12-03T04:45:19.635163Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan noice
       
 (DIR) Post #A1oTypIsDxsbTY56sy by a7@pleroma.mouse.services
       2020-12-03T04:46:21.878027Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan now you owe me 25 in buttcoin for tech support, or just post programing socks
       
 (DIR) Post #A1oU2aoU2Ybph3f90K by nonetrix@neckbeard.xyz
       2020-12-03T04:47:02.707600Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan I have to add time.sleep or the CPU usage is super high this isn't ideal since it makes key presses delayed any good work around?
       
 (DIR) Post #A1oU7L8VkpJqWJII2S by a7@pleroma.mouse.services
       2020-12-03T04:47:54.068358Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan i think its in that paragraph about delay, read carefully young grass hopper
       
 (DIR) Post #A1oU7ymwKRpbUzVcy8 by nonetrix@neckbeard.xyz
       2020-12-03T04:48:00.770626Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan @10grans give 0.001
       
 (DIR) Post #A1oUIcynklTp2u8Q5Y by urusan@fosstodon.org
       2020-12-03T04:49:55Z
       
       0 likes, 0 repeats
       
       @a7 @nonetrix @ink8 Interestingly enough, I was thinking about implementing something similar to PyGame in Julia, so I looked deeply into how PyGame and SDL are related (hence why I know about PyGame being based on SDL), and I found out that the authors of PyGame added a ton of extra stuff to SDL.That said, SDL does all the real heavy lifting and PyGame mostly adds convenience methods (some of which are very nice though).
       
 (DIR) Post #A1oUOnomMy2EOjOK8m by a7@pleroma.mouse.services
       2020-12-03T04:51:03.260036Z
       
       0 likes, 0 repeats
       
       @urusan @nonetrix @ink8 the closest to graphics and game stuff ive got is renpy and tk
       
 (DIR) Post #A1oUSpJuj5tKDOsCjw by nonetrix@neckbeard.xyz
       2020-12-03T04:51:44.774825Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 should learn SDL tbh in C/C++ or whatever it's good for homebrew development on a lot of consoles I'm pretty sure
       
 (DIR) Post #A1oUWSz9hzZW6StolE by nonetrix@neckbeard.xyz
       2020-12-03T04:52:26.215737Z
       
       0 likes, 0 repeats
       
       @a7 @urusan @ink8 messed with openGL and python a bit was a nightmare but I got a cube :DDDDDDDDDDDDDDDDDDD
       
 (DIR) Post #A1oUitOdL5TLUSk2NM by a7@pleroma.mouse.services
       2020-12-03T04:54:40.868178Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan i have done the cube tutorial in opengl for c++some years back - but i can barely do c and c++ by hand - i can read it but im dumb and dont have any experience with it and memory managementpretty much everything ive actually used is python, bash, perl, raku a very small bit, java and a lot of ruby
       
 (DIR) Post #A1oUrkSrus4AOZwfhI by nonetrix@neckbeard.xyz
       2020-12-03T04:56:16.374507Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan yeah I barley know C or C++ ;-; I want to get into it for homebrew development but it's really hard for my soy dev python brain
       
 (DIR) Post #A1oUu4qF7sKGAlzN7g by urusan@fosstodon.org
       2020-12-03T04:56:41Z
       
       1 likes, 1 repeats
       
       @a7 @nonetrix @ink8 The main thing SDL does that nobody wants to replicate is that it supports literally every low level configuration.Linux? Sure. Windows? No problem! Android? Sure, why not?ARM processor? Yup!
       
 (DIR) Post #A1oV2QDVXN7ymdqkfA by nonetrix@neckbeard.xyz
       2020-12-03T04:58:13.026186Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan I might get a OG xbox for homebrew for fun I would like to port the super mario 64 PC port to the xbox but that would be hard
       
 (DIR) Post #A1oV5WnzUwOU5OObBY by a7@pleroma.mouse.services
       2020-12-03T04:58:46.500678Z
       
       0 likes, 0 repeats
       
       @nonetrix @ink8 @urusan i have a hefty handful of stuff i should finish or polishI would hardly call myself a programmer or even good with computersI dont really get paid for it, a few things ive done have gotten use but its whatever and most of my doings are just kludging shit together blindly for vague entertainment when i get in the mood
       
 (DIR) Post #A1oV6BgzTs9itYR5Sy by nonetrix@neckbeard.xyz
       2020-12-03T04:58:54.035933Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan I might get a OG xbox for homebrew I would like to port the super mario 64 PC port to the xbox but that would be hard
       
 (DIR) Post #A1oV9iFat3Mok0InfU by nonetrix@neckbeard.xyz
       2020-12-03T04:59:32.540589Z
       
       0 likes, 0 repeats
       
       @a7 @ink8 @urusan yeah same here ;-;
       
 (DIR) Post #A1of5yYpIrHBi39fFI by nonetrix@neckbeard.xyz
       2020-12-03T06:50:54.739361Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 I got sound to play in SDL in C++ might do a rewrite tbh#include<unistd.h>#include "SDL/SDL.h"#include "SDL/SDL_mixer.h"Mix_Music *play_sound = NULL;void cleanUp(){     Mix_FreeMusic(play_sound);     Mix_CloseAudio();     SDL_Quit();}int main(int argc, char* args[]){    SDL_Init(SDL_INIT_EVERYTHING);    Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096);    play_sound = Mix_LoadMUS("/home/nonetrix/games/music/Eishiro-Un0VFplGVjA.mp3");    Mix_PlayMusic(play_sound, -1);    usleep(1000000000);    cleanUp();    return 0;}
       
 (DIR) Post #A1ofB8aJSgbUFKJMzQ by a7@pleroma.mouse.services
       2020-12-03T06:51:50.332129Z
       
       0 likes, 0 repeats
       
       @nonetrix @urusan @ink8 https://pleroma.mouse.services/tag/includeit doesnt look like include is used anywhere as an actual tag
       
 (DIR) Post #A1ofBBr5ImnmODBJ32 by nonetrix@neckbeard.xyz
       2020-12-03T06:51:50.916771Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 I just copied some random code so I want to learn more about SDL obviously but it's a start
       
 (DIR) Post #A1ofFGFwsgQPCIkin2 by urusan@fosstodon.org
       2020-12-03T06:52:34Z
       
       0 likes, 0 repeats
       
       @nonetrix @a7 @ink8 That sleep!
       
 (DIR) Post #A1ofG4vqTBeCMijt2G by nonetrix@neckbeard.xyz
       2020-12-03T06:52:44.523850Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 works for now
       
 (DIR) Post #A1ofKau5Xec4gM4RAe by urusan@fosstodon.org
       2020-12-03T06:53:32Z
       
       0 likes, 0 repeats
       
       @nonetrix @a7 @ink8 I'm glad you got it working, cleaning up is the easy part.
       
 (DIR) Post #A1ofPGeAHeBlIwqoc4 by nonetrix@neckbeard.xyz
       2020-12-03T06:54:24.171958Z
       
       0 likes, 0 repeats
       
       @urusan @a7 @ink8 well gonna try to remake the code now for the lolz