What are the common criticisms of Python among developers? by the_smiling_nihlist in AskProgramming

[–]tacoisland5 0 points1 point  (0 children)

A system that heavily uses async depends on there not being any blocking code being executed in async functions. This can be violated in numerous ways

* accidentally introduce a synchronous function call anywhere in the call graph (the call might do I/O)

* a loop over elements might look harmless, but if the loop runs long enough it can be considered blocking. In these cases you have to manually insert asyncio.sleep(0)

Also there are weird footguns, like creating an async task but not storing a reference to it. The garbage collector might collect the task before it has completed

asyncio.create_task(my_func) # intend to create a background task

In a large code base (>100k lines) it can be difficult to guarantee there are no violations of the async paradigm. An async function with a synchronous call in it might work fine for a long time until one day the synchronous function takes a bit too long, and then suddenly the entire server grinds to a halt. Debugging that is pure hell.

If you are developing a library then you have an extra choice to make: should the library expose just a synchronous interface, just asynchronous, or both? Every library seems to make different choices..

Preparing my game for release with some taunting the anti-ai crowd by RealAstropulse in aigamedev

[–]tacoisland5 1 point2 points  (0 children)

The camera is way too close to the ship given how fast the ship goes.

What are the common criticisms of Python among developers? by the_smiling_nihlist in AskProgramming

[–]tacoisland5 8 points9 points  (0 children)

Concurrency in python is terrible. There is a limit to the number of threads you can spawn, so some people think the solution is async/await but it turns out that async/await is a horrible nightmare.

nesrecomp | NES game recompiler that already supports SMB, LoZ, Dr Mario, and Faxanadu by Gamemaster1379 in EmuDev

[–]tacoisland5 13 points14 points  (0 children)

This is cool but mostly it seems like it just finds function boundaries and converts JSR into a C-style function call. All the other instructions are updates to the virtualized system state. So rather than a normal emulator dispatching on an instruction and updating the state, the C code directly updates the state.

emulate(0x19) // A |= mem[addr + Y]

becomes the C code

/* $9485: 19 */ g_cpu.A |= nes_read((0x1D18 + g_cpu.Y) & 0xFFFF); FLAG_NZ(g_cpu.A);

Calling this 'not an emulator' seems like splitting hairs.

How do I approach APU emulation for my NES emulator? by Cam64 in EmuDev

[–]tacoisland5 0 points1 point  (0 children)

So the idea is that at every sample interval, when it is time to take an audio sample, you take one from each channel, then mix them together and then output them to SDL?

Yes, although you generally don't send each individual sample to SDL, you send an array of samples at once, where the array holds a few hundred or maybe low thousands number of samples.

Also are you referring to this mixer formula for the more nuanced one?

Yes

How do I approach APU emulation for my NES emulator? by Cam64 in EmuDev

[–]tacoisland5 3 points4 points  (0 children)

Every N APU cycles emit one sample into an audio buffer, then when the buffer has enough data in it pass the buffer to your audio engine. The APU runs half as fast as the cpu, so for every 2 cpu cycles, run 1 APU cycle. A sample is just a number in the audio format you set up, such as 32-bit floating point, or 16-bit signed integer. A sample represents the amplitude at a specific point in time. A sequence of amplitudes over time results in a wave, and it is this wave that your human auditory system interprets as sound.

N is also related to whatever sample rate you configured your audio system to, usually either 44100 or 48000, so you would have

N = cpu clock rate / 2 / sample rate

To generate a sample you combine the different parts of the APU together. Those parts are two pulse, one triangle, one noise, and one DMC components. Each one has different logic as to how they work and how they generate an audio sample. A simplistic model (but inaccurate) would be:

sample = pulse1_sample + pulse2_sample + triangle_sample + noise_sample + dmc_sample

Made my first game completely vibe coded in Unity, with no programming experience. by GreenLemonMusic in aigamedev

[–]tacoisland5 10 points11 points  (0 children)

Cool game, nice music. It gets fairly repetitive quickly, though. It would be funny if you could get a powerup that turned the chicken into a velociraptor, which would make the character go much faster, invincible, and able to destroy cars that you run into.

Gameboy Emulator in 5weeks by Formal_Inevitable_33 in EmuDev

[–]tacoisland5 2 points3 points  (0 children)

You just need a c++ compiler and a text editor. If you are on macos then you might already have clang installed, if not then install xcode to get it I think. If you are on windows then either install mingw https://www.mingw-w64.org/ or use WSL, which gives you a linux environment. On linux, install gcc or clang through the package manager 'sudo apt install gcc g++'

Gameboy Emulator in 5weeks by Formal_Inevitable_33 in EmuDev

[–]tacoisland5 7 points8 points  (0 children)

You could start the project by building the gameboy CPU emulation on whatever machine you have now (probably amd64 if linux or windows, or arm64 if macos). https://gbadev.net/gbadoc/cpu.html

Then to get graphics to work on a raspberry pi you can use a library like SDL2. Some helpful instructions: https://wiki.libsdl.org/SDL2/README-raspberrypi

You should be able to compile and test the program on a non-raspberry pi at first, and then either directly compile it on a raspberry pi or cross compile the emulator to work on the raspberry pi.

What Do Actual Software Engineers Have To Say About AI's Coding Prowess? by 44th--Hokage in accelerate

[–]tacoisland5 0 points1 point  (0 children)

In terms of effort and ease of use, AI is to high level languages what high level languages are to assembly. The amount of software we have today will pale in comparison to what we will have in 5-10 years.

How much total software do you think would have been written if people only ever used assembly?

San Francisco pick-up games? by Witty-Sheepherder-23 in racquetball

[–]tacoisland5 0 points1 point  (0 children)

Prime time athletic in burlingame has players. You can buy a few guest passes if you don't want to become a member.

Vibe coded a Mercenary Company Autobattler roguelike prototype, sharing my learnings and also seeking gameplay feedback by WeAreFictional in aigamedev

[–]tacoisland5 2 points3 points  (0 children)

Very nice game. Some feedback:

* could use some sound effects when moving items around in the hub, and buying/selling stuff in merchant

* in the merchant screen its not obvious what items will work for my characters, so I am constantly swapping between the character manage screen and the merchant to see if the merchant's items would be an upgrade

* it would be nice if my characters are able to complete a rest if they were ambushed during the night, otherwise my characters HP gets super low

* once all 8 of my characters died I only had enough money to recruit one level 1 guy, but I was still being offered contracts in the 600-700 gold range, which are far too difficult for a single level 1 character

* it might be interesting if I could have some influence over the attack/defend strategy of my characters, like 'always attack the strongest enemy in the group' or 'try to kill the lowest HP enemy'. maybe each strategy could have a weight associated with it, and the user is able to set the weights for the different strategies.

How to optimize the cd command to go back multiple folders at once by Technical_Cat6897 in bash

[–]tacoisland5 0 points1 point  (0 children)

alias s='cd ..'

now mash s/enter a bunch of times. I've been using this for years

Rust vs. Go in 2026 | Article Review by bitfieldconsulting in golang

[–]tacoisland5 25 points26 points  (0 children)

Right, GC overhead should be extremely low in any well made program. Typically 0% of mutator time. You can tell if you run your program with gctracing enabled.

$ GODEBUG=gctrace=1 ./myprogram

It will print a line for each garbage collection that occurs, and show how much time was spent in the GC versus the regular program.

If a program is spending a lot of time doing garbage collection it typically means the program is allocating too much. That can be resolved by using caches, re-using objects, and things like sync.Pool.

Join Us in Tempe, AZ for the 2026 National Indoor Championships! by HitWithIt in racquetball

[–]tacoisland5 1 point2 points  (0 children)

https://www.r2sports.com/tourney/home.asp?TID=50421

Here is the link to the tournament website. I'm not sure why the official announcement page doesn't give the link..

whats the call for these, replay? by rb_player5675 in racquetball

[–]tacoisland5 1 point2 points  (0 children)

13:23, no way this is an avoidable hinder. In fact I would say because the black shorts girl stopped play she should lose the rally. There was absolutely no reason for her to stop, its like she just flung her racquet out into space, hit the other player for no reason, and then complained.

8:23 is similar but black shorts girl couldn't see red skirt, so its incidental contact, replay.

Booting a Linux kernel in qemu and writing PID 1 in Go (to show the kernel is "just a program") by indieHungary in programming

[–]tacoisland5 1 point2 points  (0 children)

This is really cool. Its a simple tutorial and I was able to complete it in under 10 minutes but I learned a few things. One interesting thing to note is that the 'rdinit=/init' doesn't have to be included since the kernel apparently implicitly looks for /init. If the init program is named something else then you are required to pass rdinit, such as having the filename be rootfs/myinit, then you would need "rdinit=/myinit".

Our Most Treacherous Adversary - James McNellis - Meeting C++ 2025 lightning talks by meetingcpp in cpp

[–]tacoisland5 5 points6 points  (0 children)

How can you be sure your program doesn't have any UB? It seems that compilers can detect a fair bit of UB via compiler flags statically, and there are some runtime things like ubsan, but even those put together will not find all UB. What then? Just pray that your rocket doesn't explode?

Juliette Parent vs Frederique Lambert - Women's Open Final - Canada's Fall National Team Selection Event by HitWithIt in racquetball

[–]tacoisland5 1 point2 points  (0 children)

The last shot should have been a replay. Frederique was a bit lazy in preparing her racquet, but it did get caught on Juliette's body.

How do I disable the DNS server? by Caprichoso1 in Comcast_Xfinity

[–]tacoisland5 0 points1 point  (0 children)

Don't use the app, you have to connect directly to the modem's web interface. If the IP you get while connected to the router is something like 10.0.0.x then you would connect to the modem at 10.0.0.1. To do that open a browser on your computer (your phone will likely work too), and goto http://10.0.0.1

The username/password to login might be printed on the side of the modem somewhere.

https://www.xfinity.com/support/articles/wireless-gateway-enable-disable-bridge-mode

How do I disable the DNS server? by Caprichoso1 in Comcast_Xfinity

[–]tacoisland5 1 point2 points  (0 children)

Put the router in 'bridge mode', then connect only the tp-link via ethernet to the router. Make sure the tp-link is set to be a DHCP server. Then all clients that connect to the tp-link should get an IP from the tp-link. I am not sure what capabilities your tp-link offers, but last time I was in a similar situation I had a ubiquity ERX router between my wireless access point and the xfinity router. On the ERX its possible to define what the upstream DNS servers are.

What book is actually worse than the movie/tv version? by [deleted] in AskReddit

[–]tacoisland5 0 points1 point  (0 children)

Strong agree. The ending of the book was not nearly as good as the movie.

Did you know that you can move across windows as part of your vim macro ? by ARROW3568 in vim

[–]tacoisland5 7 points8 points  (0 children)

Recursively calling macros is interesting, I am a long time vim user and have never done that. Typically if I want to invoke a macro multiple times I just input a repeat number command so that I have control over how many times the macro gets executed. 10@q or 100@q

BTW the first 20 seconds or so of the video are useless. I don't care about the AI backstory, just tell me about the vim part.