This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jappards's profile picture

program sending and storage

Started by Jappards, 23 April 2013 - 05:32 AM
Jappards #1
Posted 23 April 2013 - 07:32 AM
currently there is no way to directly send a program to an other computer.
to change that there should be an advanced modem.
crafted with using gold instead of stone.
the advanced modem is able to send and get programs to other computers/NAS storages.

NAS storage
there should also be a block that is able to store programs(more than a computer can have).
this would be called a NAS(Network-attached storage) storage block
every NAS storage block would be able to store 20 programs.
the NAS storage is a multiblock structure that can (unlimited) be expanded, you would make a NAS storage by making a cube of minimal 2x2, the cube can be expanded in every direction, it doesn`t have to be a cube, it can also be a brick.
the NAS storage would also be a peripheral.
a NAS storage block would be crafted like so:
s|s|s
f|f|f
s|s|s

s=(smooth)stone
f=floppy disk, has to be empty.

NAS API
there would also be aNAS API.
a few commands from it would be:

NAS.send("progam", NAS storage ID)--sends a program to the NAS storage with the idea you fill in.
NAS.recieve(time)--works like os.pullevent().
Sammich Lord #2
Posted 23 April 2013 - 07:36 AM
You can send a program by reading the file and sending it in a rednet message. You can do the NAS storage with a computer and a cool script.
Jarle212 #3
Posted 23 April 2013 - 07:37 AM
currently there is no way to directly send a program to an other computer.
to change that there should be an advanced modem.
crafted with using gold instead of stone.
the advanced modem is able to send and get programs to other computers/NAS storages.

You can directly send programs from one computer to an other computer by reading a file, sending its content, reading the content and writing it to a file.
Jappards #4
Posted 23 April 2013 - 08:10 AM
could you make an example program that does this?
but that would stil require TONS of rednet messages to send a fully functional program.
how do you guys think about the storage block?
some uses of this would be a cloud for computer programs that everyone on the server would be able to get and/or send programs to/from.
Cranium #5
Posted 23 April 2013 - 08:17 AM
We're not your code monkeys, so not going to write the program for you. Ask on the Ask a Pro section if you need help, but you need to at least make an attempt.
You need to read the contents of the file, using readAll(), then send that as a rednet message, then save that rednet message as a new file.
The storage block is not going to be made, as you can simply attach disk drives to the peripheral cables, and accomplish the same exact task.
Lyqyd #6
Posted 23 April 2013 - 08:28 AM
This would be classed under "enhancements", as everything suggested can already be done in Lua. Locked.