Jump to content




[1.51+] Using Network Cables (for dummies)


106 replies to this topic

#21 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 21 March 2013 - 05:17 AM

you used parallels and you used unnecicary variables

#22 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 21 March 2013 - 05:30 AM

There are no variables in that code. And if you mean how I declared the functions. Functionally speaking, and memory management wise, your method is no different to mine. Yours are, what's the term, nope can't think 3:30am is stopping me from remembering... In any case yours are still allocated to memory just like mine, both are deallocated, both do the exact same thing, and in terms of byte code/binary wouldn't be any different or processed any different.

#23 AnDwHaT5

  • Members
  • 244 posts

Posted 21 March 2013 - 07:30 AM

Thank you this will be very helpful!! I love the new update so much!!!!! Cant wait for the next one to come out.

#24 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 21 March 2013 - 09:07 AM

View PostTheOriginalBIT, on 21 March 2013 - 05:30 AM, said:

There are no variables in that code. And if you mean how I declared the functions. Functionally speaking, and memory management wise, your method is no different to mine. Yours are, what's the term, nope can't think 3:30am is stopping me from remembering... In any case yours are still allocated to memory just like mine, both are deallocated, both do the exact same thing, and in terms of byte code/binary wouldn't be any different or processed any different.

Technically anonymous functions are slower than declared/local ones, as I've read in an experiment on methods of optimization in lua.

http://web.archive.o.../LuaPerformance

Using the wayback machine because the website is down, unfortunately. :(

#25 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 21 March 2013 - 03:06 PM

View PostKingdaro, on 21 March 2013 - 09:07 AM, said:

Technically anonymous functions are slower than declared/local ones, as I've read in an experiment on methods of optimization in lua.

http://web.archive.o.../LuaPerformance
Anonymous functions!!!! Thank you! it was killing me all night, couldn't sleep.

#26 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 21 March 2013 - 04:57 PM

View PostKingdaro, on 21 March 2013 - 09:07 AM, said:

View PostTheOriginalBIT, on 21 March 2013 - 05:30 AM, said:

There are no variables in that code. And if you mean how I declared the functions. Functionally speaking, and memory management wise, your method is no different to mine. Yours are, what's the term, nope can't think 3:30am is stopping me from remembering... In any case yours are still allocated to memory just like mine, both are deallocated, both do the exact same thing, and in terms of byte code/binary wouldn't be any different or processed any different.

Technically anonymous functions are slower than declared/local ones, as I've read in an experiment on methods of optimization in lua.

http://web.archive.o.../LuaPerformance

Using the wayback machine because the website is down, unfortunately. :(
Actually, that was a comparison between defining the same function once or one million times, and the conclusion was that it's faster to define it once (duh).
Of course they were actually comparing "create a function one million times" to "create a function once and read a local variable one million times", so it wasn't a stupid test.

#27 R167

  • Members
  • 24 posts

Posted 21 March 2013 - 07:30 PM

View PostKingdaro, on 20 March 2013 - 09:42 AM, said:

I was going to make a separate section for those functions, but I figured that I'd wait until the wiki is updated with more comprehensive information than I can come up with.
I really wish that the wiki would be updated with the new features. I also was having troubles getting the "external" peripherals to work with the command blocks. This is great for extra large screens/wrap around displays...

#28 R167

  • Members
  • 24 posts

Posted 21 March 2013 - 07:38 PM

View PostPixelToast, on 21 March 2013 - 05:09 AM, said:

i dont think he wanted them to run simotanously
anyway, your code is broken in so many ways
parallel.waitForAll(
function() shell.run("disk/test") end,
function() shell.run("disk/test2") end
)

Not wrong, just personal preference.

View PostTheOriginalBIT, on 21 March 2013 - 04:53 AM, said:

View PostAngry1987, on 21 March 2013 - 04:38 AM, said:

hey i have 1 problem
i will starts 2 programs from 1 computer,here the startup:
shell.run("disk/test" and "disk/test2")
test first line
m = peripheral.wrap("monitor_5")
test2 first line
m = peripheral.wrap("monitor_6")
but 1 program only starts on monitor_6
You cannot use shell.run in that way....... you need to use coroutines to achieve what you want. or as shown in this example the parallel api.

local function run1()
  shell.run("disk/test")
end

local function run2()
  shell.run("disk/test2")
end

parallel.waitForAny( run1, run2 )

Did probably just want both to finish. waitForAll

Both ways are completely correct.

PS Both of your usernames are awesome.

#29 amtra5

  • Members
  • 166 posts
  • LocationMelbourne, Australia

Posted 25 March 2013 - 01:43 AM

Next is going to be "How to turn off others computers using network cables" XD

#30 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 25 March 2013 - 03:37 AM

you have to enable the computer on the network in order to do that

#31 slango20

  • Members
  • 43 posts

Posted 31 March 2013 - 10:28 AM

meh, when will they be released for the mindcrack pack? and why do the FTB packs take so long to update?

#32 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 31 March 2013 - 11:17 AM

View Postslango20, on 31 March 2013 - 10:28 AM, said:

meh, when will they be released for the mindcrack pack? and why do the FTB packs take so long to update?

The process of mod updating:
Minecraft updates
A few days later, Forge is ready for a release.
A while later, you're ready to update your mod.
Multiply that by all the mods in FTB.
Then you need to update config and whatnot.
Then FTB updates.

Factor in human procrastination and laziness, and it makes perfect sense.

#33 TheArchitect

  • Members
  • 68 posts

Posted 02 April 2013 - 11:54 AM

Can two computers wrap and talk to the same monitor at once, as the screenshot in the OP might suggest?

#34 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 02 April 2013 - 11:58 AM

View PostTheArchitect, on 02 April 2013 - 11:54 AM, said:

Can two computers wrap and talk to the same monitor at once, as the screenshot in the OP might suggest?
Yes they indeed can....

#35 TheArchitect

  • Members
  • 68 posts

Posted 02 April 2013 - 12:11 PM

Ooh. Must test!


...as soon as I upgrade to 1.5. Forgot I'm waiting for RP to update...

#36 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 02 April 2013 - 12:23 PM

View Postamtra5, on 25 March 2013 - 01:43 AM, said:

Next is going to be "How to turn off others computers using network cables" XD
Well, if you connect a disk drive on a wired network of computers, then put a shutdown startup script in it, it'll be really hard for computers on that network to get past it.

#37 TheArchitect

  • Members
  • 68 posts

Posted 02 April 2013 - 12:42 PM

*takes note*

#38 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 02 April 2013 - 12:49 PM

View PostKingdaro, on 02 April 2013 - 12:23 PM, said:

View Postamtra5, on 25 March 2013 - 01:43 AM, said:

Next is going to be "How to turn off others computers using network cables" XD
Well, if you connect a disk drive on a wired network of computers, then put a shutdown startup script in it, it'll be really hard for computers on that network to get past it.

Just put a disk drive on top that is not connected to the network.

#39 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 02 April 2013 - 12:56 PM

And if the computer is connected through the top?

At that point the computer would have to simply break the connection.

To be fair, I usually have my computers connected through the back, but in an office setting where you don't want workers overwriting your antivirus system, you would probably have a bunch of wires running through the ceiling.

#40 Aptik

  • Members
  • 32 posts
  • LocationUkraine

Posted 04 April 2013 - 03:35 AM

What about a situation without modems?
What will be detected by right computer (your screenshot but without modems) on left side? Computer or monitor?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users