This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Coping info from 1 floppy disc to another
Started by Rainbowd4sh, 09 March 2015 - 01:52 AMPosted 09 March 2015 - 02:52 AM
Hi, I found the alongtimeago floppy disc, and I would like to make copies (i'm on a server and I may be able to get rich out) so I would like to know how to copy a program from one floppy disc from another. Thank you.
Posted 09 March 2015 - 11:57 AM
To be honest, unless you have the config set to allow bigger files on floppy discs, you cannot fully copy the alongtimeago file.
Posted 09 March 2015 - 01:00 PM
If you want to get rich on your server then you could try making a cinema.
As with copying alongtimeago, you could split the file into two or more pieces and run each piece one after the other.
As with copying alongtimeago, you could split the file into two or more pieces and run each piece one after the other.
Posted 09 March 2015 - 01:34 PM
As with copying alongtimeago, you could split the file into two or more pieces and run each piece one after the other.
File is still too large to copy onto a single floppy disc.
Posted 09 March 2015 - 03:46 PM
I meant have the files on different disk, sorry should have clarified.
Posted 09 March 2015 - 04:32 PM
If I recall correctly, the alongtimeago program is in excess of 1MB in size, while disks hold ~100kB.
Posted 09 March 2015 - 06:05 PM
About 2139 kB to be exact so that would make about 22 disks? So for cinema you would need a disk jockey turtle ;p Still possible and interesting project if someone feels like it.
Posted 09 March 2015 - 06:25 PM
that would make about 22 disks? So for cinema you would need a disk jockey turtle ;p
Or just one of the original loot disks, which you must've had to make a 22-disk copy in the first place.
Now, if you want to open a chain of cinemas…
Posted 10 March 2015 - 12:49 AM
125000 bytes per disk, apparently.
Using Package, the script goes down to ~350kb. That'll fit on a computer (making a "cinema chain" much more viable ;)/> ), but if you specifically wanted to use floppies you'd still need three of the things.
To copy onto the computer, you'd do this:
Then to run it, you'd do this:
Using Package, the script goes down to ~350kb. That'll fit on a computer (making a "cinema chain" much more viable ;)/> ), but if you specifically wanted to use floppies you'd still need three of the things.
To copy onto the computer, you'd do this:
if not fs.exists("package") then shell.run("pastebin get cUYTGbpb package") end
os.loadAPI("package")
local fileContent = package.compress( fs.open("disk/alongtimeago", "r") )
local fileOut = fs.open("alongtimeago.cmp", "wb")
for i = 1, #fileContent do fileOut.write(fileContent[i]) end
fileOut.close()
os.unloadAPI("package")
Then to run it, you'd do this:
if not fs.exists("package") then shell.run("pastebin get cUYTGbpb package") end
os.loadAPI("package")
local fileContent = loadstring( package.decompress( fs.open("alongtimeago.cmp", "rb"), true ) )
os.unloadAPI("package")
fileContent()
Posted 10 March 2015 - 01:30 AM
alongtimeago is VERY small. what's the problem?
Posted 10 March 2015 - 02:04 AM
"Small" it may be, but it's still more than double the size of a ComputerCraft computer's capacity, and approaches twenty times the capacity of a regular ComputerCraft floppy disk.
Posted 10 March 2015 - 07:48 AM
why did we not think of compression earlier?