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

[1.4] alternative way to terminate programs

Started by macks2008, 17 November 2012 - 09:28 AM
macks2008 #1
Posted 17 November 2012 - 10:28 AM
I occasionally find myself wanting a way to terminate programs that doesnt require holding CTRL+T for whatever amount of time… like… if my turtle is running away into the sky because I forgot to break out of an infinite loop? If that happens (, and it has), I only have a few seconds to react before I can't reach it to do a command. I was TRYING to write a program that clears gravel and then moves the turtle up one. I forgot to tell it to stop once it went up one. It started digging out of the mineshaft. Whoops. Fortunately I caught it before it got too high.
Maybe throwing a snowball (or some such thing) could cause it to terminate (or, if terminating is out of the question, maybe calling sleep(somenumber) where somenumber is long enough to nerd-pole up to it)? I have plenty of snow…
I'm open to suggestions. I realize a rednet message COULD be used to stop it (by calling sleep(500) or something), but that requires a lot of resources (well… two modems and an RS signal perhaps) I don't have unless I cheat (which I'm not about to do).
Tiin57 #2
Posted 17 November 2012 - 10:47 AM
Make a bios.lua modification. No need to make any Java changes. (I'm completely dismissing the snowball idea. That's just silly.)
Sammich Lord #3
Posted 17 November 2012 - 11:00 AM
Make a bios.lua modification. No need to make any Java changes. (I'm completely dismissing the snowball idea. That's just silly.)
But I like snowballs :)/>/>
Tiin57 #4
Posted 17 November 2012 - 11:03 AM
Make a bios.lua modification. No need to make any Java changes. (I'm completely dismissing the snowball idea. That's just silly.)
But I like snowballs :)/>/>
I know, but seriously? Snowballs to shut down a computer? Is there any better way to allow abuse?
Sammich Lord #5
Posted 17 November 2012 - 11:05 AM
Make a bios.lua modification. No need to make any Java changes. (I'm completely dismissing the snowball idea. That's just silly.)
But I like snowballs :)/>/>
I know, but seriously? Snowballs to shut down a computer? Is there any better way to allow abuse?
I could make a 3D game where there is 10 snowmen shooting at a turtle and you try to stop the turtle from getting hit by moving it from a computer.
billysback #6
Posted 17 November 2012 - 11:06 AM
It's realistic: Throw a snowball hard enough and your computer should turn off… (I hear Steve is pretty strong)

A more practical solution would be someone creating a remote terminator peripheral;
You attach a peripheral to a computer then with a remote in your hand you can click to send a signal to a specific computer (some sort of scrolling mechanism for scrolling through computer ids would be required)
Sammich Lord #7
Posted 17 November 2012 - 11:09 AM
It's realistic: Throw a snowball hard enough and your computer should turn off… (I hear Steve is pretty strong)

A more practical solution would be someone creating a remote terminator peripheral;
You attach a peripheral to a computer then with a remote in your hand you can click to send a signal to a specific computer (some sort of scrolling mechanism for scrolling through computer ideas would be required)
I might learn Java to do just this, except with snowballs :)/>/>
macks2008 #8
Posted 17 November 2012 - 11:49 AM
Make a bios.lua modification. No need to make any Java changes. (I'm completely dismissing the snowball idea. That's just silly.)
But I like snowballs :D/>/>
I know, but seriously? Snowballs to shut down a computer? Is there any better way to allow abuse?
I could make a 3D game where there is 10 snowmen shooting at a turtle and you try to stop the turtle from getting hit by moving it from a computer.
the snowball idea was just a starter idea… plus i thought it was funny. the peripheral idea with the remote is more realistic.
I have NO idea how to modify bios.lua. I just use CC for automated mining (mostly).
the golem idea is beyond silly IMHO. how would that even work?

It's realistic: Throw a snowball hard enough and your computer should turn off… (I hear Steve is pretty strong)

A more practical solution would be someone creating a remote terminator peripheral;
You attach a peripheral to a computer then with a remote in your hand you can click to send a signal to a specific computer (some sort of scrolling mechanism for scrolling through computer ids would be required)
strong enough to cut down trees with his fist in 45 seconds (give or take :)/>/>)
but yes a remote makes more sense. like i said, the snowball was just a silly starter. it was also convenient for my purposes and i didnt think how trollable the idea was
how do peripherals work in CC anyway? im kinda new to CC as you might have guessed from this only being my second forum post (the OP being my first)
Sammich Lord #9
Posted 17 November 2012 - 11:53 AM
Make a bios.lua modification. No need to make any Java changes. (I'm completely dismissing the snowball idea. That's just silly.)
But I like snowballs :D/>/>
I know, but seriously? Snowballs to shut down a computer? Is there any better way to allow abuse?
I could make a 3D game where there is 10 snowmen shooting at a turtle and you try to stop the turtle from getting hit by moving it from a computer.
the snowball idea was just a starter idea… plus i thought it was funny. the peripheral idea with the remote is more realistic.
I have NO idea how to modify bios.lua. I just use CC for automated mining (mostly).
the golem idea is beyond silly IMHO. how would that even work?

It's realistic: Throw a snowball hard enough and your computer should turn off… (I hear Steve is pretty strong)

A more practical solution would be someone creating a remote terminator peripheral;
You attach a peripheral to a computer then with a remote in your hand you can click to send a signal to a specific computer (some sort of scrolling mechanism for scrolling through computer ids would be required)
strong enough to cut down trees with his fist in 45 seconds (give or take :)/>/>)
but yes a remote makes more sense. like i said, the snowball was just a silly starter. it was also convenient for my purposes and i didnt think how trollable the idea was
how do peripherals work in CC anyway? im kinda new to CC as you might have guessed from this only being my second forum post (the OP being my first)
A peripheral is something like the printer, disk drive or monitor. You make them by making a tile enity in Java that can interact with CC(I think).
anonimo182 #10
Posted 17 November 2012 - 01:01 PM
http://www.computerc...pdated-for-141/ There is how the peripheral works in CC
Tiin57 #11
Posted 17 November 2012 - 01:28 PM
Option 1: Wait for LuaForge to include the proper libs. :)/>/>
Option 2: Design a client/server set of programs which will turn the client off when the server sends a message.
macks2008 #12
Posted 17 November 2012 - 02:21 PM
maybe someone could make a portable computer (which would basically be an item that, when right clicked, opens a computer GUI)? I realize you need some way to deal with storing the data… maybe it could just be linked to a certain computer by ID? I don't know anything about modding so I might just be dreaming but idk. For now I think I'll just give my mining turtle a modem and try to figure out how to work rednet… but what if my turtle goes out of range?… wish me luck :)/>

edit: *facepalm* how did i miss that "suggestion NOT to make"…
Tiin57 #13
Posted 18 November 2012 - 12:16 AM
maybe someone could make a portable computer (which would basically be an item that, when right clicked, opens a computer GUI)? I realize you need some way to deal with storing the data… maybe it could just be linked to a certain computer by ID? I don't know anything about modding so I might just be dreaming but idk. For now I think I'll just give my mining turtle a modem and try to figure out how to work rednet… but what if my turtle goes out of range?… wish me luck :)/>/>
From the PINNED topic, "Suggestions NOT to make":
tiin57 said:
Laptops / Portable computers. Dan200 and Cloudy have stated that this will be implemented into the main mod. Hopefully soon.
Pure slap.