🐍 On this Building SaaS with #Python and #Django, I started a new feature to add a PDF report bundle to my homeschool app. This will be useful when a user completes their school year and needs records of all the year's activities. https://www.youtube.com/watch?v=cM2sA1AP3fM
I think I have finally™️ (for the third or so time) found myself a solution for :python: #Python development on :nixos: #NixOS that allows me to just work with #pythonPoetry et. al. as on other distros.
The solution is to pre-build an FHSUserEnv in your configuration.nix, e.g. like this¹.
When starting Python dev work, I now execute fhs (it's fast!), or directly fhs -c 'poetry shell' and everything works as expected, including #PyPI wheels etc.
Ieri ho effettivamente provato un po’ il #gaming Switch dal 3DS in portatilità, alla fine, e… che dire. 7/10. Certo, ogni tanto la connessione fa scherzetti e il gioco inizia a freezare per un po’, ma nel complesso si gioca con un lag accettabile e un video senza strani artefatti, veramente apprezzabile. Devo però capire perché in certi rari momenti il client crasha completamente invece di riuscire a ristabilire la connessione, e temo anche la batteria del 3DS si appiattisca troppo velocemente con questa #applicazione… ma vabbè, a sistema consolidato potrei anche usare il telefono. 🐚
Visto che voglio provare meglio il setup, mi sono portata avanti e ho fatto un programmino per #PC che legge direttamente gli input del gamepad virtuale e li invia alla #console; quindi, eliminando quegli altri due programmi necessari, sostituendoli con uno solo. La finestra inoltre visualizza il video da dispositivi di cattura standard, e quando lo implementerò riprodurrà anche audio, quindi sostituirà anche il riproduttore multimediale… per ora non ho ancora la scheda di cattura HDMI, quindi devo ancora usare SysDVR, ma almeno mi mostra il video della webcam (che mi serve per navigare nei menu di sistema, il DVR non lo trasmette), quindi già scendo da 4 app e finestre a solo 2. ✨️
https://octospacc.altervista.org/wp-content/uploads/2024/05/image-1.pngImplementare la lettura degli input del controller, e l’invio al demone sys-botbase tramite socket TCP, è stato un po’ intricato, ma alla fine il codice è venuto pulito, i tasti rimappabili tramite file config, e sorprendentemente sembra tutto ben funzionante dal primo momento… Nel senso, i comandi sembrano rispondere bene senza particolari accorgimenti; anzi, anche meglio di NXController, perché io invio direttamente i valori degli stick analogici alla console, mentre lui deve leggere valori rimappati alla tastiera e quindi tutti digitali. In effetti non ci avevo pensato quando mi era venuta questa #idea, ma effettivamente ho migliorato la mia #UX anche in questo modo, ora ho input più precisi. 🤏️Volevo inizialmente usare Ren’Py, ma ho subito scoperto che non include funzioni per accedere ai dispositivi video, né tantomeno ha la classe camera nella sua implementazione di #Pygame, quindi… ho usato semplicemente Pygame, e in poche righe di codice funziona già tanta roba, anche se la UI non è delle migliori. Dovrò investigare se davvero non ci sarebbe stato verso di usare l’altro engine oppure si, perché potrebbe tornare utile in futuro. Ancora versione molto WIP, diversi bug da sistemare, ma almeno l’ho già caricata … poi creerò anche dei pacchetti standalone (che includono già #Python e le librerie) per Windows e Linux. L’ho chiamato #FrameNX comunque, meglio evitare qualunque pretesto di violazione del trademark di #Nintendo per il nome #Switch… 🚨️
Ma, ovviamente, non era un mio #progetto secondario se non saltava fuori un #problema inaspettato mentre programmavo e testavo… il codice che controlla la versione dell’OS di pygame.camera è rotto su Windows Server, e quindi l’inizializzazione fallisce… evviva. L’ho identificato e sistemato subito, ho anche inviato la PR #4221, quindi non è stato un vero problema, però… che cazzo, non è possibile che tutto quello che finisce in mano a me si rompe… trovare bug in librerie così utilizzate e famose senza fare nulla di particolare non è roba da tutti, eppure ormai siamo ad uno a settimana, e chissà cosa mi riserva il futuro. 💣️
So if you are looking for a #Python network diagnostic utility (command line), something you can run on a laptop when doing common troubleshooting for misbehaving networks, what are some features you'd like to have?
Thus far I'm thinking
IP
link speed
neighbor data via LLDP (to know what port a given outlet is plugged into)
If you'd like to serve up a different directory besides the current one (which is the default) you can provide a -d argument specifying the directory to serve.
Anyone know of a library for getting docstrings for attributes like Sphinx does, where it can find the triple-quote string after an attribute by inspecting the AST? I would like to use those docs, but I don't want to write the AST inspector myself 😅 #Python
I think in PowerShell and can manage in Python. I want to learn Rust to the degree I can write in it directly, rather than prototyping in PowerShell and then converting.
A lot of what I do is data manipulation and analysis. (Take several CSV files as input, and output new CSV files that answer business questions based on the inputs.) I'm seriously impressed with Rust's performance here.
If you've made this transition, advice on where to begin?
Please boost for reach if this kind of stuff interests you. Will post more on this later.
Once upon a time, there was a cool emulator frontend called Retroarch. This emulator wasn't accessible until I and a few other gamers went to them and asked about adding accessibility. An amazing person known as BarryR made it happen. Now, if you turn on accessibility mode in settings, or pass the "--accessibility" (or something like that) flag on the command line, you get spoken menus, including the emulator's pause menu, good for saving states and such. Then, using PIL and other image processing Python utilities, running a server and hooking into Retroarch, the script allowed players to move around the map, battle, talk to NPC's, ETC. The only problem was, no one wanted to test it. The blind gaming community pretty much spoke, saying that we want new games. We want cool new, easy accessibility. So that's what we have no, follow the beacon or get sighted help in the case of diablo and such. It's sad, but meh. It's what we wanted I guess. No Zelda for us. So, this is about as far as he got:
To expand on what devinprater was saying: I am working on an accessibility pack/service for Final Fantasy 1 for the NES (this was what was shown in the latest RetroArch update). The idea is similar to how Pokemon Crystal access works, but it's using the RetroArch AI Service interface to do so.
Right now, the FF1 access service is mostly done, but I need more testers to try it out and give me feedback on how it's working. Right now, you can get up to the point where you get the ship, but there's no code to deal with how the ship moves, so that still needs to be done. Likewise with the airship later on.
The service works the latest version of RetroArch, on linux and mac, but not windows. This is due to how nvda reads out the text and until the next major update to nvda (which will have a feature to fix this), it'll have to wait. If you have those, I (or maybe devinprater) can help you set it up on mac/linux to test out. The package itself is available at: https://ztranslate.net/download/ff1_pac … zip?owner=
I told #copilot I wanted an ASCII art of a volvo driving in Texas. It first told me I had to sign in to create images. I told it I wasn't asking for an image, but ASCII art. It then complied with something that doesn't look like a Volvo, and definitely has nothing that even stereotypically looks Texan.
For those who might care or just be curious. I was able in a few minutes to get #Codeium to create a #python script to do this. It made a couple of missteps, but I was able to guide it in the right direction and end up with this #ascii art.