EXAPUNKS

EXAPUNKS

View Stats:
The 3 worst words I've ever seen.
'FILE IS FULL'
I'm working on Holman Dynamics and my plan involved writing every number string to a single file, and then, y'know, working through the file until I could find a number to validate. Efficient? Probably not. I'm not good at efficiency. But it was working! And then I discovered there was a limit to how many values can be in a file and I'm trying to figure out if there's a way to solve this without like, entirely scrapping what I have so far (which has stopped at test 70 and would be a real bummer to throw out something that solves 99% of tests)
< >
Showing 1-7 of 7 comments
Already had a problem where I had my end of file checks in the wrong place and would get stopped if the target credit card used the very last digit of the junk file but that got solved, but what I'm doing specifically is searching for continuous strings of 16 or longer, then copying 16 numbers to m, checking to see if we've hit the end of file or a -9999, going back to the next valid string of sixteen, and repeating until end of file, whereas my exa at home is copying the numbers into one file. Then once we've finished the junk file, add the doubled odds, the regular evens, swiz check for 0, and delete what I just checked if it's not the number I need. (which like, I should probably just continue along the file but going inefficient here was a purely aesthetic choice. i really like watching the numbers rapidly vanish from the file. Fight me.)

Presumably the solution to my problem is to find a point somewhere to terminate copying to my first file and get started on a second? main idea at the moment is just like, having a timer exa count some multiple of 16 cycles to do.... something. Maybe just straight kill the first reader exa and make a new file on its own.

writing long spiels on my thoughts is definitely may way of rubber ducking.
you only have to work through the 199er file. Just copy the file and work your way throug it.

simply read the first 16 digits and calculate the sum - if its valid clear the rest of the file, if not VOID the first number in the file and start over again. No need for an EOF check because there must be a valid Number in the file.

for a bad optimized but working solution just threat the -9999 like any outher digit and check you sum to be greater 0.


What I do is checking the numbers one at a time before getting the next one sent over. The EXA reading the junk file acts as a sort of terminal. It sends the first valid number over, I check it at home, and if it is good I send the reader a signal to stop, otherwise a signal to find the next valid number and send it.

But yeah if you want to do it your way, making a second file sounds like the solution.
Do you know how large the limit is? I found a million cycle limit (I just let the system run during an easter egg hunt) so I'm interested in knowing what other limits there are.
Originally posted by BtB:
Do you know how large the limit is? I found a million cycle limit (I just let the system run during an easter egg hunt) so I'm interested in knowing what other limits there are.
Actually counting how many lines of numbers were in the file was something I really didn't want to do but I estimate it was about 1000 items in the file when it stopped?
I did some testing, and you're spot-on. You can hold 1000, but if you try to add 1001, it suddenly becomes 999 (since the last slot is filled with the error)
Same prob, a couple years down the line lol.
Ended up splitting the file in two, using a counter plus modulo to avoid cutting a valid number in two, and splitting it above 500.
That was an exhausting puzzle, and the file size limit is a curveball, I don't think it's documented anywhere, or I missed it.
< >
Showing 1-7 of 7 comments
Per page: 1530 50