Search found 299 matches

by commodorejohn
Wed Mar 18, 2026 3:06 am
Forum: Programming
Topic: ChatGPT: ASCII to decimal conversion
Replies: 68
Views: 19403

Re: ChatGPT: ASCII to decimal conversion

Dog Cow wrote:
That's because it can't invent anything new that it hasn't seen already, and it doesn't understand anything. All it does is remix text that it has come across on the Internet.
Still 100% factually accurate.
by commodorejohn
Sun Feb 22, 2026 8:57 pm
Forum: Programming
Topic: Buffer indirection
Replies: 18
Views: 1132

Re: Buffer indirection

Yeah, the simplest way is gonna be to adjust the pointers so that you can use the same index value for both; in the provided example, if you add 47 to the pointer value in RP0, you can loop through index values 0-7 for both.
by commodorejohn
Tue Jan 13, 2026 2:09 am
Forum: Programming
Topic: CardChasm
Replies: 41
Views: 2749

Re: CardChasm

Also, if you are having one state switch, you can make it to be just jump_table, so instead of lot of cmp #... you just jump to address at table[state] :)
^ That. Turns the dispatch into a constant-time operation instead of an O(<= N) one, and allows you to separate the state routines from the ...
by commodorejohn
Sat Jan 10, 2026 1:26 am
Forum: Programming
Topic: CardChasm
Replies: 41
Views: 2749

Re: CardChasm

sburrow wrote:
I tried doing it all by hand, like from scratch, but it just isn't as flavorful as when I do touch ups from the AI generated version.
Hard disagree - even clumsy personal art is much more interesting to look at than generic machine output, and I much prefer your DIY example.
by commodorejohn
Fri Oct 10, 2025 2:10 pm
Forum: Programming
Topic: fast 24 bit PRNG
Replies: 14
Views: 2148

Re: fast 24 bit PRNG

If you're trying to test/measure, a 24-bit PRNG has a maximum sequence length of "only" 16.7 million values, which is well within the realm of generating & caching for analysis on modern machines.
by commodorejohn
Fri Oct 10, 2025 12:13 am
Forum: Programming
Topic: fast 24 bit PRNG
Replies: 14
Views: 2148

Re: fast 24 bit PRNG

I don't know enough about this stuff to say about the algorithm in question, but if it's vulnerable to the same "all zeros = frozen state" issue as LFSRs are, you wanna be careful injecting arbitrary "noise" values into it - maybe take the timer value and OR it with the PRNG state rather than ...
by commodorejohn
Fri Sep 05, 2025 3:25 am
Forum: Programming
Topic: Suspending and resuming long processes
Replies: 3
Views: 1170

Re: Suspending and resuming long processes

If you're juggling more than just interrupt-service stuff alongside your Big Intensive Background Task, and you don't want to have to modify that, there's about two ways I can see for you to go:

A. Have your interrupt service, upon completion, pass control to any active "medium-priority" tasks ...
by commodorejohn
Sun Aug 31, 2025 3:48 pm
Forum: Programming
Topic: Text Editor Shifting Mechanics
Replies: 95
Views: 22816

Re: Text Editor Shifting Mechanics

(It occurs that, if you're using a linked-list-of-chunks structure, making the chunks 256 bytes cuts your pointer size in half.)
by commodorejohn
Sun Aug 31, 2025 2:20 am
Forum: Programming
Topic: Text Editor Shifting Mechanics
Replies: 95
Views: 22816

Re: Text Editor Shifting Mechanics

Obviously a tradeoff between frequent operations being quick, because local, but possibly causing fragmentation, and then the other half of the solution, which is to defragment.
Fragmentation could be also be addressed (!) when the user saves his/her work, or if a timed-save feature is implemented ...
by commodorejohn
Tue Aug 26, 2025 12:04 am
Forum: Programming
Topic: IN SEARCH OF A NAME
Replies: 33
Views: 4010

Re: IN SEARCH OF A NAME

BigDumbDinosaur wrote:
BigEd wrote:
paragraph?
I've seen references to a paragraph in the past, but they were usually for a range of 1K or 4K bytes.
I'm curious where else this term was used besides x86-land! I'd go with "paragraph" for familiarity's sake, but if not, "sentence" seems a fitting choice :D
by commodorejohn
Tue Aug 12, 2025 2:57 am
Forum: General Discussions
Topic: Advice Reqd For Tools.
Replies: 18
Views: 4990

Re: Advice Reqd For Tools.

For another project and a slightly different purpose (breaking out half of a dual op-amp from a PCB that only uses the one) I picked up an IC socket with extra-long pins, so that I could stack the IC on a piece of stripboard above the rest of the project and run wires to the relevant pins without ...
by commodorejohn
Thu Jul 03, 2025 11:50 pm
Forum: General Discussions
Topic: NES infinite loops
Replies: 5
Views: 1511

Re: NES infinite loops

Interesting notion - simple jump/branch loops should be easy to directly detect, as well (if a JMP points back to itself, or a branch if the branch is taken,) though I don't know how much it'd save you over the heuristic you've already established. This won't be 100% cycle-accurate as interrupt ...
by commodorejohn
Sun Jun 29, 2025 3:47 pm
Forum: Programming
Topic: Text Editor Shifting Mechanics
Replies: 95
Views: 22816

Re: Text Editor Shifting Mechanics

I need to have a go at this myself sometime. The solution I've considered for storing in a way that makes insertion and block operations less expensive is to use a linked list of fixed-size chunks that can hold from zero to N characters - you lose some of your available text space to overhead, but ...
by commodorejohn
Sat Jun 21, 2025 12:53 am
Forum: General Discussions
Topic: OT: A Generation of Semi-Useless “Workers”
Replies: 77
Views: 19148

Re: OT: A Generation of Semi-Useless “Workers”

It's all very strange.
A huge part of the explanation for the very strange behavior of modern first-world economies is that we've entered the terminal phase of a long spiral where every business of consequential size is run by decision-makers with no actual knowledge of the line of work, whose ...
by commodorejohn
Fri May 30, 2025 3:26 pm
Forum: General Discussions
Topic: OT: A Generation of Semi-Useless “Workers”
Replies: 77
Views: 19148

Re: OT: A Generation of Semi-Useless "Workers"

The amount of armchair quarterbacking here from people who are either long retired or in the end stages of a long and established career is honestly a little maddening. I don't mean that as a diss against the older members here, but if you haven't actually been looking for work in the last fifteen ...