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

ComputerCraft Beta Versions - Download and Discussion (1.74pr37, released June 22nd)

Started by dan200, 28 January 2014 - 11:00 AM
dan200 #1
Posted 28 January 2014 - 12:00 PM
Current version:
No beta. ComputerCraft 1.74 has now been released!
Requires Minecraft 1.7.10 and Forge

Please use this thread for Discussion only.
Please use the Bug Reports thread for bug reports.
Incorrectly placed posts will be deleted or moved, and you could have your beta access removed.

As with all betas, use this version download at your own risk, and don't expect world compatibility between versions.
Sxw #2
Posted 28 January 2014 - 12:19 PM
Just for make people want to try it: PDA's.

Little mini comps. No modem. Smaller screen. Still awesome.
dan200 #3
Posted 28 January 2014 - 12:21 PM
No modem.. yet!
wilcomega #4
Posted 28 January 2014 - 12:31 PM
finally, been waiting all day for you to release the beta!
Alekso56 #5
Posted 28 January 2014 - 12:42 PM
I made a github repo to show changes to the lua in CC, here's the 1.58 -> 1.6pr0 "changelog"

also yay!
wilcomega #6
Posted 28 January 2014 - 01:31 PM
how about a function called peripheral.findSide(sType) that returns the sides of a peripheral for use with the mail servers. cuz it seems like i need to open the rednet modem myself
AmandaC #7
Posted 28 January 2014 - 03:29 PM
Sorry if this is considered a bug, but. Is there any particular reason the repeat program is requiring two modems? What about repeater towers for extending the range of a base or similar?
Wojbie #8
Posted 28 January 2014 - 03:35 PM
I made a github repo to show changes to the lua in CC, here's the 1.58 -> 1.6pr0 "changelog"

also yay!

Fast look makes me see some awesome stuff - this was written in 10 min i spend looking trough changes.
  • "paste" Event
  • advanced computers run multi-shell ;p
  • channel 65533 is used as repeater channel ( works with 65534 for GPS and 65535[broadcast])
  • rednet now loops-back when you try to send message to computer you are using
  • rednet is more awesome. (will need to get into it more later ;p)
  • term.redirect returns from where you redirected it from - useful - also term.current()
  • term.restore() is gone ;p term.native()as a function now(returns native)
  • serialization looks more complicated
  • In love with window api
  • fs.find() and i just noted flush() in basic fs - how did i miss flush()?
  • new programs - fg bg multishell chat mail mailgui repeat redstone
  • gps no longer serializes the coordinates
  • dance now plays discs it finds ;p
  • /startup code moved from shell into startup program
And thats all i see from lua side ;p anyone want to add some?

I know i am with love with this update already - Great work dan200!!
Edited on 28 January 2014 - 03:29 PM
Calculator #9
Posted 28 January 2014 - 03:48 PM
This is perhaps a better place than Twitter for requests… Let me repeat my (very techincal) rednet comments this here:
  • Currently, sequence numbers are assumed to be globally unique. When two computers generate the same sequence number for two new messages, those messages are considered equal - while they're not. Surely, the chances of this happening are minor, but these non-deterministic things are a real PITA to debug as they are not easily reproducible.
  • An improvement would be to also include the original sender's ID inside the message, and treating the sequence numbers as locally unique. This means that tReceivedMessages will have to become a hash set with two levels (ID and sequence number), or a string key is used instead (such as id .. seqNumber). To make them truly unique, sequence numbers should increment (and wrap around) starting from an initial sequence numbers (generated by a clock). This initial sequence number comes with a bunch of extra problems, such as a forbidden region (if messages are sent too fast / too slow w.r.t. the clock). I think true uniqueness would be overkill, but local uniqueness would already be a good and easy improvement.
  • No entries are ever removed from the tReceivedMessages table. In a network with many computers communicating autonomously over a long period of time (a couple of days is very common for a Minecraft server), I would expect this table to quickly grow to large sizes, using way too much memory.
  • Also, if computers stay online for a long time, the chance of a sequence number being re-used increases over time. A computer may generate a random number it has used a long time in the past for a very old message, but that message has already long gone on the network. Still, all computers in the network would still have that number in their tables and reject the new message. I suggest removing old entries after some period of time (~ 10 to 60 seconds or something), effectively making tReceivedMessages a "cache" of seen messages. This way, memory usage should be limited and sequence numbers can actually be re-used. This also reduces the uniqueness requirements for sequence numbers: they should only be unique within a certain period.
Sorry if this is considered a bug, but. Is there any particular reason the repeat program is requiring two modems? What about repeater towers for extending the range of a base or similar?
Very good point! A pure wireless repeater should only need one modem to function. Surely, sending a message received from a wired modem back through that wired modem is unnecessary, so you may still want to exclude the original modem if it is wired. If the message originates from a wireless modem, you should always also retransmit over that modem again (to get a bigger range).

It should also be technically achievable: it won't be a problem if a message is received at a previous repeater, since they already have the message in their tReceivedMessages table and thus will ignore the second receipt.

There's just one problem with it in the current implementation: a broadcast message sent by a computer will not be ignored when it is received by the originating computer. There's a very easy fix for this, though: simply add your own messages to the tReceivedMessages table before actually sending them (after line 64 in rednet.send). That should prevent the broadcast from being received by the originating computer. I completely missed that this was already implemented on line 55 in the rednet API. :P/>

Also posted as bug report in the Beta Bug Reports thread.
Edited on 29 January 2014 - 04:38 AM
Lyqyd #10
Posted 28 January 2014 - 04:28 PM
In reference to wojbie's comment above, I believe channel 65534 is used for GPS requests.
Wojbie #11
Posted 28 January 2014 - 04:46 PM
In reference to wojbie's comment above, I believe channel 65534 is used for GPS requests.

D'oh! Now that was stupid to forget about :P/>

I love this update how it adds lot of things i was making on my own (and making it bad) ;p like window api and multishell.
I cant wait to get some free time to start messing with this stuff some more. I want to make new extended shell using all new thing.

As for message ID thing then i agree - making it locally unique would solve most of theoretical problems. ;)/>

Also cause of this new re-factorization all computers with same ID are same if i am reading twitter right. Could that mean you could setup a dimensional repeater computer by getting 2 same ID computers(from admin) setting them in different dimensions and running modified routing code (so it sends it out each wireless modem once - one modem per dimension)? - Just wild speculation can't get it set up right to test it. Also that idea is working on something that is not created on purpose so probably not stable :D/>
Edited on 28 January 2014 - 03:47 PM
MKlegoman357 #12
Posted 28 January 2014 - 04:57 PM
I made a github repo to show changes to the lua in CC, here's the 1.58 -> 1.6pr0 "changelog"

also yay!

I read changes in the code (thank you Alekso56) and found two things I have questions about:
  • In bios.lua should printError( "bar" ) be there (line: 397)?
  • 
    if err and err ~= "" then
      printError( err )
      printError( "bar" )
    end
    
  • In rednet.lookup:
  • If I understand correctly if type( sProtocol ) ~= "string" then would evaluate to true if sProtocol would be nil but after that there is a check if it is equal to nil - if sProtocol == nil then. Am I misunderstanding something?

Also, looks like rename has it's own program now (help as well). I don't see turtle_response event in use so I guess it's gone. I saw some advancement in code in general, looks like Dan200 is now better with Lua :D/>.

Edit: Also noticed the turtle.getSelectedSlot function.
Edited on 28 January 2014 - 04:02 PM
Calculator #13
Posted 28 January 2014 - 06:01 PM
In bios.lua should printError( "bar" ) be there (line: 397)?

if err and err ~= "" then
  printError( err )
  printError( "bar" )
end
That looks like a debug leftover to me. Dan needs to remove that line. :P/>

In rednet.lookup:

If I understand correctly if type( sProtocol ) ~= "string" then would evaluate to true if sProtocol would be nil but after that there is a check if it is equal to nil - if sProtocol == nil then. Am I misunderstanding something?
Indeed, that doesn't make any sense. The type( sProtocol ) ~= "string" check already covers nil values. Also, it would seem that tResults will always be nil (as sProtocol can never be nil at line 150), thus all table.insert calls will fail. I believe lines 147 to 150 should simply be replaced with local tResults = {}.
Edited on 28 January 2014 - 05:01 PM
theoriginalbit #14
Posted 28 January 2014 - 08:06 PM
ugh! really, still no throwbacks on the error calls in the rednet API?!

how about error( "expected string", 2 )

also just broke a hell of a lot of scripts from changing term.native from a table to a function. Is backward compatibility of scripts no longer a priority?
AmandaC #15
Posted 28 January 2014 - 09:39 PM
I'm curious – will the modems for PDAs be "free" as in, in the cost for the device itself, or will they be an additional thing like they are for turtles and computers. I kinda feel they should be "free" since it'd make little sense for there to be a device that has no external communications whatsoever.

And a side note: There should be a little antenna on the GUI and the item glyph for them. I think that'd be kinda cute. :P/>
oeed #16
Posted 29 January 2014 - 03:08 AM
Awww yea! I had a dream trying to tell me to check if the beta had come out.

With the PDAs, I presume that modems will be added before release?

And yes, an antenna would look cool :P/>
Edited on 29 January 2014 - 02:09 AM
MudkipTheEpic #17
Posted 29 January 2014 - 08:58 AM
Looks great!

And dan, with all the work on Lua side enhancements, will suggestions for things to add/remove/change to the default programs not just be locked as an "Enhancement", or are you going to figure everything out yourself?

Just my two cents.
dan200 #18
Posted 29 January 2014 - 09:03 AM
Honestly, I'm not very much involved in moderating the suggestion forums (or really at all), a lot of things get locked/denied that I probably wouldn't myself.
kalnat #19
Posted 29 January 2014 - 03:04 PM
If you place a computer and disk drive, open the disk drive you get a crash and i don't think it is meant to crash. EDIT: Posted in wrong topic… and its already reported as i didnt see the bug reports topic because i looked at latest post in this topic and i am new
Edited on 30 January 2014 - 09:25 AM
Lyqyd #20
Posted 29 January 2014 - 03:38 PM
There's a thread in this section for bug reports, and that disk drive crash bug has already been posted in there.
Wojbie #21
Posted 29 January 2014 - 06:16 PM
Not sure if bug or simplay way its coded so i need someone to test it too - try run "fg multishell" on advanced computer and then run "fg multishell" in shell created that way - rinse repeat- I got "too long without yelding" in 8 repeats ;p

On sidenote Portable Computer screen is 26x20 - thats interesting size to work with ;D
AmandaC #22
Posted 29 January 2014 - 07:13 PM
Will the 1.6 version have the buzzers for the portable computers as well? That would be rather cool if they do. ( People seem to be under the impression they might get added, since you tweeted "Good idea!" to someone who suggested them. )
ElvishJerricco #23
Posted 30 January 2014 - 05:18 AM
I'm not sure why message uniqueness was included in the new rednet if the unique ID is just going to be an unsafe random. The benefits of uniqueness aren't that great so why allow even a slight chance of failure in favor of it? Otherwise I love the new changes.
Edited on 30 January 2014 - 04:19 AM
theoriginalbit #24
Posted 30 January 2014 - 05:23 AM
I'm not sure why message uniqueness was included in the new rednet if the unique ID is just going to be an unsafe random. The benefits of uniqueness aren't that great so why allow even a slight chance of failure in favor of it? Otherwise I love the new changes.
the IDs are only preserved for 30 seconds, there is little to no chance of getting conflicting randoms… the message uniqueness is so that message propagation is not a thing, if computers know about a message they've already sent they won't send it again, as such messages need a "UUID"
ElvishJerricco #25
Posted 30 January 2014 - 06:08 AM
I'm not sure why message uniqueness was included in the new rednet if the unique ID is just going to be an unsafe random. The benefits of uniqueness aren't that great so why allow even a slight chance of failure in favor of it? Otherwise I love the new changes.
the IDs are only preserved for 30 seconds, there is little to no chance of getting conflicting randoms… the message uniqueness is so that message propagation is not a thing, if computers know about a message they've already sent they won't send it again, as such messages need a "UUID"

Ah. Must've misread the code. Didn't see the propagation stuff.
Xfel #26
Posted 30 January 2014 - 06:10 AM
What happened to the IHostedPeripheral class? Turtle peripherals can still do the same as before, it's just a bit more complicated, but peripherals which are created for third party tiles can't save state or get updates any more.
dan200 #27
Posted 30 January 2014 - 07:40 AM
I'm not sure why message uniqueness was included in the new rednet if the unique ID is just going to be an unsafe random. The benefits of uniqueness aren't that great so why allow even a slight chance of failure in favor of it? Otherwise I love the new changes.

The chance of a collision is one in 2 billion. Should I also add code to protect against an asteroid hitting the earth and destroying your PC? the odds are comparable.
theoriginalbit #28
Posted 30 January 2014 - 08:29 AM
Should I also add code to protect against an asteroid hitting the earth and destroying your PC?
Oooh yes please! :P/>
GravityScore #29
Posted 30 January 2014 - 09:44 AM
Just want to say that I love the new window API! A very elegant and flexible way of managing buffers. Not a fan of the chat program - why bother with a server?
mr_taito #30
Posted 30 January 2014 - 11:44 AM
I have a question. Why have the Bundled Cable from Project Red no connections to the computer????
Lyqyd #31
Posted 30 January 2014 - 12:24 PM
MFR's rednet cables are the currently supported bundled cable system.
mr_taito #32
Posted 30 January 2014 - 12:36 PM
ok… can you gave me a picture how i must do it with MFR's rednetcables?

and why gave dan200 not the mod Project Red the connection for the computers? Project Red Builds on the original mod RedPower. I wish he gave the connection for the Bundled Cable from the mod Project Red
Lyqyd #33
Posted 30 January 2014 - 01:23 PM
Last I had heard on the subject, dan was waiting on either project red or red logic to come out on top, if I recall correctly. Before either of them was mature enough to use, MFR's bundled cables were around, so dan used them. As far as I'm aware, anyway.
mr_taito #34
Posted 30 January 2014 - 01:33 PM
hm ok thy for help
mr_taito #35
Posted 30 January 2014 - 02:34 PM
on server: 2014-01-30 20:43:34 [SEVERE] Encountered an unexpected exception NoSuchMethodError
java.lang.NoSuchMethodError: net.minecraft.world.IBlockAccess.func_72800_K()I
at dan200.computercraft.shared.util.RedstoneUtil.getBlock(RedstoneUtil.java:19)
at dan200.computercraft.shared.util.RedstoneUtil.getRedstoneOutput(RedstoneUtil.java:30)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.updateInput(TileComputerBase.java:217)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.getServerComputer(TileComputerBase.java:286)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.updateInput(TileComputerBase.java:207)
at dan200.computercraft.shared.computer.blocks.BlockComputerBase.updateInput(BlockComputerBase.java:96)
at dan200.computercraft.shared.computer.blocks.BlockComputerBase.func_71861_g(BlockComputerBase.java:32)
at net.minecraft.world.chunk.Chunk.func_76592_a(Chunk.java:758)
at net.minecraft.world.World.func_72832_d(World.java:559)
at net.minecraft.item.ItemBlock.placeBlockAt(ItemBlock.java:241)
at dan200.computercraft.shared.computer.items.ItemComputer.placeBlockAt(ItemComputer.java:66)
at net.minecraft.item.ItemBlock.func_77648_a(ItemBlock.java:119)
at net.minecraft.item.ItemStack.func_77943_a(ItemStack.java:153)
at net.minecraft.item.ItemInWorldManager.func_73078_a(ItemInWorldManager.java:434)
at net.minecraft.network.NetServerHandler.func_72472_a(NetServerHandler.java:556)
at net.minecraft.network.packet.Packet15Place.func_73279_a(SourceFile:58)
at net.minecraft.network.TcpConnection.func_74428_b(TcpConnection.java:462)
at net.minecraft.network.NetServerHandler.func_72570_d(NetServerHandler.java:141)
at net.minecraft.network.NetworkListenThread.func_71747_b(NetworkListenThread.java:54)
at net.minecraft.server.dedicated.DedicatedServerListenThread.func_71747_b(SourceFile:30)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:691)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:276)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:587)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)
Devon The Novice #36
Posted 31 January 2014 - 11:16 PM
First of all, I am in love with the new version. Anyway, a few things I noticed about rednet, not really bugs, but worth noting. For the repeat program (for rednet repeaters) would it be possible to add in bouncing messages. As in, I have a repeater with 2 modems on it. A wired and wireless. And I have 2 computers connected using wireless. say both wireless computers are in range of the repeater, but not each other. I know there are ways to work around this and for the most part, it would kind of be rare for this, but seeing as it is an easy to add feature, would it be possible to set up a way so that it you could get the message from one directly to the other via the repeater? is it already added or being added?

Basically remove this line

if sModem ~= sOtherModem then
peripheral.call( sOtherModem, "transmit", rednet.CHANNEL_REPEAT, nReplyChannel, tMessage )
peripheral.call( sOtherModem, "transmit", tMessage.nRecipient, nReplyChannel, tMessage )
end

–and replace it with

peripheral.call( sOtherModem, "transmit", rednet.CHANNEL_REPEAT, nReplyChannel, tMessage )
peripheral.call( sOtherModem, "transmit", tMessage.nRecipient, nReplyChannel, tMessage )

I don't know what your plans are, but that is my long suggestion.

My short suggestion is why not just use a time, day, sender stamp on messages to determine duplicates. I am guessing there is a reason, but I would just like to know!

Edit: Sorry if the post looks bad… Editor is lagging out, not recognising all key strokes, and the code option seems to not work opens fine, but clicking ok does nothing.
Edited on 31 January 2014 - 10:21 PM
NeverCast #37
Posted 01 February 2014 - 02:19 AM
on server: 2014-01-30 20:43:34 [SEVERE] Encountered an unexpected exception NoSuchMethodError
java.lang.NoSuchMethodError: net.minecraft.world.IBlockAccess.func_72800_K()I
at dan200.computercraft.shared.util.RedstoneUtil.getBlock(RedstoneUtil.java:19)
at dan200.computercraft.shared.util.RedstoneUtil.getRedstoneOutput(RedstoneUtil.java:30)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.updateInput(TileComputerBase.java:217)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.getServerComputer(TileComputerBase.java:286)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.updateInput(TileComputerBase.java:207)
at dan200.computercraft.shared.computer.blocks.BlockComputerBase.updateInput(BlockComputerBase.java:96)
at dan200.computercraft.shared.computer.blocks.BlockComputerBase.func_71861_g(BlockComputerBase.java:32)
at net.minecraft.world.chunk.Chunk.func_76592_a(Chunk.java:758)
at net.minecraft.world.World.func_72832_d(World.java:559)
at net.minecraft.item.ItemBlock.placeBlockAt(ItemBlock.java:241)
at dan200.computercraft.shared.computer.items.ItemComputer.placeBlockAt(ItemComputer.java:66)
at net.minecraft.item.ItemBlock.func_77648_a(ItemBlock.java:119)
at net.minecraft.item.ItemStack.func_77943_a(ItemStack.java:153)
at net.minecraft.item.ItemInWorldManager.func_73078_a(ItemInWorldManager.java:434)
at net.minecraft.network.NetServerHandler.func_72472_a(NetServerHandler.java:556)
at net.minecraft.network.packet.Packet15Place.func_73279_a(SourceFile:58)
at net.minecraft.network.TcpConnection.func_74428_b(TcpConnection.java:462)
at net.minecraft.network.NetServerHandler.func_72570_d(NetServerHandler.java:141)
at net.minecraft.network.NetworkListenThread.func_71747_b(NetworkListenThread.java:54)
at net.minecraft.server.dedicated.DedicatedServerListenThread.func_71747_b(SourceFile:30)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:691)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:276)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:587)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)

I got this too, my guess is that something that was unnamed or differently named in forge before, is now changed. So it's a forge version issue, that's my guess anyway. If only running a Forge server was just downloading a Jar like it used to be, these days it's a pain. I'll let you know when I've got a working forge version and will edit this post.


Update: This method is the getHeight method, still looking for changes recently.
Edited on 01 February 2014 - 01:23 AM
oeed #38
Posted 01 February 2014 - 02:42 AM
Will the 1.6 version have the buzzers for the portable computers as well? That would be rather cool if they do. ( People seem to be under the impression they might get added, since you tweeted "Good idea!" to someone who suggested them. )

I'd love buzzers!
Final Approach #39
Posted 01 February 2014 - 06:00 AM
Seems awesome… Happy Chinese New year!

Wow. OneClickVPN is quick! (Yes, Im from HK and Im using HK VPN)

Btw I hope to finally participate after spring 2013
awsmazinggenius #40
Posted 01 February 2014 - 10:00 AM
Small idea: pop a Pocket Computer in a disk drive (sort of like connecting your phone to your PC to transfer data), and you can access it's data through your filesystem. (in a folder called pc, pc1, pc2, etc.) Unless we get modems (or this might be more "balanced" instead, though CC seems to focus on easy-to-craft-and-use stuff), this might be a good way to transfer data.
gollark8 #41
Posted 01 February 2014 - 10:07 AM
If we did get PDA modems,which side would they have their modems on?
A really advanced/expensive PDA with inbuilt modem,disk drive and printer would be a thing I'd really like.
Wojbie #42
Posted 01 February 2014 - 10:31 AM
I Don't think it falls under Bug Report so i am posting it here - with changes in CC some of treasure disk programs are no longer working
Here is list that i tested as nonfunctional (sidenote - you can place disk in diskdrive with hopper ;p):

nsh by Lyqyd
talk by GopherAtl
gollark8 #43
Posted 01 February 2014 - 11:02 AM
I Don't think it falls under Bug Report so i am posting it here - with changes in CC some of treasure disk programs are no longer working
Here is list that i tested as nonfunctional (sidenote - you can place disk in diskdrive with hopper ;p):

nsh by Lyqyd
talk by GopherAtl
They may be broken because of the rednet changes.
ElvishJerricco #44
Posted 01 February 2014 - 01:04 PM
Small idea: pop a Pocket Computer in a disk drive (sort of like connecting your phone to your PC to transfer data), and you can access it's data through your filesystem. (in a folder called pc, pc1, pc2, etc.) Unless we get modems (or this might be more "balanced" instead, though CC seems to focus on easy-to-craft-and-use stuff), this might be a good way to transfer data.

Well this is a fantastic idea.
awsmazinggenius #45
Posted 01 February 2014 - 02:41 PM
Probably the back side. But I also think we should be able to pop them in Disk Drives, maybe to "charge" them without requiring other mods :)/>
Wojbie #46
Posted 01 February 2014 - 03:03 PM
Probably the back side. But I also think we should be able to pop them in Disk Drives, maybe to "charge" them without requiring other mods :)/>

charge? There was no information about any charging of stuff? Don't CC computers work of air? :P/>
Edited on 01 February 2014 - 02:04 PM
Mikeemoo #47
Posted 01 February 2014 - 03:30 PM
Dan, looks like the API is referring to an internal class:

import dan200.computercraft.shared.turtle.core.TurtleAnimation;

inside ITurtleAccess
Lyqyd #48
Posted 01 February 2014 - 04:31 PM
Small idea: pop a Pocket Computer in a disk drive (sort of like connecting your phone to your PC to transfer data), and you can access it's data through your filesystem. (in a folder called pc, pc1, pc2, etc.) Unless we get modems (or this might be more "balanced" instead, though CC seems to focus on easy-to-craft-and-use stuff), this might be a good way to transfer data.

Dan's already been planning on doing this.
awsmazinggenius #49
Posted 01 February 2014 - 04:34 PM
Oh. Thanks Lyqyd, I guess I don't read reddit enough ;)/>
oeed #50
Posted 01 February 2014 - 05:22 PM
Small idea: pop a Pocket Computer in a disk drive (sort of like connecting your phone to your PC to transfer data), and you can access it's data through your filesystem. (in a folder called pc, pc1, pc2, etc.) Unless we get modems (or this might be more "balanced" instead, though CC seems to focus on easy-to-craft-and-use stuff), this might be a good way to transfer data.
dan200 said:
People have been asking about how these will be able to interact with the world, this will happen in two ways: * They'll have a built in wireless modem * You'll be able to place them in disk drives and copy files to them
http://www.reddit.com/r/feedthebeast/comments/1vyaj4/also_in_computercraft_16_pocket_computers/cex8cad

Yep :D/>
Devon The Novice #51
Posted 01 February 2014 - 08:30 PM
I was going to recommend something like that, but don't need to now :P/> .

Noticed something about windows (the api) though, you can term.redirect to it, however, mouse_click (and I would assume monitor_touch) returns the value's of the parent, not the window. any plan to make clicks on windows return where on the window was clicked?
oeed #52
Posted 01 February 2014 - 09:28 PM
If we did get PDA modems,which side would they have their modems on?
A really advanced/expensive PDA with inbuilt modem,disk drive and printer would be a thing I'd really like.

I was thinking about that. I'd imagine it'd be like using the wired modems, with modem_1, it'll probably just be peripheral.wrap('modem').
Edited on 01 February 2014 - 08:32 PM
Engineer #53
Posted 01 February 2014 - 10:10 PM
Dan, looks like the API is referring to an internal class:

import dan200.computercraft.shared.turtle.core.TurtleAnimation;

inside ITurtleAccess
That has been reported already…
3dsboy08 #54
Posted 03 February 2014 - 08:52 AM
Thank u wojbie! It works if u use a hopper.
dexman545 #55
Posted 04 February 2014 - 06:51 PM
will there be any way to wrap peripherals with the PDA? for instance if I click with the PDA on a monitor, will I be able to use the monitor from the PDA?
Lyqyd #56
Posted 04 February 2014 - 07:31 PM
I would suspect not, though they will have modems, so you'd be able to write some software to use them remotely.
6677 #57
Posted 05 February 2014 - 06:44 AM
nsh for instance
RamiLego4Game #58
Posted 05 February 2014 - 09:07 AM
MFR's rednet cables are the currently supported bundled cable system.

How do you have Redpower or MC1.6.4 ?
ElvishJerricco #59
Posted 05 February 2014 - 10:30 AM
MFR's rednet cables are the currently supported bundled cable system.

How do you have Redpower or MC1.6.4 ?

MFR's rednet cables are not part of Redpower.
Bomb Bloke #60
Posted 06 February 2014 - 01:41 AM
Is the turtle fuel cap of 5000 new to 1.6? It's a fair bit of a nerf, and seems it'll be a right annoyance for many non-excavator scripts (which otherwise wouldn't need to waste those few precious inventory slots on fuel items): I've fired off scripts that I've calculated to use over 200k fuel units, and previously all I had to do is throw in two or three inventory loads of charcoal before running them.

Now, even trying to refuel with just one stack of charcoal will result in the turtle exceeding its fuel cap (though it still deletes the fuel items it lacks room for, I see…). While I don't mind the idea of a more realistic cap (I've no idea what the limit was before - I've gone into the millions and can see that the concept gets silly after a while), would something like 100k be a bit much to ask? Or even half of that?

Edit: I see advanced turtles go up to 20k. That still seems fairly low, especially for the gold versions.
Edited on 06 February 2014 - 01:08 AM
Engineer #61
Posted 06 February 2014 - 03:05 AM
Is the turtle fuel cap of 5000 new to 1.6? It's a fair bit of a nerf, and seems it'll be a right annoyance for many non-excavator scripts (which otherwise wouldn't need to waste those few precious inventory slots on fuel items): I've fired off scripts that I've calculated to use over 200k fuel units, and previously all I had to do is throw in two or three inventory loads of charcoal before running them.

Now, even trying to refuel with just one stack of charcoal will result in the turtle exceeding its fuel cap (though it still deletes the fuel items it lacks room for, I see…). While I don't mind the idea of a more realistic cap (I've no idea what the limit was before - I've gone into the millions and can see that the concept gets silly after a while), would something like 100k be a bit much to ask? Or even half of that?

Edit: I see advanced turtles go up to 20k. That still seems fairly low, especially for the gold versions.
Iirc you can change it in the config.
oeed #62
Posted 06 February 2014 - 04:59 AM
Is the turtle fuel cap of 5000 new to 1.6? It's a fair bit of a nerf, and seems it'll be a right annoyance for many non-excavator scripts (which otherwise wouldn't need to waste those few precious inventory slots on fuel items): I've fired off scripts that I've calculated to use over 200k fuel units, and previously all I had to do is throw in two or three inventory loads of charcoal before running them.

Now, even trying to refuel with just one stack of charcoal will result in the turtle exceeding its fuel cap (though it still deletes the fuel items it lacks room for, I see…). While I don't mind the idea of a more realistic cap (I've no idea what the limit was before - I've gone into the millions and can see that the concept gets silly after a while), would something like 100k be a bit much to ask? Or even half of that?

Edit: I see advanced turtles go up to 20k. That still seems fairly low, especially for the gold versions.

If it's deleting fuel items when exceeding the fuel cap then definitely report that on the bug forum, that could annoy a lot of people.

5000 is very low, while I can see why a fuel cap would have been added you still have to source the fuel from somewhere. Just because you have 400k fuel doesn't mean you didn't 'pay for it' as such. If you put the fuel in through creative you probably don't want a fuel limit anyway.
Bomb Bloke #63
Posted 06 February 2014 - 05:29 AM
Iirc you can change it in the config.
That may be the case, though I don't see any pre-defined fields to alter and a couple of (basic) web searches isn't picking anything up. Still: "Power of default", and all that. The question is whether the average ComputerCraft user is going to feel compelled to bug his server admin to change settings files or not. It may be this value suits the average coder, I just dunno.

If it's deleting fuel items when exceeding the fuel cap then definitely report that on the bug forum, that could annoy a lot of people.
I figured Dan'd read it here, but I suppose there's no point in chancing it.
sjkeegs #64
Posted 06 February 2014 - 06:59 PM
Iirc you can change it in the config.
Is there a method of checking for that in code? Like checking for a turtle with fuel disabled.
Bomb Bloke #65
Posted 06 February 2014 - 07:12 PM
turtle.getFuelLevel() either returns the amount of fuel the turtle has, or a string stating "unlimited" if the fuel system is entirely disabled.

Edit: I misread.
Edited on 06 February 2014 - 10:21 PM
awsmazinggenius #66
Posted 06 February 2014 - 10:38 PM
I believe in the beta turtle.getFuelLimit() (or whatever the method is named) will return nil on no fuel limit.(iirc you can edit the config for that, too).
MudkipTheEpic #67
Posted 07 February 2014 - 01:49 PM
Maybe to help with the term.native backwards compatibility, you could revert term.native back to a table, and add a __call metamethod like this:

setmetatable(term.native, {
  __call=function(self)
    return self
  end
})
Edited on 07 February 2014 - 12:50 PM
ElvishJerricco #68
Posted 07 February 2014 - 02:34 PM
Maybe to help with the term.native backwards compatibility, you could revert term.native back to a table, and add a __call metamethod like this:

setmetatable(term.native, {
  __call=function(self)
	return self
  end
})

That's… Actually kind of clever.
Wojbie #69
Posted 07 February 2014 - 03:12 PM
Edit: Never mind original content i was idiot.

As for Fuel Level stuff this gives people a new challenge in programs - make it refuel smart way.
Edited on 07 February 2014 - 02:15 PM
mr_taito #70
Posted 12 February 2014 - 02:23 PM
I need help. I have CC 1.6pre0 put on my server (1.6.4) and it crashes when i click the computer. this report comes

Spoiler—- Minecraft Crash Report —-
// Would you like a cupcake?

Time: 12.02.14 20:31
Description: Ticking tile entity

java.lang.NoSuchMethodError: net.minecraft.world.IBlockAccess.func_72800_K()I
at dan200.computercraft.shared.util.RedstoneUtil.getBlock(RedstoneUtil.java:19)
at dan200.computercraft.shared.util.RedstoneUtil.getRedstoneOutput(RedstoneUtil.java:30)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.updateInput(TileComputerBase.java:217)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.getServerComputer(TileComputerBase.java:286)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.func_70316_g(TileComputerBase.java:129)
at net.minecraft.world.World.func_72939_s(World.java:2209)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:550)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:668)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:276)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:587)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)


A detailed walkthrough of the error, its code path and all known details is as follows:
—————————————————————————————

– Head –
Stacktrace:
at dan200.computercraft.shared.util.RedstoneUtil.getBlock(RedstoneUtil.java:19)
at dan200.computercraft.shared.util.RedstoneUtil.getRedstoneOutput(RedstoneUtil.java:30)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.updateInput(TileComputerBase.java:217)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.getServerComputer(TileComputerBase.java:286)
at dan200.computercraft.shared.computer.blocks.TileComputerBase.func_70316_g(TileComputerBase.java:129)

– Tile entity being ticked –
Details:
Name: computer // dan200.computercraft.shared.computer.blocks.TileComputer
Block type: ID #1225 (tile.cccomputer // dan200.computercraft.shared.computer.blocks.BlockComputer)
Block data value: 5 / 0x5 / 0b0101
Block location: World: (-161,67,446), Chunk: (at 15,4,14 in -11,27; contains blocks -176,0,432 to -161,255,447), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Actual block type: ID #1225 (tile.cccomputer // dan200.computercraft.shared.computer.blocks.BlockComputer)
Actual block data value: 5 / 0x5 / 0b0101
Stacktrace:
at net.minecraft.world.World.func_72939_s(World.java:2209)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:550)

– Affected level –
Details:
Level name: world
All players: 0 total; []
Chunk stats: ServerChunkCache: 625 Drop: 0
Level seed: -5942115401117173831
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options:
Level spawn location: World: (-158,64,432), Chunk: (at 2,4,0 in -10,27; contains blocks -160,0,432 to -145,255,447), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Level time: 88126 game time, 88126 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 70188 (now: false), thunder time: 43879 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:668)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:276)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:587)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)

– System Details –
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_45, Oracle Corporation
Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 154489232 bytes (147 MB) / 275775488 bytes (263 MB) up to 954728448 bytes (910 MB)
JVM Flags: 0 total;
AABB Pool Size: 1244 (69664 bytes; 0 MB) allocated, 1244 (69664 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 63
FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 41 mods loaded, 41 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{6.4.45.953} [Forge Mod Loader] (DNS.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{9.11.1.953} [Minecraft Forge] (DNS.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
CodeChickenCore{0.9.0.7} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
PowerCrystalsCore{1.1.8} [PowerCrystals Core] (PowerCrystalsCore-1.1.8-9.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ComputerCraft{${version}} [ComputerCraft] (ComputerCraft1.6pr0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MFR Compat Forestry Trees{1.0} [MFR Compat Forestry Trees] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MFR Compat Extra Trees{1.0} [MFR Compat Extra Trees] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded{1.6.2R2.7.4} [MineFactory Reloaded] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatAppliedEnergistics{1.6.2R2.7.4} [MFR Compat: Applied Energistics] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatAtum{1.6.2R2.7.4} [MFR Compat: Atum] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatBackTools{1.6.2R2.7.4} [MFR Compat: BackTools] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatBuildCraft{1.6.2R2.7.4} [MFR Compat: BuildCraft] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatChococraft{1.6.2R2.7.4} [MFR Compat: Chococraft] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatExtraBiomes{1.6.2R2.7.4} [MFR Compat: ExtraBiomes] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatForestry{1.6.2R2.7.4} [MFR Compat: Forestry] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatForestryPre{1.6.2R2.7.4} [MFR Compat: Forestry (part 2)] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatForgeMicroblock{1.6.2R2.7.4} [MFR Compat: ForgeMicroblock] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatIC2{1.6.2R2.7.4} [MFR Compat: IC2] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatMagicalCrops{1.6.2R2.7.4} [MFR Compat: Magical Crops] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatMystcraft{1.6.2R2.7.4} [MFR Compat: Mystcraft] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatPams{1.6.2R2.7.4} [MFR Compat: Pam's Mods] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatRailcraft{1.6.2R2.7.4} [MFR Compat: Railcraft] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatRP2{1.6.2R2.7.4} [MFR Compat: RP2] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatSufficientBiomes{1.6.2R2.7.4} [MFR Compat: Sufficient Biomes] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatThaumcraft{1.6.2R2.7.4} [MFR Compat: Thaumcraft] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatThermalExpansion{1.6.2R2.7.4} [MFR Compat: Thermal Expansion] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatTwilightForest{1.6.2R2.7.4} [MFR Compat: TwilightForest] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatVanilla{1.6.2R2.7.4} [MFR Compat: Vanilla] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
MineFactoryReloaded|CompatXyCraft{1.6.2R2.7.4} [MFR Compat: XyCraft] (MineFactoryReloaded-2.7.4-255.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ForgeMultipart{1.0.0.227} [Forge Multipart] (ForgeMultipart-universal-1.6.4-1.0.0.227.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Core{4.2.2.19} [ProjectRed] (ProjectRedBase-1.6.4-4.2.2.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Compatibility{1.0} [ProjRed|Compatibility] (ProjectRedCompat-1.6.4-4.2.2.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Integration{1.0} [ProjRed|Integration] (ProjectRedIntegration-1.6.4-4.2.2.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Transmission{1.0} [ProjRed|Transmission] (ProjectRedIntegration-1.6.4-4.2.2.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Illumination{1.0} [ProjRed|Illumination] (ProjectRedLighting-1.6.4-4.2.2.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Expansion{1.0} [ProjRed|Expansion] (ProjectRedMechanical-1.6.4-4.2.2.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Transportation{1.0} [ProjRed|Transportation] (ProjectRedMechanical-1.6.4-4.2.2.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ProjRed|Exploration{1.0} [ProjRed|Exploration] (ProjectRedWorld-1.6.4-4.2.2.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
McMultipart{1.0.0.227} [Minecraft Multipart Plugin] (ForgeMultipart-universal-1.6.4-1.0.0.227.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ForgeMicroblock{1.0.0.227} [Forge Microblocks] (ForgeMultipart-universal-1.6.4-1.0.0.227.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 1816 (101696 bytes; 0 MB) allocated, 1816 (101696 bytes; 0 MB) used
Player Count: 0 / 20; []
Is Modded: Definitely; Server brand changed to 'fml,forge'
Type: Dedicated Server (map_server.txt)

Pls help me
Edited on 13 February 2014 - 11:56 AM
Lyqyd #71
Posted 13 February 2014 - 12:21 PM
Check out the Bug Reports thread in this section. If this bug hasn't already been posted, please post it in that topic.
mr_taito #72
Posted 13 February 2014 - 12:47 PM
I do it when i'm sitting on the pc
sci4me #73
Posted 15 February 2014 - 05:28 PM
I get a noClassDefFoundError for dan200.turtle.api.ITurtleUpgrade even though the class is there… so… fuck

Edit: nvm, its not in the same folder.. :/
Edited on 15 February 2014 - 04:30 PM
dan200 #74
Posted 06 March 2014 - 01:02 AM
Hey all, I've posted a new version in the OP. Hopefully most of the bugs with Computers/Turtles/Pockets' getting their identitiies crossed are fixed. Please test!
masterdisasterHD #75
Posted 06 March 2014 - 07:25 AM
Hey dan200, this is not really a bug but a request, if you edit a program at the bottom you have a menu right?
if you have more then 9 lines you cant see the number properly anymore :P/>, can ya fix it?
Edited on 06 March 2014 - 06:26 AM
Alekso56 #76
Posted 06 March 2014 - 04:12 PM
1.6pr0 > 1.6pr1 Lua Changelog:

https://github.com/alekso56/ComputercraftLua/commit/573be09f59e780e6b631223361820caef4d241f0
Edited on 06 March 2014 - 09:14 PM
MCGamer20000 #77
Posted 06 March 2014 - 10:54 PM
Does it work in Minecraft 1.7.2? If not, when will you work on the 1.7.2 version?
Lyqyd #78
Posted 06 March 2014 - 11:45 PM
It has been previously mentioned that the CC 1.6 release will be for 1.6.4 first, but releases following that will likely be for 1.7.2.
oeed #79
Posted 07 March 2014 - 12:42 AM
Just to confirm, modems haven't been added to PDAs yet have they?

I've been trying to but I can't seem to find it.
Lyqyd #80
Posted 07 March 2014 - 02:32 AM
peripheral.find("modem") returns nil on PDAs.
Wojbie #81
Posted 07 March 2014 - 11:15 AM
1.6pr0 > 1.6pr1 Lua Changelog:

https://github.com/a...1820caef4d241f0

Let me again write fast list of changes i see ;D
  • error levels in apis
  • message routing duplication protection timeout
  • can't redirect term to term anymore - great that crashed - that happend few times for me
  • textutils now uses redirect in its works during paged print
  • cant make window on term anymore - great that lead to stupid user generated bugs - now you need to make it directly on native or other table. (like monitor wrap or other window)
  • window create function input check added and other window api upgrades.
  • cancelTimer(token) and cancelAlarm(token)
  • repeat program modified to work with one modem and moved
  • some programs moved
  • weird x=5 in line 40 of lua. - i think thats some orphaned code - reported in bugs
  • craft program modified to tell exactly how many times it crafted. (old system told how many items it got instead)
  • refuel program modified to respect fuel limits.
  • startup modified a bit to respect moved files.
Edited on 07 March 2014 - 12:46 PM
theoriginalbit #82
Posted 07 March 2014 - 01:08 PM
error levels in apis
yep. I requested it to reduce AaP questions. :)/>
Wojbie #83
Posted 07 March 2014 - 06:51 PM
1.6pr0 > 1.6pr1 Lua Changelog:

https://github.com/a...1820caef4d241f0

Can you make 1.6pr1 > 1.6pr2
Would be great tx!
Alekso56 #84
Posted 07 March 2014 - 08:31 PM
Can you make 1.6pr1 > 1.6pr2
Would be great tx!

1.6pr1 > 1.6pr2 Lua Changelog:
https://github.com/alekso56/ComputercraftLua/commit/a81e4861e9fd837e5287f8f75005aca84fae2624
Wojbie #85
Posted 08 March 2014 - 06:02 PM
1.6pr1 > 1.6pr2 Lua Changelog:
https://github.com/a...005aca84fae2624

Let me again write fast list of changes i see (stroke my ego) :P/>
  • turtle api changed to work with crafting table equiping/unequiping
  • changelog changed :)/>
  • label changed a bit - looks cleaner
  • x=5 got removed from lua program :D/>
Lord_Spelunky #86
Posted 09 March 2014 - 05:57 PM
Wouldn't it be awesome if you could hold the Pda like a map, not with the data on it because i would imagine that would be hard to do, but with just how it appears in your inventory. Also will the pocket computers have rednet?
Alice #87
Posted 10 March 2014 - 04:41 PM
Wouldn't it be awesome if you could hold the Pda like a map, not with the data on it because i would imagine that would be hard to do, but with just how it appears in your inventory. Also will the pocket computers have rednet?
They might be having rednet, I've seen talk of modems built-in. Rendering the PDA like a map in the inventory, I thought it was a static texture. If you mean equipping it in your hand, that would be epic.
oeed #88
Posted 10 March 2014 - 08:42 PM
Wouldn't it be awesome if you could hold the Pda like a map, not with the data on it because i would imagine that would be hard to do, but with just how it appears in your inventory. Also will the pocket computers have rednet?

Yea, that would be cool. The main issue is you couldn't interact with it like that.
Lupus590 #89
Posted 10 March 2014 - 09:46 PM
suggestion moved to suggestions forum

http://www.computercraft.info/forums2/index.php?/topic/17591-pocket-pc-cc16-currently-in-beta/
Edited on 20 March 2014 - 10:08 AM
mrgreaper #90
Posted 12 March 2014 - 07:27 PM
is there any chance of a 1.7.x build? waiting on cc 1.7.x api and thermal expansion api before i can finish updating my mod, seems 1.7 is not a loved update from many devs
Alice #91
Posted 12 March 2014 - 07:30 PM
is there any chance of a 1.7.x build? waiting on cc 1.7.x api and thermal expansion api before i can finish updating my mod, seems 1.7 is not a loved update from many devs
There's going to be one after 1.6 is stable.
mrgreaper #92
Posted 12 March 2014 - 07:41 PM
is there any chance of a 1.7.x build? waiting on cc 1.7.x api and thermal expansion api before i can finish updating my mod, seems 1.7 is not a loved update from many devs
There's going to be one after 1.6 is stable.
cool, just seems to be that most mods are waiting for other mods to update (mine included though my mod is a small mod of little import)
apemanzilla #93
Posted 13 March 2014 - 01:19 PM
1.6pr2 > 1.6pr3? :3
Alekso56 #94
Posted 13 March 2014 - 01:34 PM
1.6pr2 > 1.6pr3? :3
https://github.com/alekso56/ComputercraftLua/commit/c2810768cfebba3037ea1e8813cb8c033897e229

not much happened :P/>
apemanzilla #95
Posted 13 March 2014 - 01:46 PM
I see - TBH I would never use a nametag/anvil to name one since you can do it for free via shell :D/>

Unless it gives it an actual nameplate above the turtle/computer…. Then I might.
Alice #96
Posted 13 March 2014 - 02:58 PM
Unless it gives it an actual nameplate above the turtle/computer…. Then I might.
That would be cool.
InputUsername #97
Posted 14 March 2014 - 01:35 PM
So it's not really worth updating from pr2 to pr3?
Wojbie #98
Posted 14 March 2014 - 03:17 PM
So it's not really worth updating from pr2 to pr3?

No its worth it - that changelog is from lua side of things - thats just stuff that we as end users see - all cool things that dan200 does are in mod itself - and you realy should use latest version for bugtesting.
Edited on 14 March 2014 - 02:18 PM
Snablesnot #99
Posted 15 March 2014 - 07:49 PM
Wouldn't it be awesome if you could hold the Pda like a map, not with the data on it because i would imagine that would be hard to do, but with just how it appears in your inventory. Also will the pocket computers have rednet?

Yea, that would be cool. The main issue is you couldn't interact with it like that.

Well having it like a map to glance at what is rendering on the screen would be fantastic. to start interacting would just be like it is now with a cIik I would think. That would make the Pda Very nice. Highlight it in the tool bar to glance at it like its a map while your still walking or running for your life. and if need be click and your ready to do input.
People would be really having a pocket gps then. Could write your own programs to record waypoints and the works. Remote control turtle races woot!! or battle turtles hehe.
Wojbie #100
Posted 17 March 2014 - 10:31 AM
1.6pr4 is here!
look at the first post

1.6pr3 > 1.6pr4? :D/>

Time for more testing pepole!!!
Edited on 17 March 2014 - 09:32 AM
theoriginalbit #101
Posted 17 March 2014 - 01:16 PM
1.6pr3 > 1.6pr4? :D/>
here's one thing I know Twitter link

EDIT: NOTE: If you look up my repo, please do not take note of the latest commit — 3afb3aa — as it is not a pr3 —> pr4 diff, it is me updating my files up to what's present in pr4!)
Edited on 17 March 2014 - 12:25 PM
cgwheeler96 #102
Posted 17 March 2014 - 01:38 PM
What exactly do the new rednet protocols do? I don't usually use the rednet API, I just use the modem API mostly.
apemanzilla #103
Posted 17 March 2014 - 02:22 PM
1.6pr4 is here!
look at the first post

1.6pr3 > 1.6pr4? :D/>/>

Time for more testing pepole!!!
Hehe, wonder if *anything* changed in the Lua side this time :P/>
Wojbie #104
Posted 17 March 2014 - 03:37 PM
What exactly do the new rednet protocols do? I don't usually use the rednet API, I just use the modem API mostly.

From what i seen it my small test it adds ability to create rednet repeatres in order to increase range of message. Kinda nice to have a baseline you know most pepole on server will use so you can plan based on it ;D on last server i played we had 3 repeater sytems that didnt understand eachother ;D That was fun ( it was not )
theoriginalbit #105
Posted 17 March 2014 - 09:11 PM
Hehe, wonder if *anything* changed in the Lua side this time :P/>
here's one thing I know Twitter link

EDIT: NOTE: If you look up my repo, please do not take note of the latest commit — 3afb3aa — as it is not a pr3 —> pr4 diff, it is me updating my files up to what's present in pr4!)
:P/>
Nokiyen #106
Posted 18 March 2014 - 03:55 AM
Hello! Can I talk about CC's API? (which means the API source files for modding like adding original upgraded turtles)

In the 1.6 Beta, the structure of the API has broadly changed and I feel almost all of them are beautifully arranged and some added files and methods are also great for me (teleportTo() is wonderful!).

But, I guess some methods which existed in the former versions are missing or maybe deleted. Especially, ITurtleAccess.getSlotContents(). setSlotContents(), storeItemStack(), dropItemStack(), deployWithItemStack() were very useful but I can't find them in the API of pr4…

Of course, there is a method getInventory(). So, I can write substitute codes for getSlotContents, setSlotContents, storeItemStack and also I can use for example FakePlayer for writing a deployWithItemStack-like method.
But, dropItemStack is a bit problematic because turtle's dropping animation is seemingly unique…

Is there any plan to add these methods in the API? or are they deleted?

Anyway, thank Dan for your great upgrade!
Wojbie #107
Posted 19 March 2014 - 06:19 AM
1.6pr5 is here!
look at the first post

yes 1.6pr5 - as in another one!!!

1.6pr3 > 1.6pr5? :D/>

Time for more testing pepole!!!
This is a final streach for this one!!!
Apparently all bugs from bug thread got fixed! Go out there and find more!! For the… ok we realy need to find good thing to swear by. But anyways test, test and test some more!
Edited on 19 March 2014 - 05:20 AM
MudkipTheEpic #108
Posted 19 March 2014 - 02:29 PM
1.6pr5 is here!
look at the first post

yes 1.6pr5 - as in another one!!!

1.6pr3 > 1.6pr5? :D/>/>

Time for more testing pepole!!!
This is a final streach for this one!!!
Apparently all bugs from bug thread got fixed! Go out there and find more!! For the… ok we realy need to find good thing to swear by. But anyways test, test and test some more!

For the turtles!

Anyway, I love how dan has started implementing Lua enhancements and other things from user feedback. Feels like the community is a lot more connected to the mod now.
Simon #109
Posted 19 March 2014 - 03:15 PM
How do we use rednet on a personal computer? The API is there, but I can't tell it a side for the modem to be on.
apemanzilla #110
Posted 19 March 2014 - 03:48 PM
How do we use rednet on a personal computer? The API is there, but I can't tell it a side for the modem to be on.

You don't.
Simon #111
Posted 19 March 2014 - 04:30 PM
How do we use rednet on a personal computer? The API is there, but I can't tell it a side for the modem to be on.

You don't.
Then why is the API enabled?
Lyqyd #112
Posted 19 March 2014 - 04:33 PM
There are supposed to be modems on them by the time 1.6 final comes out. You can use peripheral.find("modem") to verify that no modem peripheral is available.
Simon #113
Posted 19 March 2014 - 04:36 PM

Thanks for clearing this up.
Alekso56 #114
Posted 19 March 2014 - 04:54 PM
1.6pr3 > 1.6pr4: https://github.com/a...aa92e00f08c82d0

1.6pr4 > 1.6pr5: https://github.com/a...1701d91e14f1e98

the forum didn't notify of changes because my settings were wrong, but it's okay now.
also: i derpd with links once.
Edited on 19 March 2014 - 04:06 PM
apemanzilla #115
Posted 19 March 2014 - 05:38 PM
1.6pr3 > 1.6pr4: https://github.com/a...aa92e00f08c82d0

1.6pr4 > 1.6pr5: https://github.com/a...1701d91e14f1e98

the forum didn't notify of changes because my settings were wrong, but it's okay now.
also: i derpd with links once.

Looks like a couple treasure disk programs bit the dust D:
GopherAtl #116
Posted 19 March 2014 - 06:13 PM
talk is redundant with the built-in chat, so not worth the trouble to fix it to work with the changes to term.

I was planning on updating battleship today, since dan200 said pr6 is getting close to the finish line, but it appears he did it for me? I will still take some time today to thoroughly test it, make sure everything's working properly.

:edit: aand done. There were several bugs in there that I don't think are even related to this update? not sure how they went unnoticed, one was a basic line wrapping error that was covering part of the player's grid with the word "cursor"…
Edited on 19 March 2014 - 05:38 PM
Wojbie #117
Posted 19 March 2014 - 07:16 PM
Let my ego stroking begin.. i mean fast list of interesting changes ;D.
  • term fixes changes in treasure discs.
  • And a lot of tabulators removed from bios/paintutilis ;D (i think i didn't miss any changes there)

1.6pr4 > 1.6pr5: https://github.com/a...1701d91e14f1e98

the forum didn't notify of changes because my settings were wrong, but it's okay now.
also: i derpd with links once.
  • read() now handles for "term_resize" correctly for internal needs
  • equip now return errors (by the looks of it)
  • some help text added :D/>
  • /autorun/.ignoreme don't like you.
  • multishell handles "term_resize" nicely and correctly passes it to all processes (so they can deal with it too).
  • paint error foxed
  • edit handles "term_resize" too :P/>
  • monitor does its magic and causes "monitor_resize" to became "term_resize"
  • chat got avesomer and handles "term_resize"
  • mail and mailgui got axed
  • equip and unequip added

What are you doing still reading this text? you should be out there testing!

FOR THE TURTLES!! tx MudkipTheEpic
Lyqyd #118
Posted 19 March 2014 - 08:00 PM
I've submitted a new nsh treasure disk resource pack that updates it to be 1.6 compatible (tested last on 1.6pr0, but I haven't noticed significant Lua changes that would affect it since), so I hope that it can be included prior to the 1.6 full release. It is posted over in the submission sticky post in Programs.
Sxw #119
Posted 19 March 2014 - 11:40 PM
Why is mail gone? I wouldn't use it anyway, insecure.
dan200 #120
Posted 20 March 2014 - 12:02 AM
Mail got shelved for time. It'll probably pop up again in a future release, but for now it was something unfinished I could safely postpone to get the release out quicker.
Wojbie #121
Posted 20 March 2014 - 06:01 PM
New update of beta is here.

1.6pr6 is here!
look at the first post

Its Stabler its better and apparently it talks like Yoda less
And it needs our love to make sure it keeps talking correctly.

FOR THE TURTLES!! tx MudkipTheEpic

1.6pr5 > 1.6pr6? :D/>
apemanzilla #122
Posted 20 March 2014 - 06:23 PM
Can't wait for release :3
Alekso56 #123
Posted 20 March 2014 - 06:44 PM
1.6pr5 > 1.6pr6? :D/>

https://github.com/alekso56/ComputercraftLua/commit/2daba1553382b51d77d177faa191285bfa471bb1
Redstoner #124
Posted 21 March 2014 - 01:12 AM
In the tweet -https://twitter.com/DanTwoHundred/status/445927216455499776/photo/1 That turtle clearly looks green. Is this a special turtle, texture pack, or a dyed turtle? Cause turtles of different colors that could be dyed would be great.
GopherAtl #125
Posted 21 March 2014 - 03:38 AM
pretty sure the green turtles are "basic turtles," or something like that, which are from from CCEdu, and are not presently planned to be part of the standard, public release of CC.

video of CCEdu on youtube… https://www.youtube.com/watch?v=UHzYrsCssDk
Wojbie #126
Posted 21 March 2014 - 06:51 PM
All aboard the hype train - as of 8 min ago new update arrived at first post station
Its rumored to include:
  • Pocket Computers in disk drives operations
  • Tetris
  • modems and modems lights
  • Tetris
  • A lot of avesomnes
  • Tetris
1.6pr6 > 1.6pr7? B)/>

What are you doing reading this? You should be playing tetris….. I mean testing new betawho i am kidding go play some tetris… then find some bugs!!!!

FOR THE TURTLES!! tx MudkipTheEpic
Alekso56 #127
Posted 21 March 2014 - 08:13 PM
1.6pr6 > 1.6pr7? B)/>
https://github.com/alekso56/ComputercraftLua/commit/e25f2e051a22c93be0566d83910a8396d93ae91b
Wojbie #128
Posted 21 March 2014 - 08:49 PM
Tx ;p

Well while looking at that stuff i see some small upgrades and modifications:
  • rednet.close() with no parameters closes all modems
  • some rounding change in gps
  • bios and shell stuff for pocket computers
  • toolSide argument in mining functions (cause dual-wield :D/>)
  • and all rest is bugfixes in side programs and treasure ones i am not gonna read :P/>

But i am exited for future!!
According to this tweet we may see pocket.vibrate() and pocket.ring() functions in future :D/>
One would vibrate item icon and other make it ding.

Now that i think about it, it would be funny for it to be "emitted" from player so other players around him can hear that his Pocket Computer is calling :)/> That would mean you need to "mute" it for covert operations!! :ph34r:/>
Edited on 21 March 2014 - 07:49 PM
Shnupbups #129
Posted 21 March 2014 - 09:51 PM
According to this tweet we may see pocket.vibrate() and pocket.ring() functions in future :D/>
One would vibrate item icon and other make it ding.

Now that i think about it, it would be funny for it to be "emitted" from player so other players around him can hear that his Pocket Computer is calling :)/> That would mean you need to "mute" it for covert operations!! :ph34r:/>

pocket.ring() and vibrate() would be really cool! I expect most programs would use them as kind of push notifications (like on iOS).
Bomb Bloke #130
Posted 21 March 2014 - 11:46 PM
I'm not sure I'll have time to check into it myself, but has this been looked into for the 1.6 release? I'd like to see it at least reported in the bug thread - if it's still buggy.
oeed #131
Posted 22 March 2014 - 10:58 PM
If anyone's interested, using the wireless modem that's now in the pocket computers I've made a really quick and easy to use door lock program. It allows you to automatically open the doors when your within a set distance, no password or disks!

http://www.computercraft.info/forums2/index.php?/topic/17614-ultimate-door-lock-pda-opened-doors/
awsmazinggenius #132
Posted 23 March 2014 - 02:50 AM
I thought that "security is useless in CC" :P/>
oeed #133
Posted 23 March 2014 - 03:18 AM
I thought that "security is useless in CC" :P/>

Oh I know, it's not that secure. I've taken some precautions, but all CC door locks have weaknesses. The computer needs to be hidden for this one to work effectively and block protection obviously. The other thing you could do is attach it to a tesla coil (or what ever it's called in IC2, haven't played it in ages) so it isn't active when you're in range.
cgwheeler96 #134
Posted 23 March 2014 - 05:42 AM
Has anyone else had the problem where when your program gets too long, certain tables don't load on the first run of a program? I've built a program that's around 200 lines long and for some reason when I load the world and run the program, it tells me that data from my table is nil, and then when I run it again its fine. Is there a known work around for this or am I just writing my code badly?
theoriginalbit #135
Posted 23 March 2014 - 05:48 AM
Has anyone else had the problem where when your program gets too long, certain tables don't load on the first run of a program? I've built a program that's around 200 lines long and for some reason when I load the world and run the program, it tells me that data from my table is nil, and then when I run it again its fine. Is there a known work around for this or am I just writing my code badly?
chances are its the latter. I've had programs thousands of lines long that don't have a problem. Post up your code in Ask a Pro, with this description of your problem, and we'll give you a hand.
mr_taito #136
Posted 23 March 2014 - 04:57 PM
I have a question. dan200 said, that project red have connections to the computers (bundled cable) but i want to know is it only by the release 1.6 or come it in the beta?
Lyqyd #137
Posted 23 March 2014 - 06:55 PM
Oh, where did you see that? It's worth testing if it's supposed to be in the betas!
TyDoesMC #138
Posted 23 March 2014 - 10:01 PM
looks cool :D/>
someone #139
Posted 24 March 2014 - 01:54 AM
Small changes i noticed:
I'm not sure I'll have time to check into it myself, but has this been looked into for the 1.6 release? I'd like to see it at least reported in the bug thread - if it's still buggy.
@Bomb Bloke:
about the "monitor_touch" position problem:
I don't see the problem like they do in the Thred you posted but in 1.57 I had the problem, if I click on the left half of a char if would give me the coordinates of the char left to it.
In 1.6pr7 it works correct for me.

Also the maximum monitor size seems to change from 6x6 to 8x8
EDIT: I was wrong about the monitor size… it was 6x8 and still is… just some derping on my side
Edited on 24 March 2014 - 04:09 PM
awsmazinggenius #140
Posted 24 March 2014 - 06:25 AM
Where did 6x6 come from? It was 8 wide by 6 tall in CC 1.58. Can you now make them 8 by 8 (away from computer), or did you accidentally make a typo?
someone #141
Posted 24 March 2014 - 05:05 PM
@awsmazinggenius:
Seems like the monitors just didn't want to connect in my Multiplayer World when i tested it last time… and yes in 1.57 it's already 6x8 (height x width)
And i checked it in 1.6pr7 and it's also just 6x8.
I was probably too tired to notice that my monitor wasn't quadratic and since it was in my 1.57 multiplayer world (since it didn't want to connect more then 6x6) i was just thinking that it still would be quadratic..

I'm sorry for this false information…
Edited on 24 March 2014 - 05:21 PM
Wojbie #142
Posted 24 March 2014 - 09:00 PM
I just realized something - wired modem is a peripheral added to Pocket Computer right?
Would it be possible for other mods to add other peripherals that can be added to it?
Like i don't know - card scanner for portable bank station or stuff?
oeed #143
Posted 24 March 2014 - 09:26 PM
I just realized something - wired modem is a peripheral added to Pocket Computer right?
Would it be possible for other mods to add other peripherals that can be added to it?
Like i don't know - card scanner for portable bank station or stuff?

I'd presume so. Although, if Dan adds shift-right clicking to insert them in to drives you could do that pretty easily with vanilla CC.
awsmazinggenius #144
Posted 25 March 2014 - 03:24 AM
@awsmazinggenius:
Seems like the monitors just didn't want to connect in my Multiplayer World when i tested it last time… and yes in 1.57 it's already 6x8 (height x width)
And i checked it in 1.6pr7 and it's also just 6x8.
I was probably too tired to notice that my monitor wasn't quadratic and since it was in my 1.57 multiplayer world (since it didn't want to connect more then 6x6) i was just thinking that it still would be quadratic..

I'm sorry for this false information…
No worries :D/>

I just realized something - wired modem is a peripheral added to Pocket Computer right?
Would it be possible for other mods to add other peripherals that can be added to it?
Like i don't know - card scanner for portable bank station or stuff?
I would think it would be the same sort of idea (obviously not identical in code, but you get the point) as adding peripherals to Turtles, so yes - hopefully.
Wojbie #145
Posted 25 March 2014 - 07:01 PM
I would think it would be the same sort of idea (obviously not identical in code, but you get the point) as adding peripherals to Turtles, so yes - hopefully.

I can already imagine all wierd peripherals people will make in mods for Pocket Computers.

Like build in disk drive for playing battleships on the go (or other treasure games)
Or connector for OpenPeripherals Glasses
Or OpenP PIM for automated inventory manager
Or Iron Noteblock for some Sounds to go with stuff
Or build in Scanner for idk cheating in pvp?

wait… that reminds me of something
Large Image

And a Tetris is build in!!
Edited on 25 March 2014 - 06:05 PM
theoriginalbit #146
Posted 26 March 2014 - 12:03 AM
Or connector for OpenPeripherals Glasses
Or OpenP PIM for automated inventory manager
Or Iron Noteblock for some Sounds to go with stuff
these won't work, the pocket computer is in your hand, how does one wrap these peripherals to it?!

also only a wireless modem can be added to the pocket computer, so this wouldn't work anyway.
apemanzilla #147
Posted 26 March 2014 - 12:12 AM
This reminds me of a suggestion long ago about HUD writing helmets. Maybe they could interact with OpenP terminal glasses via peripheral.wrap("top") or peripheral.wrap("head")? The same could apply to various other peripherals in certain inventory slots.
AmandaC #148
Posted 26 March 2014 - 12:44 AM
I've just spent a couple of hours hacking on the rednet chat program introduced in the beta. I've added a couple of featured, and fixed a bug
(Admittaddly, by a very very hacky method of bug fixing. )

The features it adds are:
  • Adds /nick and /me commands ( and commands in general )
  • Adds /topic command and ability for server to see and change topic.
  • Fixes line-wrapping missing-ness ( This is done with a massive hack, though. )

You're free to use this however you want. A very large portion of the code is the same, I've just bolted on more stuff where I saw fit.

Code is available Here

Obglitory Screenie
Wojbie #149
Posted 26 March 2014 - 06:16 AM
Or connector for OpenPeripherals Glasses
Or OpenP PIM for automated inventory manager
Or Iron Noteblock for some Sounds to go with stuff
these won't work, the pocket computer is in your hand, how does one wrap these peripherals to it?!

also only a wireless modem can be added to the pocket computer, so this wouldn't work anyway.
This reminds me of a suggestion long ago about HUD writing helmets. Maybe they could interact with OpenP terminal glasses via peripheral.wrap("top") or peripheral.wrap("head")? The same could apply to various other peripherals in certain inventory slots.

Well i was thinking more along the lines of standard peripherals - mod can add its own to the game.
I went for a tangent wondering if Pocke tComputers will be able (like turtles) to use mod provided peripherals or will be locked to only accept wireless modem and thats it. Sorry if i didn't explain it better - in my head it was so clear and simple.

EDIT: I just asked dan200 on irc about this. He said that ability to add additional peripherals for Pocket Computers by mods will be added. Probably not in 1.6 but in future. I for one am exited by that


these won't work, the pocket computer is in your hand, how does one wrap these peripherals to it?!
Like this!
Large Image
Edited on 26 March 2014 - 04:24 PM
Bomb Bloke #150
Posted 27 March 2014 - 12:27 AM
Quick, silly question because I haven't spotted an all-in-one-place "new feature" list - Is there a "mouse_release" event coming?
theoriginalbit #151
Posted 27 March 2014 - 12:29 AM
Quick, silly question because I haven't spotted an all-in-one-place "new feature" list - Is there a "mouse_release" event coming?
ummm changelog
Bomb Bloke #152
Posted 27 March 2014 - 02:27 AM
Guess not. Thanks!
theoriginalbit #153
Posted 27 March 2014 - 02:53 AM
pr7 —> pr8

summary:
- some indenting changes
- argument validation in peripheral api
- better logic in Rednet hosts
- textutils.serialize bugfix
- help file updates
- stop gps host program from running on pocket computers
- chat program bugfix
- new turtle refuel logic
- removed `nsh` from treasure disks (accidental?)
Edited on 29 March 2014 - 09:17 AM
Wojbie #154
Posted 27 March 2014 - 06:38 AM
Also i notice that peripheral.find gets 2 (optional) argument. It appears to be a function that is given sName and wrapped table and is expected to return nil or false if they are not what you need. Basically a filter function. :)/> Looks like it will be useful for large wired networks.
theoriginalbit #155
Posted 27 March 2014 - 06:52 AM
its had the filter function from the start. its just been added to the help file finally. :)/>
the filter is mainly useful for things like monitors and modems. for example lets say you only want an advanced monitor, you cannot tell that by the peripheral name but using this function as the callback/filter function(n,p) return p.isColor and p.isColor() end you'd know that it is advanced.
funnily enough its fairly similar to this code snippet I made back in November last year, I do have extra logic to error when the peripheral could not be found, and an extra argument for the message, otherwise its identical.
Wojbie #156
Posted 27 March 2014 - 08:23 PM
1.6pr8 > 1.6 relase? B)/>

While it sounds pointless it would be nice to see if any "tiny" stuff happened. So we (me) don't get caught off guard :D/>
oeed #157
Posted 27 March 2014 - 08:56 PM
No pocket.vibrate/beep :(/>
Maybe in 1.61
Edited on 27 March 2014 - 07:56 PM
Alekso56 #158
Posted 27 March 2014 - 09:17 PM
1.6pr8 > 1.6 relase? B)/>

1.6pr7 > 1.6pr8 ——> 1.6 release
Dog #159
Posted 27 March 2014 - 11:36 PM
I'm having problems wrapping some peripherals in 1.6. More specifically, CC peripherals wrap just fine, but gates from SGCraft and LanteaCraft aren't even detected (the sides show as nil). I realize a lot has changed in CC so I may be missing something. Any suggestions?
theoriginalbit #160
Posted 27 March 2014 - 11:45 PM
I'm having problems wrapping some peripherals in 1.6. More specifically, CC peripherals wrap just fine, but gates from SGCraft and LanteaCraft aren't even detected (the sides show as nil). I realize a lot has changed in CC so I may be missing something. Any suggestions?
you don't have OpenPeripheral installed! ComputerCraft adds a total of 1 non-computercraft item as a peripheral, the command block. you're clearly not running versions of either mod that make them peripherals too, since if you did have those versions Minecraft would crash! Dan has changed the API and only just done a full release, it will take a while for some mods to update, so be patient!
Dog #161
Posted 28 March 2014 - 12:55 AM
you don't have OpenPeripheral installed! ComputerCraft adds a total of 1 non-computercraft item as a peripheral, the command block. you're clearly not running versions of either mod that make them peripherals too, since if you did have those versions Minecraft would crash! Dan has changed the API and only just done a full release, it will take a while for some mods to update, so be patient!
Patience I can do. Forgetting that I needed OpenPeripheral…facepalm. Thanks, Bit :)/>
Edited on 27 March 2014 - 11:56 PM
ComputerCraftDOS #162
Posted 28 March 2014 - 12:19 PM
sir Dan your mod is so cool.Is computercraft 1.6 will come to 1.7.2 because there's already forge 1.7.2 :D/>
theoriginalbit #163
Posted 28 March 2014 - 01:40 PM
it will happen when it happens. He's only just released 1.6
hevo2 #164
Posted 29 March 2014 - 01:30 PM
Very nice job, dan.
But, there is something I am a little curious about.

In ComputerCraft1.6,
player can't open a chest under a turtle. And torches can be placed on a turtle.
Is a turtle an opaque block in CC1.6?

In CC1.58, player can open a chest under a turtle.
Is this bug or intended behaviour?

Image:
http://i.imgur.com/o71ursc.jpg


Fixed in CC1.62
Edited on 10 April 2014 - 02:14 AM
Shnupbups #165
Posted 06 April 2014 - 11:34 AM
1.62 –> 1.63 changelog?
sci4me #166
Posted 06 April 2014 - 11:53 AM
1.62 –> 1.63 changelog?

He fixed a bug in ComputerCraftAPI.registerTurtleUpgrade

Check his twitter for the deets :P/>
Foone #167
Posted 06 April 2014 - 06:39 PM
Thanks muchly for the turtle fixes! I can confirm that it fixes the issues OpenPeripherals was having, we can make Sensor/Narcissistic turtles again.
Foone #168
Posted 06 April 2014 - 06:47 PM
EDIT: Posted in wrong thread, this is really a bug report.
Edited on 06 April 2014 - 05:00 PM
Razorskills #169
Posted 08 April 2014 - 11:06 PM
Is it possible to make the turtle take damage to its pickaxe/tool? With the feature to unequip/equip tools easily, I think it would be a nice config option to enable damaging tools.

On another note, Some mods add blocks that cannot be mined by a diamond pickaxe such as mettalurgy/tinkersconstruct. Some players were saying you can use a turtle to mine endgame ores early with a turtle. I haven't tested this for sure, but I will do doing that in the next little bit. Im not really sure what a good solution to that would be if there is an easy one..
Edited on 08 April 2014 - 09:06 PM
theoriginalbit #170
Posted 10 April 2014 - 05:23 AM
This has also been posted in a separate thread under "Bugs".
don't double post. it may slightly increase visibility, but it will also annoy everyone.
Sharidan #171
Posted 10 April 2014 - 05:40 AM
It takes 10 rocket science degrees to post anything on this forum, but luckily you are always guaranteed an attack in return ;)/>
I -very- rarely ever double post anywhere on the net. You can check my history here on this forum. I left this forum 6+ months ago, because I was tired of the constant attacks when posting. I was forced back here because of this bug/problem. Boy do I regret signing in and posting it.
Cranium #172
Posted 10 April 2014 - 05:50 AM
It takes 10 rocket science degrees to post anything on this forum, but luckily you are always guaranteed an attack in return ;)/>
I -very- rarely ever double post anywhere on the net. You can check my history here on this forum. I left this forum 6+ months ago, because I was tired of the constant attacks when posting. I was forced back here because of this bug/problem. Boy do I regret signing in and posting it.
Nobody is attacking you. This is a discussion topic, not for bug reports. I have moved your report to the appropriate section, where it will get more exposure, and gets fixed faster.
Dog #173
Posted 11 April 2014 - 06:14 AM
I've noticed in 1.63pr1 that Advanced Turtles and Standard turtles report the amount of fuel 'units' they receive from coal differently. A standard turtle reports 5 coal as 2 units of fuel, but an advanced turtle reports 5 coal as 0.4 units of fuel. Essentially it appears that advanced turtles get less fuel/coal than standard turtles, even though advanced turtles can carry significantly more fuel. Considering the higher fuel limit of the advanced turtle, the fuel units/coal ratio should be the same, no? Does anyone know if this is intended behavior?

Don't know what I was doing wrong, but it seems to be reporting the same across standard and advanced turtles after restarting (5 coal = 400 units).
Edited on 11 April 2014 - 08:07 AM
CaptRanger #174
Posted 11 April 2014 - 04:53 PM
is there anything I can try or do to help with testing and fixing the bug with the turtle location issue. More info? anyd and pr2 pr3 I will test.
Bomb Bloke #175
Posted 12 April 2014 - 12:29 AM
Yes, as requested, please provide the source code of the script(s) you're having trouble with.
CaptRanger #176
Posted 12 April 2014 - 04:56 AM
Yes, as requested, please provide the source code of the script(s) you're having trouble with.

as requested..
Dog #177
Posted 12 April 2014 - 05:44 AM
CaptRanger's code (goto.txt) for reference:
Spoiler

turtle.up()
turtle.up()
rednet.open("right") --Open rednet and clear the console
term.clear()
term.setCursorPos(1,1)
local tArgs = { ... } --Get the coordinates from alongside the program launch (goto x y z)
local gox = tonumber(tArgs[1])
local goy = tonumber(tArgs[2])
local goz = tonumber(tArgs[3])
turtle.up()
turtle.up()
turtle.up()
turtle.up()
turtle.up()
turtle.up()
if #tArgs ~= 3 then --Make sure there are 3 coordinates entered else the program will return an error
print("Usage: goto <x> <y> <z>")
end
local digBlocks = false --Extra parameters: whether to dig blocks or attempt to go over
local goneUp = 0 --dir and goneUp are used to keep track of position
local dir = 0
function forward()
while not turtle.forward() do --If turtle cannot go forward (either out of fuel or block blocking)
print("Can't move, checking fuel")
turtle.up()   
turtle.up()   

  if turtle.getFuelLevel() == 0 then
turtle.up()   
turtle.select(1)
   turtle.refuel(1)
turtle.up()
  end
  if digBlocks then --If digBlocks var was true the turtle will dig thorugh the blockage otherwise will go over
   turtle.dig()
turtle.up()
turtle.up()
turtle.up()
turtle.up()

  else
   turtle.up()
   goneUp = goneUp + 1
  end
end
while goneUp > 0 and not turtle.detectDown() do --Make sure to compensate for going up and over blocks by going down when next possible
  turtle.down()
  goneUp = goneUp - 1
end
end
function up() --Same as forward, for up
while not turtle.up() do
turtle.up()   
turtle.up()   
turtle.up()   
turtle.up()   
rint("Can't move, checking fuel")

  if turtle.getFuelLevel() == 0 then
   turtle.up()
   turtle.select(1)
   turtle.refuel(1)
  end
  if digBlocks then
   turtle.digUp()
  end
end
end
function down() --Same as forward, for down
while not turtle.down() do
print("Can't move, checking fuel")
  if turtle.getFuelLevel() == 0 then
 turtle.up()  
turtle.select(1)
   turtle.up()
   turtle.refuel(1)
  end
  if digBlocks then
   turtle.digDown()
  end
end
end
function getPos() --Gets the position of the turtle from local GPS towers
print("Getting position")
cx, cy, cz = gps.locate(10)
print(cx, cy, cz)

end
function getDir() --Gets the heading of the turtle by taking position, moving forward 1 and comparing the 2 positions
print("Getting direction")
getPos()
ox, oy, oz = cx, cy, cz
forward()
getPos()
if oz > cz then dir = 0
elseif oz < cz then dir = 2
elseif ox < cx then dir = 1
elseif ox > cx then dir = 3 end
print(dir)
turtle.back()
getPos()
end
function turn(d) --Turns to heading "d", uses getDir() to calculate how many turns are needed
getDir()
print("Aligning")
print(dir, d)
while dir ~= d do
  turtle.turnRight()
  dir = dir + 1
  if dir == 4 then dir = 0 end
end
end
function moveX() --Combine the past functions to move along the x axis
print("Moving X")
getPos()
if gox > cx then --The current and destination coordinates are compared to decide which heading is needed and distance to move
  turn(1)
  for x = 1, gox - cx do
   forward()
   cx = cx + 1
  end
elseif gox < cx then
  turn(3)
  for x = 1, cx - gox do
   forward()
   cx = cx - 1
  end
end
end
function moveZ() --The same as moveX() but for the Z axis
print("Moving Z")
getPos()
if goz > cz then
  turn(2)
  for z = 1, goz - cz do
   forward()
   cz = cz + 1
  end
elseif goz < cz then
  turn(0)
  for z = 1, cz - goz do
   forward()
   cz = cz - 1
  end
end
end
function moveY() --The same as moveX() but for the Y axis, as the movement is vertical no turn calcuations are needed so this function is shorter
print("Moving Y")
getPos()
if goy > cy then
  for z = 1, goy - cy do
   up()
   cy = cy + 1
  end
elseif goy < cy then
  for z = 1, cy - goy do
   down()
   cy = cy - 1
  end
end
end
getPos()
if goy > cy then --If the turtle has to move upwards to get to the destination if moves up first, if it needs to move down if moves down last
moveY()
moveX()
moveZ()
else
moveX()
moveZ()
moveY()
  end
Bomb Bloke #178
Posted 12 April 2014 - 08:31 AM
Ok, I reckon I can see a few bugs in that code which may lead turtles astray whether the gps.locate() function is working correctly or not. If you'd like to create a topic in Ask A Pro about it, I'll expand on them there.
ROBdk97 #179
Posted 14 April 2014 - 03:44 PM
When comes the Computercraft Version for 1.7.2 out?
Cranium #180
Posted 15 April 2014 - 03:03 PM
Considering Dan just rewrote the mod for 1.6x, it might be a little while. Let him get the bugs out of 1.63 first. ;)/>
dan200 #181
Posted 15 April 2014 - 03:40 PM
Hey all,
New build in the OP. Fixes some fairly aggrivating bugs.
I'd like to collect more feedback on this, plus the new turtle dyeing capabilities.
Bomb Bloke #182
Posted 15 April 2014 - 03:55 PM
I must confess I spent a minute or two trying to get turtles to use dye on pre-placed wool blocks before I worked it out.
theoriginalbit #183
Posted 15 April 2014 - 04:13 PM
I must confess I spent a minute or two trying to get turtles to use dye on pre-placed wool blocks before I worked it out.
It was spoilt for me by this.
dan200 #184
Posted 16 April 2014 - 12:34 AM
New version in the OP, featuring more fixes and a new app. Check "help changelog" for the deets.
Shnupbups #185
Posted 16 April 2014 - 12:54 AM
Can someone please post the help changelog? I haven't got time to test the mod right now.

Wait, just saw on Dan's twitter that the new app is CCRedirection. Sweet!
Edited on 15 April 2014 - 10:59 PM
tannertoby #186
Posted 16 April 2014 - 02:29 AM
dan200 have you had problems playing 2 player or more it keeps crashing.
thx if you can help
Cranium #187
Posted 16 April 2014 - 03:44 AM
There's no problems with Multiplayer from what I can see. Might just be you.
Bomb Bloke #188
Posted 16 April 2014 - 08:42 AM
Mind you, I'm not sure many people will be testing it with SMP until it hits the main mod packs…

Crash logs and server/client config details would go a long way towards diagnosing the issue.
CaptRanger #189
Posted 16 April 2014 - 09:17 PM
dan200 have you had problems playing 2 player or more it keeps crashing.
thx if you can help

Yes I have a bug in with 1+ crash report. But it sound like some are getting by this some how.
I have tried new world with just CC. And no luck.
CaptRanger #190
Posted 17 April 2014 - 04:08 AM
here is some console msgs.

16.04 20:04:39 [Server] INFO java.lang.ArrayIndexOutOfBoundsException: -1
16.04 20:04:39 [Server] SEVERE Encountered an unexpected exception ArrayIndexOutOfBoundsException
16.04 20:04:39 [Server] SEVERE at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
16.04 20:04:39 [Server] SEVERE at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:663)
16.04 20:04:39 [Server] SEVERE at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:781)
16.04 20:04:39 [Server] SEVERE at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:330)
16.04 20:04:39 [Server] SEVERE at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:918)

16.04 20:04:39 [Server] SEVERE at net.minecraft.server.management.ServerConfigurationManager.func_72374_b(ServerConfigurationManager.java:1125)
16.04 20:04:39 [Server] SEVERE at java.util.ArrayList.get(Unknown Source)
16.04 20:04:39 [Server] SEVERE at java.util.ArrayList.elementData(Unknown Source)
16.04 20:04:39 [Server] SEVERE java.lang.ArrayIndexOutOfBoundsException: -1
16.04 20:04:39 [Server] INFO Sending serverside check to: CaptRanger
16.04 20:04:39 [Server] INFO Loading Player: CaptRanger
16.04 20:04:39 [Multicraft] captranger ran command Message of the Day
16.04 20:04:39 [Connect] User CaptRanger, IP 67.199.189.91

16.04 20:04:24 [Server] INFO Sending serverside check to: LittleRed_24
16.04 20:04:24 [Server] INFO Loading Player: LittleRed_24
16.04 20:04:23 [Multicraft] LittleRed_24 ran command Message of the Day
16.04 20:04:23 [Connect] User LittleRed_24, IP 67.199.189.91
Cranium #191
Posted 17 April 2014 - 07:59 AM
I don't see any of that relating to ComputerCraft code…
dan200 #192
Posted 17 April 2014 - 08:42 PM
Hey all,
Now that 1.63 is out and i'm pretty sure it's free of bugs, I've started work on porting to Minecraft 1.7.2! The first working build is in the OP, let me know what I've broken :)/>
masterdisasterHD #193
Posted 17 April 2014 - 08:52 PM
Moved to bug reports!
Edited on 17 April 2014 - 07:00 PM
dan200 #194
Posted 17 April 2014 - 08:56 PM
Then report it in the bug report thread, silly!
Dog #195
Posted 17 April 2014 - 09:04 PM
I'm still having a problem in 1.63 with turtles getting 'stuck' selecting an inventory slot on game start in CSP.


print("Selecting slots")
for i = 1,16 do
  turtle.select(i)
end
print("Done")

Random turtles seem to get stuck the first time they try to select a slot - restarting the program or turtle usually resolves the problem. I've already got a bug report in the bug thread for this. Would anyone be willing to see if they can also duplicate this behavior - I'm starting to wonder if it's just something wrong on my end.
Edited on 17 April 2014 - 07:05 PM
Bomb Bloke #196
Posted 18 April 2014 - 12:54 AM
I tried half a dozen without seeing it happen.

How often are you seeing this occur?

What exactly happens when the turtle gets "stuck" - does the script still finish, or does it need to be manually terminated?

Does the type of turtle matter?
Dog #197
Posted 18 April 2014 - 01:03 AM
I'm seeing it in CSP with standard or advanced turtles. The script just stops at 'turtle.select(i)' and must be terminated. It's completely random - usually it only happens to 1 or 2 out of 4 turtles, but it can happen to all of them on occasion. If you haven't seen it by now then I'm going to guess there is something wrong with my test world - it's not that old, but it's been through a couple cc1.6 versions now - probably time to generate a new test world.
Bomb Bloke #198
Posted 18 April 2014 - 01:07 AM
Definitely worth trying it in a new world.
Dog #199
Posted 18 April 2014 - 01:28 AM
Tried a new world with slightly different results. When first starting the game and loading the world there seems to be about a 25%+ chance that one or more turtles (standard or advanced) will get stuck on turtle.select(i). Once MC is running, just quitting and reloading the world seems to have less than a 1 in 10 chance of the problem occurring. So my old world was probably exacerbating the issue, but there does *seem* to be something going on.
Bomb Bloke #200
Posted 18 April 2014 - 01:44 AM
Reckon those results have got anything to do with chunk generation going on? Maybe try playing a video in the background or something, see if that makes it worse.
Dog #201
Posted 18 April 2014 - 02:08 AM
I'm stumped. Tried it with a 1080p video streaming fullscreen on my second monitor and no video - same results. It seems totally random how many turtles it hits and which ones. I can't discern any kind of pattern to it. It's definitely most pronounced on startup and very difficult to reproduce just loading the world repeatedly (at least on this new world).

fwiw, my system specs aren't too shabby:

i5 / 16GB / GTX670-2GB / loading MC off Seagate Hybrid drive

I'll try copying a video to my drive and running it locally so it hits the drive at the same time as MC and post back.
Edited on 18 April 2014 - 12:10 AM
Lyqyd #202
Posted 18 April 2014 - 02:27 AM
Is this the first code in the startup file on these turtles? If so, does putting a sleep(1) or a sleep(0) before it affect the behavior?
Dog #203
Posted 18 April 2014 - 02:44 AM
In the code I'm using, there is a random 1-3 second sleep before the select code. I've been considering removing the sleeps to see if has any effect. Unfortunately I'm currently being distracted by my non-blocky life atm and will have to come back to this later tonight or tomorrow.

EDIT: Sorry for breaking the forums, everyone. Note to self - no more backslashes…
Edited on 20 April 2014 - 07:51 AM
Shnupbups #204
Posted 20 April 2014 - 05:47 AM
//offtopic For some reason I can't access the 11th page of this topic.
Bomb Bloke #205
Posted 20 April 2014 - 06:20 AM
Previously you could do so by entering the thread then navigating to the last page from there (as opposed to attempting to jump to it directly from the thread list), but it seems it's outright inaccessible now.

Best I can make out it doesn't like this post from Dog.
Techokami #206
Posted 20 April 2014 - 06:35 PM
It seems like my post in the bug reports thread didn't get approved, so here's some clarifications to some bugs people have been running into:
VERSION:
1.64pre1

DESCRIPTION:
Monitors render bug when placed larger then 2x2.
Dan edit: all textures are flipped from some directions, seemingly

EXPECTED RESULT:
monitors to render properly

REPRODUCTION STEPS:
place advanced monitors with a size of 2x2 or larger

SCREENSHOT/VIDEO:
This is due to a bug in Minecraft 1.7.2 that renders things backwards when they face a certain direction. It's fixed in later versions of Minecraft, but Forge isn't updating to them. So the best case here is to be aware of what direction a side is being rendered in, and flip it in the code.

As promised, here my bug reports :)/>

Version: 1.6.4 pre1
Description: Empty treasure disks tab in creative inventory
Expected result: Filled with floppys
Reproduction steps: Open your inventory :P/>
Screenshot: http://puu.sh/8cOFO.png

if you run cc without opencomputers the disks should be there
No, it's not a mod conflict with OpenComputers. I can confirm that the treasure disks are present in the Creative tab in my WIP modpack which features OpenComputers and many, many other mods.
What's REALLY going on here is the new ID-less block/item system. When you add a new mod that adds new blocks and items, it doesn't properly update in existing worlds. This leads to glitch blocks and glitch items that can crash the game, unless you were to sit down and manually update the internal ID list for that game world. Sadly the only thing you can do here is start a new world. :(/>
Sharidan #207
Posted 22 April 2014 - 02:49 PM
In the other thread, it's mentioned "may switch back". What exactly does that mean?

Also: Dan200 has moved on to MC 1.7.x, so where might I find the CC1.63pr2 download for 1.6.4 so I can test the fixes mentioned in the bug tracker thread?
Bomb Bloke #208
Posted 22 April 2014 - 03:18 PM
I suspect he "fixed" the liquid-detected-as-solid thing in order to rectify the liquids-causing-blocks-to-be-placed-incorrectly thing, and may not've done so if not for the other bug. That is to say, he intended the behaviour you reported, but it had unintended consequences - if he can work around them, he may re-implement it.

Any particular reason you'd want to test fixes in 1.63pre2? What's wrong with using 1.63 for that purpose?
Sharidan #209
Posted 22 April 2014 - 03:28 PM
Well, when I upgraded to the latest official 1.63 release again, I put it through my test setup with some bundled cables (scenario mentioned in my bug post in the bug tracker thread) and a chest to read the contents of the chest. I've thoroughly tested this on CC 1.61, 1.62 and the latest 1.63 official release, but none of my test setups are working on any of the 1.6x builds. I can't manipulate the bundled cables and I can't wrap the chest or anything else for that matter, as the peripheral.wrap method persistently returns a nil value.
So if these peripheral problems have been fixed in 1.63pr2 as responded in the bug tracker thread, then that's the version I need to get my hands on. Otherwise I'm forced to stick with 1.58 under FTB/MC 1.6.4.
Lyqyd #210
Posted 22 April 2014 - 03:52 PM
They're not problems; the bundled cable support no longer implements support for specific other mods but instead adds an API that other mods can use to allow ComputerCraft to interface with their cables. You'll have to wait for one of the mods adding bundled cables to update to include support (if none have done so yet).
Sharidan #211
Posted 22 April 2014 - 04:15 PM
Ah ok. Thanks Lyqyd. I'll downgrade back to CC 1.58 then :(/>
Bomb Bloke #212
Posted 22 April 2014 - 04:17 PM
As for wrapping a chest as a peripheral, that functionality has never been provided by ComputerCraft. OpenPeripheral, on the other hand…
theoriginalbit #213
Posted 23 April 2014 - 12:12 AM
As for wrapping a chest as a peripheral, that functionality has never been provided by ComputerCraft. OpenPeripheral, on the other hand…
I don't understand how people make this mistake so often :P/>
Dog #214
Posted 23 April 2014 - 01:47 AM
Because we're human beings and we derp :)/>
Engineer #215
Posted 25 April 2014 - 07:12 AM
Why not implement a http blacklist rather than a whitelist?
augustas656 #216
Posted 27 April 2014 - 02:49 PM
Seriously can command block analog output be added? How can I testfor some things? Or is it a bug that it doesn't work?
dan200 #217
Posted 02 May 2014 - 02:09 PM
Why not implement a http blacklist rather than a whitelist?

Because the internet is very, very big and anyone can create a website whenever they like
dan200 #218
Posted 02 May 2014 - 02:15 PM
New version!
Wojbie #219
Posted 02 May 2014 - 10:24 PM
http.checkURL( url )

Yay! :D/>
oeed #220
Posted 03 May 2014 - 12:24 AM

S:http_whitelist=*
By default!

Thank you Dan!!! :D/> :D/> :D/>
Edited on 20 July 2014 - 07:22 AM
apemanzilla #221
Posted 05 May 2014 - 02:00 PM

S:http_whitelist=*
By default!

Thanks you Dan!!! :D/> :D/> :D/>
When did this happen? How was I not aware of this? WOOO!

:D/>
augustas656 #222
Posted 06 May 2014 - 06:58 PM
How can I change pocket computer dimensions? Like screen size, like the terminal being 51 and 19, how can I change the pocket computer's dimensions. The config doesn't have them, thanks.
oeed #223
Posted 06 May 2014 - 10:43 PM

S:http_whitelist=*
By default!

Thanks you Dan!!! :D/> :D/> :D/>
When did this happen? How was I not aware of this? WOOO!

:D/>
1.64pr2 IIRC
MKlegoman357 #224
Posted 07 May 2014 - 09:42 AM
Here's a fixed and updated Lithuanian (lt_LT) language translation for you, Dan200: http://pastebin.com/mVM1whbu

Also, what is this line doing in the language file:


tile.computercraft:wired_modem.peripheral_connected
Lignum #225
Posted 08 May 2014 - 06:58 PM
Also, what is this line doing in the language file:


tile.computercraft:wired_modem.peripheral_connected
It's used for remote peripheral access which is addressed here.
MKlegoman357 #226
Posted 08 May 2014 - 08:21 PM
Also, what is this line doing in the language file:


tile.computercraft:wired_modem.peripheral_connected
It's used for remote peripheral access which is addressed here.

I understand that, but it hasn't got any value assigned to it.
TheJogMan #227
Posted 10 May 2014 - 11:54 PM
This can be ignored unless your looking for ideas on how to change how Computercraft is installed.

Do you think it could be possible to make Computercraft work without forge or a complicated install process? I wont be disappointed if you can't be it because it would be too time consuming or limitations in Minecraft but it's just that installing forge for 1.7.2 requires permission from an administrator account which I am not and my mother doesn't trust me after what I did to the last computer. Again I wont be too bothered if this can't be done because I have convinced her to have faith before but yeah.
Edited on 10 May 2014 - 10:00 PM
Lyqyd #228
Posted 11 May 2014 - 02:23 AM
It is incredibly unlikely that ComputerCraft will ever become a standalone mod not requiring Forge (barring the Mojang modding API actually coming out / being worth using). Even if it did so, the installation process would become more complicated, not less.
sci4me #229
Posted 11 May 2014 - 08:29 AM
It is incredibly unlikely that ComputerCraft will ever become a standalone mod not requiring Forge (barring the Mojang modding API actually coming out / being worth using). Even if it did so, the installation process would become more complicated, not less.

Also, why not Forge? I mean, except for Bukkit people Forge nearly always (if not always) makes installing mods easier. If you cannot do drag and drop then you shouldnt even be trying to install mods…
TheJogMan #230
Posted 12 May 2014 - 07:59 PM
I think the built in help system should go a bit more in depth like the wiki does and be more interactive. If this is something that would take to much time and end up delaying the stable release I'm sure there are more then enough people in the forums who would be willing to do it for you me included but compared to other people I wouldn't recommend myself.
Edited on 12 May 2014 - 05:59 PM
TheJogMan #231
Posted 12 May 2014 - 09:46 PM
never actually looked into the whole help system until I had already begun making my own version and found my self re-using most of what is already there but I feel my version is more user friendly as it is essentially all contained in a single script in a way the only known bug with mine is when I have it run a separate script it ignores it and carries on but this could be fixed by copying those scripts into mine instead of having mine run a separate script but at the moment I no longer have the patience to do it myself and its not a bug with computercrfaft.


function clr()
	 term.clear()
	 term.setCursorPos(1,1)
	 term.setTextColor(colors.yellow) --only for advanced computers
	 print("CraftOS 1.6")
	 term.setTextColor(colors.white) --only for advanced computers
	end
function inp()
	 print("")
	 x, y = term.getCursorPos()
	 print("->")
	 term.setCursorPos(4,y)
	end
W, H = term.getSize()
WM = W / 2
HM = H / 2
repeat
	 clr()
	 term.setCursorPos(WM - 6,3)
	 print("Welcome to CraftOS!")
	 term.setCursorPos(1,5)
	 print("Select and enter an option to learn more")
	 print("")
	 print("1. Programs")
	 print("2. Programming")
	 print("3. Whats New")
	 print("4. Change Log")
	 print("5. Credits")
	 print("6. Index")
	 print("7. Done")
	 print("")
	 print("Hint: You can enter the number of the option instead of typing out the whole thing")
	 inp()
	 selec = io.read()
	 selec = string.lower(selec)
	 if selec == "1" or selec == "programs" then
		  term.clear()
		  term.setCursorPos(1,1)
		  shell.run('programs')
		  print("")
		  print("Hit the enter key to continue")
		  print("")
		  io.read()
		 elseif selec == "2" or selec == "Programming" then
		  term.clear()
		  term.setCursorPos(1,1)
		  shell.run('help programming')
		  print("")
		  print("Hit the enter key to continue")
		  print("")
		  io.read()
		 elseif selec == "3" or selec == "whats new" or selec == "whatsnew" then
		  term.clear()
		  term.setCursorPos(12,1)
		  print("New to Computercraft 1.63")
		  term.setCursorPos(1,3)
		  print("* Turtles can now be painted with dyes, and cleaned with water buckets")
		  print("* Added new game: Redirection - ComputerCraft Edition")
		  print("* Turtle label nameplates now only show when the Turtle is moused over")
		  print("* The HTTP API is now enabled by defualt, and can be configured with a whitelist of permitted domains")
		  print("* http.get() and http.post() now accept parameters to control the request headers")
		  print("* New fs function: fs.getDir( path )")
		  print("* Fixed some bugs")
		  print("")
		  print("Hit the enter key to continue")
		  print("")
		  io.read()
		 elseif selec == "4" or selec == "change log" or selec == "changelog" then
		  term.clear()
		  term.setCursorPos(1,1)
		  shell.run('help changelog')
		  print("")
		  print("Hit the enter key to continue")
		  print("")
		  io.read()
		 elseif selec == "5" or selec == "credits" then
		  term.clear()
		  term.setCursorPos(1,1)
		  shell.run('help credits')
		  -- maby add _jogoyo for program contributions if you use this :)
		  print("")
		  print("Hit the enter key to continue")
		  print("")
		  io.read()
		 elseif selec == "6" or selec == "Index" then
		  term.clear()
		  term.setCursorPos(1,1)
		  shell.run('help index')
		  print("")
		  print("Type and enter ''help <topic>'' into the terminal to learn about a topic")
		  print("")
		  print("Hit the enter key to continue")
		  print("")
		  io.read()
		 end
	until selec == "7" or selec == "done"
clr()
print("Any missging information can be found at:")
print("http//:www.computercraft.info/wiki/Main_Page")
sleep(3)
clr()
Edited on 12 May 2014 - 07:53 PM
Konlab #232
Posted 15 May 2014 - 02:30 PM
Why don't you create the computercraft for latest minecraft version? As I know 1.7.9?
Sorry for bad english.
MKlegoman357 #233
Posted 15 May 2014 - 02:37 PM
Why don't you create the computercraft for latest minecraft version? As I know 1.7.9?
Sorry for bad english.

ComputerCraft uses Forge which is currently running under Minecraft 1.7.2.
apemanzilla #234
Posted 15 May 2014 - 04:54 PM
Why don't you create the computercraft for latest minecraft version? As I know 1.7.9?
Sorry for bad english.
Forge only works up to 1.7.4 right now, so it's impossible to update the mod to 1.7.9.
Konlab #235
Posted 16 May 2014 - 12:57 PM
:-(
apemanzilla #236
Posted 16 May 2014 - 04:54 PM
:-(
Hey, you could try manually porting forge to 1.7.9 if you like… No one's stopping you…
Konlab #237
Posted 16 May 2014 - 05:34 PM
I can't code in java…
Only in cc, and I learn C++,C#, html,javascript
But the lua and the cc is the easiest, and the best.
apemanzilla #238
Posted 16 May 2014 - 08:52 PM
I can't code in java…
Only in cc, and I learn C++,C#, html,javascript
But the lua and the cc is the easiest, and the best.

Well, arguably, no one is stopping you from learning Java, then manually porting Forge…
Konlab #239
Posted 16 May 2014 - 08:56 PM
if IWantToLearnJava() then
LearnJava()
else
WaitForSomebodyWhoPortsMinecraftForge()
end
Agoldfish #240
Posted 16 May 2014 - 08:58 PM
if IWantToLearnJava() then
LearnJava()
else
WaitForSomebodyWhoPortsMinecraftForge()
end
That is awful syntax. Also, Java isn't too hard, just the syntax is hard to get used to.
Edited on 16 May 2014 - 06:58 PM
Konlab #241
Posted 16 May 2014 - 09:00 PM
I really don't want to learn java.
Agoldfish #242
Posted 16 May 2014 - 09:10 PM
I really don't want to learn java.
Then don't. It will be important to learn if you want to continue as a programmer though.
apemanzilla #243
Posted 16 May 2014 - 09:11 PM
if IWantToLearnJava() then
LearnJava()
else
WaitForSomebodyWhoPortsMinecraftForge()
end
That is awful syntax. Also, Java isn't too hard, just the syntax is hard to get used to.
And the immutable Strings. (Grumble grumble stupid StringBuilder)
awsmazinggenius #244
Posted 16 May 2014 - 11:43 PM
Lua strings are immutable, too. We just have to deal with it.
Geforce Fan #245
Posted 17 May 2014 - 03:46 AM
anyone find it ironic how version 1.6.4 of computer craft finally moves from 1.6.4 to 1.7?
Konlab #246
Posted 17 May 2014 - 11:27 AM
BUT FINALLY IT'S NOT ON 1.6.4 :-)
Kris1432 #247
Posted 21 May 2014 - 09:34 PM
just got this crash http://pastebin.com/SRjrx6RT
awsmazinggenius #248
Posted 22 May 2014 - 02:21 AM
Post that in Bugs, it will be more useful to Dan.
Razorskills #249
Posted 29 May 2014 - 02:36 AM
I thought this was cool: http://openeye.openmods.info/mod/computercraft#files
Techokami #250
Posted 31 May 2014 - 02:14 PM
So, when is ComputerCraft 1.64 going to stabilize out of beta with a proper API?
awsmazinggenius #251
Posted 31 May 2014 - 02:38 PM
Be patient. Coding doesn't happen overnight.
Konlab #252
Posted 31 May 2014 - 08:05 PM
Where can I find the list of new features?(in 1.64pr2)
Aldrin00 #253
Posted 08 June 2014 - 07:28 AM
I was losing hope on finding a appropriate version for computercraft then i found this :D/>
MrPurple6411 #254
Posted 11 June 2014 - 07:14 AM
Be patient. Coding doesn't happen overnight.

Umm Sometimes it actually does.
Guess the lamplight went out so they had to go to bed instead. ;-)
DeviPotato #255
Posted 13 June 2014 - 02:56 AM
Does anyone know if there are any mods that provide functional bundled color cables for this version of computercraft yet?
theoriginalbit #256
Posted 13 June 2014 - 03:20 AM
as far as I'm aware there isn't even any mods that add bundled support for 1.63, let alone a beta release of 1.64…
mrgreaper #257
Posted 16 June 2014 - 04:14 PM
does anyone have instructions on how to add the api to 1.7.2 forge?

i know liberies go into lib folder

and i read apis go into
#project_root#\src\api\java but what part of the api goes into there?
the whole api folder?
from the the dan200 folder?
from the computercraft folder?
Bomb Bloke #258
Posted 16 June 2014 - 04:20 PM
If you wish to add a custom API, you'd generally use a resource pack.
Cranium #259
Posted 16 June 2014 - 04:42 PM
That's not what he's asking. I think he's wanting to use the ComputerCraft API for either peripherals or bundled cables…
mrgreaper #260
Posted 16 June 2014 - 05:00 PM
That's not what he's asking. I think he's wanting to use the ComputerCraft API for either peripherals or bundled cables…

indeed its for making a peripheral

trying random locations for it is not helping (sadly out of time to work on my mod now untill after work)

edit1

well i asked Abrar Syed (given he is the one that got forge gradle etc all working and is a guru at it) his reply was

"binary jar? libs folder. Sources? src/api/(java|resources). Put all the sources in there."

however thats not working for me

http://snag.gy/cVIGE.jpg

(note im aware of the spelling issue of speach - speech but its not relevent)

now im wondering if i misunderstood something or if theres an issue with the api ?

if anyone can shed light on it i would be most greatful



edit2:
i changed my import line to import dan200.computercraft.api.peripheral.IPeripheral; as the api has changed but no luck

moved the dan200 folder from src/api/java to src/main/java and its working…but thats not how were supposed to use apis so i think its an api issue



edit3:

ok fixed it thanks to Abrar Syed, in idea you need to right click java folder (the src/api/java one) and choose mark as source root..then viola its working (and it is the dan200 folder that goes into there :)/> hope that helps others too (im sure we will all get used to the new ways soon :)/>
Edited on 16 June 2014 - 06:25 PM
Parker8283 #261
Posted 18 June 2014 - 06:05 AM
Where did you get a copy of the API?
awsmazinggenius #262
Posted 18 June 2014 - 11:32 PM
From the jar file.
TorakTu #263
Posted 20 June 2014 - 02:22 PM
Dang, I just read this thread. I am on 1.7.9. of minecraft and It didn't occur to me that the new minecraft changes would force all modders to stop working on their mods. So forge 1.7.2 is the latest ( works under 1.7.4 but nothing beyond that ). I was able to finally get Optinfine to work with 1.7.9. It's a shame CC doesn't work with it. So it looks like CC is dead for versions of minecraft beyond 1.7.4.. This is what I get for not being here for over 6 months. :(/>
Edited on 20 June 2014 - 12:23 PM
cjohnson3521 #264
Posted 20 June 2014 - 06:59 PM
Dan200, please enter a russian translation to your mod!
Translation here : http://pastebin.com/eSL3eKD7
gronkdamage #265
Posted 21 June 2014 - 12:13 PM
Dang, I just read this thread. I am on 1.7.9. of minecraft and It didn't occur to me that the new minecraft changes would force all modders to stop working on their mods. So forge 1.7.2 is the latest ( works under 1.7.4 but nothing beyond that ). I was able to finally get Optinfine to work with 1.7.9. It's a shame CC doesn't work with it. So it looks like CC is dead for versions of minecraft beyond 1.7.4.. This is what I get for not being here for over 6 months. :(/>
If they require forge - all mods are. Forge has said they were going to wait for 1.8
TorakTu #266
Posted 22 June 2014 - 05:32 AM
Dang, I just read this thread. I am on 1.7.9. of minecraft and It didn't occur to me that the new minecraft changes would force all modders to stop working on their mods. So forge 1.7.2 is the latest ( works under 1.7.4 but nothing beyond that ). I was able to finally get Optinfine to work with 1.7.9. It's a shame CC doesn't work with it. So it looks like CC is dead for versions of minecraft beyond 1.7.4.. This is what I get for not being here for over 6 months. :(/>
If they require forge - all mods are. Forge has said they were going to wait for 1.8

Thanks for the heads up. I been away far too long. Trying to catch up.
dan200 #267
Posted 24 June 2014 - 04:27 PM
New version in OP, fixes many reported bugs
MKlegoman357 #268
Posted 25 June 2014 - 03:45 PM
Here's an updated and fixed Lithuanian (lt_LT) language file for ComputerCraft 1.64pr3:

http://pastebin.com/PzPp0xqt
Dre4M #269
Posted 27 June 2014 - 05:45 PM
Here's an updated and fixed Lithuanian (lt_LT) language file for ComputerCraft 1.64pr3:

http://pastebin.com/PzPp0xqt

One thing for sure… It could be translated a bit better.
Kasran #270
Posted 27 June 2014 - 09:05 PM
Future reference for those wondering: CC 1.64pr3 doesn't work with Minecraft 1.7.10. CC still uses AABBPool (which was deprecated and replaced with getBoundingBox in one of the recent versions of Forge, because it isn't present anymore in 1.7.10). I'm not going to post this as a bug, at least for now, because I'm sure there are still more important bugs to fix right now than 1.7.10 support - but still, it's something to be aware of.

Keep up the amazing work, Dan200!
MKlegoman357 #271
Posted 27 June 2014 - 09:37 PM
Here's an updated and fixed Lithuanian (lt_LT) language file for ComputerCraft 1.64pr3:

http://pastebin.com/PzPp0xqt

One thing for sure… It could be translated a bit better.

I PM'ed you about this.
TorakTu #272
Posted 27 June 2014 - 10:39 PM
I was looking at forge and found they updated. So I started to poke around and found MCP also updated to 1.7.10… Looking forward to 1.7.10 version of CC.

Way cool.
vico #273
Posted 28 June 2014 - 02:50 AM
Future reference for those wondering: CC 1.64pr3 doesn't work with Minecraft 1.7.10. CC still uses AABBPool (which was deprecated and replaced with getBoundingBox in one of the recent versions of Forge, because it isn't present anymore in 1.7.10). I'm not going to post this as a bug, at least for now, because I'm sure there are still more important bugs to fix right now than 1.7.10 support - but still, it's something to be aware of.

Keep up the amazing work, Dan200!

Not 100% True… AABBPool is fact, but CC boot and PDAs seems to work.
Incredbly, in my opinion…
Kasran #274
Posted 28 June 2014 - 03:38 PM
Not 100% True… AABBPool is fact, but CC boot and PDAs seems to work.
Incredbly, in my opinion…
Ahh. On my end, Minecraft 1.7.10 crashes when I try to place a computer because it's trying to access AABBPool. Regardless of if other things function properly, not being able to place computers is "doesn't work" enough for me.
Techokami #275
Posted 28 June 2014 - 04:49 PM
But that means you can ONLY use Pocket Computers. All the fun stuff exist as blocks, which crash the world file upon placement due to getAABBPool no longer existing.
vico #276
Posted 29 June 2014 - 12:01 AM
But that means you can ONLY use Pocket Computers. All the fun stuff exist as blocks, which crash the world file upon placement due to getAABBPool no longer existing.

Yes, but this means only relative small fixes need to be made.
And in time: Not only 1.7.10 builds of forge will have AABBPool removed. ALL 1.7.x forge builds will be this removed. Then, almost any mod for 1.7.2 will be compatible with 1.7.10. I believe dan will need to workaround this when he made a new PR.
Agoldfish #277
Posted 29 June 2014 - 01:01 AM
Am I the only one who thinks the portable computers should have a separate OS?
Bomb Bloke #278
Posted 29 June 2014 - 02:18 AM
How would you make it differ from CraftOS?
Sebra #279
Posted 29 June 2014 - 10:36 AM
Am I the only one who thinks the portable computers should have a separate OS?
It seems so.
Do you want win/unix/mac conflicts in CC?
Dre4M #280
Posted 29 June 2014 - 03:09 PM
Are there any peripherals for CC 1.64 at the moment? I found 'Asie's ImmibisPeripherals', but it is conflicting with ComputerCraft.
Kasran #281
Posted 29 June 2014 - 04:33 PM
Are there any peripherals for CC 1.64 at the moment? I found 'Asie's ImmibisPeripherals', but it is conflicting with ComputerCraft.
I suspect there won't be any peripheral addons until CC 1.64 gets a proper release. While it's in beta, things might change that could break the peripherals and force the addon authors to make changes, and nobody wants to deal with that if they don't have to.
Techokami #282
Posted 30 June 2014 - 07:50 PM
Asie's fork of Immibis Peripherals is for use with OpenComputers, not ComputerCraft. You need to wait for the official version from immibis.
gronkdamage #283
Posted 02 July 2014 - 02:32 AM
Looks like everyone's converting to 1.7.10 - Here's hoping that pr4 is for 1.7.10 as well :)/>

And with the 1.8 mod API coming out; I hope mod authors have such easier time with everything. :)/>
mrgreaper #284
Posted 02 July 2014 - 04:21 AM
Looks like everyone's converting to 1.7.10 - Here's hoping that pr4 is for 1.7.10 as well :)/>
not seen many mods convert to 1.7,10 yet but then it isnt the recomanded forge as of yet

And with the 1.8 mod API coming out; I hope mod authors have such easier time with everything. :)/>
lol if you mean official api, well dont hold your breath, that thing has been promised for x version (where x equals what ever version is out next) for …hmmm must be nearly 2 years now
gronkdamage #285
Posted 02 July 2014 - 09:47 AM
lol if you mean official api, well dont hold your breath, that thing has been promised for x version (where x equals what ever version is out next) for …hmmm must be nearly 2 years now
That is what has been taking so long with 1.8; mojang said they're finally going to release it. A lot of people think (myself included) that that's why there are not nearly as many mods for 1.7.2
Neander_King #286
Posted 02 July 2014 - 01:00 PM
Are there any changelogs for the development versions?
Edited on 02 July 2014 - 11:00 AM
Bomb Bloke #287
Posted 02 July 2014 - 03:00 PM
That is what has been taking so long with 1.8; mojang said they're finally going to release it.

Link?
Lyqyd #288
Posted 02 July 2014 - 03:33 PM
Yeah, I'd love to see a citation for that, considering that I haven't seen anything of the sort.
Cranium #289
Posted 02 July 2014 - 04:17 PM
The most recent note about the modding api is here: https://mojang.com/2014/06/minecraft-snapshot-14w26a/
And all it says is "There may not be many cool features, but this weeks snapshot comes with some optimizations, bug fixes and even more rewrites bringing us closer to the plugin API!"
Nowhere in there does it say that the modding API is being released.
mrgreaper #290
Posted 02 July 2014 - 04:44 PM
lol if you mean official api, well dont hold your breath, that thing has been promised for x version (where x equals what ever version is out next) for …hmmm must be nearly 2 years now
That is what has been taking so long with 1.8; mojang said they're finally going to release it. A lot of people think (myself included) that that's why there are not nearly as many mods for 1.7.2

A lot of people are very wrong then.

forge 1.7.2 appeared around January, but it was buggy…you could start updating your mod granted but it was tough going.
minecraft uses obfuscation to make the code harder to duplicate, MCP converts that for us (never really understood why they obfuscate and at the same time allow decoding…why not just not obfuscate? but thats beside the point)
The forge team, for reasons i will never understand, choose to not use the latest MCP conversions so when coding your mod instead of say entity.someFuntion() you were using func_4532679349 this made it very hard to read and to code
fluid api was also not added till much later.
it was not till perhaps last month that forge had a recommended build for 1.7.2 and thats when mods started to convert only…1.7.2 is considerably dated by now (terrible frame rates etc) but the forge team never updated to the newest version of mc
forge has now started to work on 1.7.10 so many mods will likely wait untill that finishes.
Meanwhile most tutorial serises being made on youtube (include one by the notable Pahimar) are on 1.7.2 and may not be valid for 1.7.10 so the modders who are rusty and relearning (as many of us are after such a long period of stagnation, including myself) are learning on a version that may not be valid .

many many mods use API's of other mods (of which CC is one of the main ones but lets not forget thermal expansion, buildcraft, forestry etc etc) and therefore could not update untill those api's were updated. Given the general rule of "dont ask for updates" mod devs dont really know how keen other mod devs are to have updated api's, with out those api's mods cant update with out loss of function.

While the majority of mods stay on a minecraft version, other mods that try to update to the new mc get pestured to back port to the current mc version (1.7.2 is fundemently different to 1.6.4 in many areas of code so this is not easy or viable though some modders have managed it of late) as every one wants the new features of thier favorite mod while not wanting to lose other mods…this rather saps modders desire to update, i mean why update to 1.7.10 when no one else is and youll only get pestured to backport?

its all a bit of a clusterf**k at the moment, no one is waiting on the mod api were more waiting on things to stabilize, for the bigger mods to make that leap. In my opinion minecraft modding has lost a lot of its steam, this is the longest that forge has been behind minecraft versions since 1.2.5 to 1.3.2 (which is when server and client code merged)
gronkdamage #291
Posted 02 July 2014 - 11:50 PM
I can't find anything now - so I stand corrected; but I swear it was dinnerbone that tweeted 1.8 wouldn't be out for another 2 months so they could finish off the API. Of course he may have said something that wasn't remotely close and I misread it thinking it was.
vico #292
Posted 03 July 2014 - 01:34 AM
I doubt ComputerCraft can and will be ported to Minecraft's Official Plugin API when this is out. I heard it will share many similarities with bukkit API, and CC have several features and funcionalities far from the API will be able to provide. I hope when this will be out Forge wont be terminated.
Bomb Bloke #293
Posted 03 July 2014 - 01:49 AM
(never really understood why they obfuscate and at the same time allow decoding…why not just not obfuscate? but thats beside the point)

Probably makes sense according to the lawyer-men.
mrgreaper #294
Posted 03 July 2014 - 03:37 AM
(never really understood why they obfuscate and at the same time allow decoding…why not just not obfuscate? but thats beside the point)

Probably makes sense according to the lawyer-men.

more then likely, just would be so much easier for all of us if they skipped that part.

on a side note Pahimar released a video today on how to update forge to 1.7.10, so this is where his tutorial will be, and my mod didnt need any changes from the 1.7.2 to 1.7.10….im not saying all 1.7.2 code will work on 1.7.10 but its a promising sign :)/>
Edited on 03 July 2014 - 01:39 AM
0099 #295
Posted 07 July 2014 - 10:29 PM
Can anyone explain me, how is new term redirection system supposed to work?
1. I still can't find any analogue for term.restore. term itself is "not a recommended redirect target", term.native is "do-not-use-unless-you-have-to" function, term.redirect(nil) is simply forbidden. What should I do?
2. I noticed, when a program that called term.redirect stops, it automatically restores the target.
2.1. Please show me that piece of code that changes targets back. I just can't find it.
2.2. How can I prevent this from happening?
Lyqyd #296
Posted 08 July 2014 - 12:02 AM
Your question was split into its own topic in Ask a Pro and answered there.
mrgreaper #297
Posted 08 July 2014 - 12:43 AM
well i converted my development enviroment to 1.7.10, my mod works perfectly but computercraft …not so much (no such method net.minecraft.util.AxisAlignedBB.func_72332_a()Lnet/minecraft/util/AABBPool

to be honest i was having difficulty with the api (just couldnt get my peripheral to work) but i have so much other stuff to do i didnt really work on it much)
vico #298
Posted 08 July 2014 - 12:59 PM
well i converted my development enviroment to 1.7.10, my mod works perfectly but computercraft …not so much (no such method net.minecraft.util.AxisAlignedBB.func_72332_a()Lnet/minecraft/util/AABBPool

to be honest i was having difficulty with the api (just couldnt get my peripheral to work) but i have so much other stuff to do i didnt really work on it much)

Future reference for those wondering: CC 1.64pr3 doesn't work with Minecraft 1.7.10. CC still uses AABBPool (which was deprecated and replaced with getBoundingBox in one of the recent versions of Forge, because it isn't present anymore in 1.7.10). I'm not going to post this as a bug, at least for now, because I'm sure there are still more important bugs to fix right now than 1.7.10 support - but still, it's something to be aware of.

Keep up the amazing work, Dan200!
mrgreaper #299
Posted 09 July 2014 - 03:11 AM
well i converted my development enviroment to 1.7.10, my mod works perfectly but computercraft …not so much (no such method net.minecraft.util.AxisAlignedBB.func_72332_a()Lnet/minecraft/util/AABBPool

to be honest i was having difficulty with the api (just couldnt get my peripheral to work) but i have so much other stuff to do i didnt really work on it much)

Future reference for those wondering: CC 1.64pr3 doesn't work with Minecraft 1.7.10. CC still uses AABBPool (which was deprecated and replaced with getBoundingBox in one of the recent versions of Forge, because it isn't present anymore in 1.7.10). I'm not going to post this as a bug, at least for now, because I'm sure there are still more important bugs to fix right now than 1.7.10 support - but still, it's something to be aware of.

Keep up the amazing work, Dan200!

ah hadnt seen that, tbh with mods moving to 1.7.10 and 1.7.10 being the current version i would suggest this bug is a big one. no real point in continuing with 1.7.2 with 1.7.10 there after all. (but hay thats opinion not a plead to update, though granted i would quite like to work on the peripherals my mod will be adding :)/> )
BTNGaming #300
Posted 18 July 2014 - 08:23 PM
So I made a personal modpack that is NON DISTRIBUTED to anyone but myself for offline play, And it worked perfectly. But when I installed Computer Craft beta, it just crashes. Anyone able to help me figure out the issue?

Here is a link to the pastebin error log.

http://pastebin.com/yrUyCJf4

Thanks for your time, whoever reads and helps out with this. =]
Cranium #301
Posted 18 July 2014 - 08:26 PM
So I made a personal modpack that is NON DISTRIBUTED to anyone but myself for offline play, And it worked perfectly. But when I installed Computer Craft beta, it just crashes. Anyone able to help me figure out the issue?

Here is a link to the pastebin error log.

http://pastebin.com/yrUyCJf4

Thanks for your time, whoever reads and helps out with this. =]
Seems like you're having issues with the backpack mod
Edited on 18 July 2014 - 06:26 PM
BTNGaming #302
Posted 18 July 2014 - 08:31 PM
So I made a personal modpack that is NON DISTRIBUTED to anyone but myself for offline play, And it worked perfectly. But when I installed Computer Craft beta, it just crashes. Anyone able to help me figure out the issue?

Here is a link to the pastebin error log.

http://pastebin.com/yrUyCJf4

Thanks for your time, whoever reads and helps out with this. =]
Seems like you're having issues with the backpack mod

The weird thing about that is, it works perfectly without CC included. I still have a couple errors with backpack mod but it works none-the-less.
Cranium #303
Posted 18 July 2014 - 08:32 PM
well, that's your forge log, do you have your crash report? It should be in its own folder.
BTNGaming #304
Posted 18 July 2014 - 08:38 PM
Here is the Launcher's Log: http://pastebin.com/ZmnmkRFT
Here is the log directly from the modpack's Log folder: http://pastebin.com/kLCHeacY

There is no other log files in any of the folders.

Thanks for taking the time to help with this by the way, truly appreciate it.
Edited on 18 July 2014 - 06:39 PM
Cranium #305
Posted 18 July 2014 - 08:40 PM
there should be a "crash-reports" folder in your minecraft directory.
BTNGaming #306
Posted 18 July 2014 - 08:41 PM
Yeah, There isn't one in there, I checked. Even restarted everything and did a fresh game load up to get the crash-reports to come up and nothing did. It's running on a hidden/private technic mod pack because I didn't know how else to setup a modpack I could use offline by myself. Maybe that's why there is no crash-reports folder?


I removed both parts of the backpack mod, and unfortunately that fixed it.. Guess i'm gonna have to fight to make that work with 1.7.2.

Thanks for your help. I appreciate it.


It works with backpacks IF CC isn't installed. and CC works fine if backpacks isn't installed, Maybe there is a compatibility issue between the two mods.
Edited on 18 July 2014 - 06:56 PM
vico #307
Posted 20 July 2014 - 12:48 AM
Yeah, There isn't one in there, I checked. Even restarted everything and did a fresh game load up to get the crash-reports to come up and nothing did. It's running on a hidden/private technic mod pack because I didn't know how else to setup a modpack I could use offline by myself. Maybe that's why there is no crash-reports folder?


I removed both parts of the backpack mod, and unfortunately that fixed it.. Guess i'm gonna have to fight to make that work with 1.7.2.

Thanks for your help. I appreciate it.


It works with backpacks IF CC isn't installed. and CC works fine if backpacks isn't installed, Maybe there is a compatibility issue between the two mods.

In modpack log:

io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]

Netty's issue, maybe server-side. Do you using Cauldron (former MCPC+) as Server?

And i dont like Technic. Straight to Forge is better
Edited on 19 July 2014 - 10:49 PM
Monthkiller #308
Posted 21 July 2014 - 08:58 PM
Add a message program (Like a IM/PM)
Edited on 21 July 2014 - 07:01 PM
Cranium #309
Posted 24 July 2014 - 11:00 PM
For those who have not noticed, pr4 is out now. Details in the OP.
SnappComputerCraft #310
Posted 27 July 2014 - 10:13 PM
I can't wait for this. I'm going to use ComputerCraft and try and create a program for an RP server I'm gonna make once I get another project done.
theoriginalbit #311
Posted 27 July 2014 - 10:46 PM
I can't wait for this.
Well then wait no longer.
master801 #312
Posted 28 July 2014 - 10:45 PM
Awesome work!
Geforce Fan #313
Posted 03 August 2014 - 04:48 AM
I unziped the download and looked at the changelog. Is this just a port to 1.7.10 and nothing else?
numbersixonline #314
Posted 03 August 2014 - 05:18 AM
Hello, sorry to disturb. I saw on the buglist that the issue with automatic startup after chunkloading is fixed in pr5, where i can download that version, we are confident enough to go 1.7 with our pack if this bug is fixed. Tnks
Cranium #315
Posted 03 August 2014 - 07:56 AM
Hello, sorry to disturb. I saw on the buglist that the issue with automatic startup after chunkloading is fixed in pr5, where i can download that version, we are confident enough to go 1.7 with our pack if this bug is fixed. Tnks
pr5 isn't yet available, as far as I'm aware.
thesquidness #316
Posted 04 August 2014 - 10:49 AM
i cant do it cos mediafire is blocked so i used a proxy server and it said type the words below to authorise and hit authorise to download but there was no words or box. WTF!!!!!! can u make the download just so it doesnt go to mediafire and goes strait to the downloader or at least make it go to adf.ly or some other link
MKlegoman357 #317
Posted 04 August 2014 - 05:17 PM
i cant do it cos mediafire is blocked so i used a proxy server and it said type the words below to authorise and hit authorise to download but there was no words or box. WTF!!!!!! can u make the download just so it doesnt go to mediafire and goes strait to the downloader or at least make it go to adf.ly or some other link

Mediafire is the site you should be downloading the pre-release from. It's a file sharing service. I don't know if we are allowed to make mirror download links though.
Cranium #318
Posted 04 August 2014 - 05:49 PM
i cant do it cos mediafire is blocked so i used a proxy server and it said type the words below to authorise and hit authorise to download but there was no words or box. WTF!!!!!! can u make the download just so it doesnt go to mediafire and goes strait to the downloader or at least make it go to adf.ly or some other link
I assume you're accessing this either from another country(where Mediafire is blocked for some reason) or from a network that blocks download sites, such as at a business, or in a school. I'd recommend if it is the latter, to download it at home,r ather than at these restrictive locations.
Ashton #319
Posted 05 August 2014 - 07:26 AM
Is there a list of the new block IDs? I'm trying to add them to a plugin and I keep getting "Invalid Item ID" when I use the IDs listed in the wiki (and same when I try to use the /give command)
theoriginalbit #320
Posted 05 August 2014 - 07:33 AM
Is there a list of the new block IDs? I'm trying to add them to a plugin and I keep getting "Invalid Item ID" when I use the IDs listed in the wiki (and same when I try to use the /give command)
Minecraft 1.7 does not use Block IDs, it now uses a naming system. So using the IDs from the wiki will obviously cause a problem. You must instead use ComputerCraft:[block name]. I believe if you don't know the names pressing tab after filling out the Mod ID will cycle through all the available blocks.
Ashton #321
Posted 05 August 2014 - 07:44 AM
Minecraft 1.7 does not use Block IDs, it now uses a naming system. So using the IDs from the wiki will obviously cause a problem. You must instead use ComputerCraft:[block name]. I believe if you don't know the names pressing tab after filling out the Mod ID will cycle through all the available blocks.

No Item Type known by "ComputerCraft"

I'll see what I can dig up now that I know what to look for, sorry for being a n00b, didn't expect that big of a change… and now I'm just *hoping* this doesn't break my plugins to prevent crafting/etc!

Thanks!
theoriginalbit #322
Posted 05 August 2014 - 07:52 AM
I'll see what I can dig up now that I know what to look for, sorry for being a n00b, didn't expect that big of a change…
welcome to Minecraft 1.7
Techokami #323
Posted 11 August 2014 - 09:28 PM
So uh, I don't know when this happened, but one of the available configuration options seems to have vanished. I used to be able to set the screen size of computers in the config, because I feel that 80x25 is more comfortable and productive than whatever is used now. I THINK it was depreciated due to portable computers having their own size? But I think that this option should be reinstated, or at least make Advanced Computers have a bigger screen size than regular Computers.
Lyqyd #324
Posted 11 August 2014 - 09:52 PM
That's come up a few times since the 1.6 betas started coming out. My understanding is that that feature won't be making a reappearance.
jeffro #325
Posted 16 August 2014 - 11:53 PM
Thank you for the 'release'. I hope to make some valuable contibutions to the community. Hopefully i will have this installed this evening. Thanks again.
JediKnyghte #326
Posted 21 August 2014 - 03:17 AM
Has anyone else encountered a crash problem when a mining turtle hits a minecart? I haven't been able to reproduce it consistently enough to file a bug report, but I'm getting crashes where the crash log mentions carts and I when I reload the world, I can see where a turtle was about to hit a cart.
Bomb Bloke #327
Posted 21 August 2014 - 03:24 AM
So far there are these two reports.
JediKnyghte #328
Posted 21 August 2014 - 03:23 PM
So far there are these two reports.
Why I thought to search this thread and not the bug report thread, I'll never know. :wub:/> Thanks for finding those.
SnappComputerCraft #329
Posted 30 August 2014 - 01:53 AM
This is NOT a bug, so I have the right to post this here.

I am currently unable to download the mod as Safari will not allow me to access anything with the word "Mediafire" in the domain. I can, however, access Dropbox. Can someone port the download to Dropbox so I can download the mod and take a look at it?
Cranium #330
Posted 30 August 2014 - 06:13 AM
This is NOT a bug, so I have the right to post this here.

I am currently unable to download the mod as Safari will not allow me to access anything with the word "Mediafire" in the domain. I can, however, access Dropbox. Can someone port the download to Dropbox so I can download the mod and take a look at it?
You can always use a different browser. They're free…
SnappComputerCraft #331
Posted 30 August 2014 - 10:22 AM
I know but I will be getting rid of this computer soon so why bother?

*sigh* looks like i'm downloading something
SnappComputerCraft #332
Posted 04 September 2014 - 12:25 AM
Okay I got a new browser however now I'm on Windows 8 and it will not open up MediaFire again.
Cranium #333
Posted 04 September 2014 - 02:42 AM
Windows 8 doesn't block MediaFire. You likely have some sort of website filtering, or antivirus blocking MediaFire.
Ashton #334
Posted 11 September 2014 - 01:19 AM
Is there any way to fix the "computers shut down when chunk unloads" bug? I know "it will be fixed in PR5" but it's looking like PR5 will be long in coming, if it even comes, for 1.7.10… (tried redstone doesn't seem to work) and I'd rather not use persistent chunk loaders since I plan on using these in LOTS of locations… or will that even keep them from unloading?)
Cranium #335
Posted 11 September 2014 - 02:47 AM
Is there any way to fix the "computers shut down when chunk unloads" bug? I know "it will be fixed in PR5" but it's looking like PR5 will be long in coming, if it even comes, for 1.7.10… (tried redstone doesn't seem to work) and I'd rather not use persistent chunk loaders since I plan on using these in LOTS of locations… or will that even keep them from unloading?)
You mean computers resuming where they left off before unloading? Not a feature of this release as far as I'm aware. If you leave a computer on before it unloads, it should boot back up and run the startup script you have loaded though.
Ashton #336
Posted 11 September 2014 - 05:33 AM
You mean computers resuming where they left off before unloading? Not a feature of this release as far as I'm aware. If you leave a computer on before it unloads, it should boot back up and run the startup script you have loaded though.

Nope, chunk unloads, I walk back in and computer is off, has to be clicked to turn back on… completely destroys computerized locks and (in my case) computer-controlled dungeons…
Bomb Bloke #337
Posted 11 September 2014 - 05:46 AM
So you're talking about a bug where computers fail to turn back on automatically, yes?
Dog #338
Posted 11 September 2014 - 07:08 AM
Nope, chunk unloads, I walk back in and computer is off, has to be clicked to turn back on… completely destroys computerized locks and (in my case) computer-controlled dungeons…

I've seen that same problem on Cranium's 1.7.10 beta server. So far I've only been able to reliably replicate the problem on Cranium's beta server (not on my test server); so I've hesitated to file a bug report without more information to provide.
Ashton #339
Posted 11 September 2014 - 06:23 PM
I've seen that same problem on Cranium's 1.7.10 beta server. So far I've only been able to reliably replicate the problem on Cranium's beta server (not on my test server); so I've hesitated to file a bug report without more information to provide.

my understanding is that it's a known error and will be fixed, but in the meantime I dont know how to handle it without using chunkloaders which will eat up a LOT of resources considering how many persistent chunks I'll be dealing with… I mean, yes, it will work, and if I have to I'll deal with it for now, but I was hoping there was another solution…
Bomb Bloke #340
Posted 12 September 2014 - 01:35 AM
The only tool available to you which might serve as a workaround of sorts is wired modems. Hook up as many computers as you can to a single system, then code that one to turn all the others on using their peripheral functions.

Catches include not being able to use this method to boot turtles which stopped at random locations.
KeeganDeathman #341
Posted 14 September 2014 - 07:46 PM
Can betas be used in modpacks?
Bomb Bloke #342
Posted 15 September 2014 - 12:39 AM
I'd assume the same permission applies as with full builds, but that doesn't mean it's a good idea. Unless you trust the players on your server, CC 1.6x in general is a risk for multiplayer environments. In particular, the beta builds are highly likely to trigger crash bugs when combined with other mods.
KeeganDeathman #343
Posted 15 September 2014 - 05:37 AM
Ive had trouble with CC in the past, had to remove it from my modpack due to these issues, had to do with directories I think. I think.
Ashton #344
Posted 15 September 2014 - 10:15 PM
The only tool available to you which might serve as a workaround of sorts is wired modems. Hook up as many computers as you can to a single system, then code that one to turn all the others on using their peripheral functions.

Catches include not being able to use this method to boot turtles which stopped at random locations.

Combining this with chunkloaders seems to work. I dont suppose wireless modems will work too, will they? (Right now I'm trying to avoid as many computers as possible using just redstone and innumbris's IC mod with the few required PCs being in chunks with loaders present)

EDIT:
is there a way to view chunk boundries? that way I can make sure I'm placing PCs in a loaded chunk or else activating them with a modem?
Edited on 15 September 2014 - 08:17 PM
Cranium #345
Posted 15 September 2014 - 10:28 PM
is there a way to view chunk boundries? that way I can make sure I'm placing PCs in a loaded chunk or else activating them with a modem?
If you have NEI installed, you can press F9 i believe, and it will show chunk boundaries.
Bomb Bloke #346
Posted 16 September 2014 - 02:14 AM
I dont suppose wireless modems will work too, will they?

No, sorry.
LDDestroier #347
Posted 17 September 2014 - 10:59 PM
There should be flash drives that work exactly like floppy disks, except contain more information, cost more, and can be directly inserted into computers and PDAs!

What would be just as nice would be a command/lua function to add 256-color graphics, so you could make a paint program that isn't text based. For example, MS-DOS is a text-based OS, but programs can do stuff with it that isn't just text!

And microphone peripherals would be nice too. It would send the audio or midi-style sounds through rednet and be able to record and play it! Then, you could have pastebins with audio code, so you could put it into a program that would interperet it and play music!

These are what computercraft is missing!
Dog #348
Posted 17 September 2014 - 11:12 PM
You do realize that the number of colors has nothing to do with whether you are using text or graphics, right? Even if CC could go to 256 colors, the resolution would stay the same.

As for music, there is Note Block Studio that allows you to create music that can be played in MC (as well as convert MIDI files into NBS files). On the CC side, there is Moar Peripherals by theoriginalbit that includes an iron note block (makes the sounds) and 'Note', a program that will play the songs through the iron note block.
Edited on 17 September 2014 - 11:49 PM
dan200 #349
Posted 18 September 2014 - 11:57 PM
Hey all!
Check the OP for a new version, I've fixed pretty much all the big bugs reported so far, and i've added a new feature: turtle.inspect()
Sorry this has been so long. Between all the Minecraft contract work i've been doing and my indie game development, it's been hard to justify spending much time on a hobby I don't earn any money for lately. I'm glad I picked it up again though. If this version passes without any critical bugs being found, we should have a full release soon.
Galbi3000 #350
Posted 19 September 2014 - 04:40 PM
Would it be possible to have a turtle or computer keep a chunk active while it is running a program? This would enable a turtle to do a large mining routine or building without you having to constantly be near it to keep the program running :)/>
Edited on 19 September 2014 - 02:41 PM
Bomb Bloke #351
Posted 21 September 2014 - 06:53 AM
Speaking as one who hasn't updated MineCraft/Forge to 1.7.10 levels as yet, what does turtle.inspect() do?
theoriginalbit #352
Posted 21 September 2014 - 08:22 AM
Speaking as one who hasn't updated MineCraft/Forge to 1.7.10 levels as yet, what does turtle.inspect() do?
Tweet.
dan200 #353
Posted 23 September 2014 - 09:17 PM
Uploaded a new version. The main change is i've added @API annotations to the API to prevent future crashes caused by API incompatibility like that caused by Project:Red shipping our beta API. If you know a Project:Red maintainer, tell them to download this version and update to the new API!
scifiaholic #354
Posted 27 September 2014 - 03:02 PM
Haha! glad I found this forum, from the basic www.computercraft.info page it looks like this project is MIA. This is one of my most favorite mods, especially when bundled cables work. Being an electrical engineer, wiring things up to a computer is like being in a candy store where everything is free! Boy do I understand being busy too, so no pressure but know this project is much appreciated.
MKlegoman357 #355
Posted 27 September 2014 - 08:33 PM
Haha! glad I found this forum, from the basic www.computercraft.info page it looks like this project is MIA. This is one of my most favorite mods, especially when bundled cables work. Being an electrical engineer, wiring things up to a computer is like being in a candy store where everything is free! Boy do I understand being busy too, so no pressure but know this project is much appreciated.

What do you mean by MIA? This mod is still being worked on, although dan200 haven't worked with it for some time, he's back in business!

Hey all!
Check the OP for a new version, I've fixed pretty much all the big bugs reported so far, and i've added a new feature: turtle.inspect()
Sorry this has been so long. Between all the Minecraft contract work i've been doing and my indie game development, it's been hard to justify spending much time on a hobby I don't earn any money for lately. I'm glad I picked it up again though. If this version passes without any critical bugs being found, we should have a full release soon.

Also, these forums are quite active as well. If you have any programs to show, here's a place for you to post them. Have any questions? We have Q&amp;A section here. This mod will stay alive as long as enthusiasts like you live on earth!
dan200 #356
Posted 27 September 2014 - 10:47 PM
The full release is now out! Thanks for all the testing, everyone.
http://www.computercraft.info/2014/09/27/computercraft-1-64/
ade125 #357
Posted 28 September 2014 - 03:01 AM
Alright.
jrockjake #358
Posted 29 September 2014 - 01:33 AM
The full release is now out! Thanks for all the testing, everyone.
http://www.computerc...utercraft-1-64/

Woo, good job Dan!
dan200 #359
Posted 31 January 2015 - 08:40 AM
Re-opening for the CC1.66 beta!
The main new feature is the Command Computer, but use "help whatsnew" for the full list.
I'm interested to see what people produce with the Command Computer and how usable it is, so post here if you make anything nice or have any feedback.
MKlegoman357 #360
Posted 31 January 2015 - 05:22 PM
Nice! :D/>

So, any one of you people want to make that awesome GitHub-ComputerCraft-code-changes thing? :P/>

EDIT: I'm talking about this thing.

EDIT 2: So, I was too lazy to wait (yeah, I'm so lazy I'm even too lazy to wait) and did my own GitHub-ComputerCraft-version-compare-thing. I hope I didn't brake the CC license, as far as I know Dan allows to use the Lua code freely. You can find the diff here. I think I found something interesting apart from the awesome Command Computers…

EDIT 3: There is now a native way to disable disk startup files for a computer! All you have to do is create a file named '.no_disk_startup'. :D/>
Edited on 31 January 2015 - 05:45 PM
Lignum #361
Posted 31 January 2015 - 06:44 PM
Things I've found:
  • If there's a file called .no_disk_startup, the computer won't boot from disk. In addition to that, command computers can't boot from disk at all.
  • Edit's ctrl menu text is now shorter on pocket computers.
  • The commands api, of course.
  • Exec program that executes commands (just like you would on a command block).
  • textutils.serialiseJSON - Serialises a table to JSON
  • You can now divide and multiply vectors.
  • The string metatable hack no longer works.
Edited on 31 January 2015 - 05:45 PM
MKlegoman357 #362
Posted 31 January 2015 - 06:48 PM
I'd love to see a JSON unserializer to go with the new serializer.
ElvishJerricco #363
Posted 31 January 2015 - 09:05 PM

local bEnableDiskStartup = (commands == nil) and not fs.exists( ".no_disk_startup" )

This is indeed weird… There's always been the safety net that if a computer were to be taken over maliciously, a startup disk would save you. It's not really a big deal. I mean how malicious can you get with highly sandboxed computers in a video game? But it's an interesting change in philosophy.
Shnupbups #364
Posted 31 January 2015 - 11:21 PM
Great, now viruses just have to make a blank file called '.no_disk_startup' and then almost nothing will save you. Especially if you don't have access to the server files…

Anyway, the command computers are awesome, so there's that.
Edited on 31 January 2015 - 10:21 PM
Bomb Bloke #365
Posted 31 January 2015 - 11:39 PM
A startup disk is only helpful if a griefer decides to install a Ctrl+T-ignoring startup script, as opposed to, say, wiping the drive or stealing the whole computer block. The latter options are far easier for them to perform, and I would be highly surprised if anyone here has had a griefer take the former option.

Seems to me that the best protection remains as "physical" - that is to say, surround systems you're worried about with warded blocks or whatever.

Every case I've seen reported where the owner of a system has needed a startup disk to get back in has involved them overriding os.pullEvent then making a mistake in their own code, locking them out of their own computer. They most often serve as a safety net against user error, not malicious activity! So for those who like developing "secure scripts" (imagine a finger-waggling action to go with that particular set of quotes), I recommend against using the new file until you're sure there's no errors to weed out!
ElvishJerricco #366
Posted 01 February 2015 - 05:11 AM
Well, perhaps it would be best if instead of having a ".no_disk_startup" file, we just have a ".no_startup" file, to prevent computers from being able to be taken over while preventing disk startup files.

The downsides are obvious. It slightly defeats the original intent of ".no_disk_startup", but I think it's better than letting a system be taken over.
Edited on 01 February 2015 - 04:11 AM
Shnupbups #367
Posted 01 February 2015 - 07:27 AM
<snip> never mind me, 'twas an accident
Edited on 01 February 2015 - 06:28 AM
dan200 #368
Posted 01 February 2015 - 08:24 AM

local bEnableDiskStartup = (commands == nil) and not fs.exists( ".no_disk_startup" )

This is indeed weird… There's always been the safety net that if a computer were to be taken over maliciously, a startup disk would save you. It's not really a big deal. I mean how malicious can you get with highly sandboxed computers in a video game? But it's an interesting change in philosophy.

This is a very good point. I'll remove the feature, it's not worth plugging a small security hole by introducing a bigger one! Disk startup remains disabled on command computers though, otherwise it would be trivial for non-admin users to use them and takeover a server.
Bomb Bloke #369
Posted 01 February 2015 - 09:40 AM
I dunno, I kinda like the idea of being able use startup disks with creative-mode computers (if only because networking a single disk drive to multiple computers is an easy way to make them share the one startup file). Would you consider adding an eg ".use_disk_startup" file-check for creative-mode computers, just so the option's there?
dan200 #370
Posted 01 February 2015 - 10:25 AM
You can just put shell.run( "disk/startup" ) in startup to opt-in to that
Bomb Bloke #371
Posted 01 February 2015 - 02:02 PM
D'oh! How do I manage to miss these things….

Anyway, here's a cute little "proof-of-concept" script. Plonk down a command computer somewhere (a decent distance from anything important to you) and execute:

pastebin run ZbZiB9GR

It's a bit messy and crude, but it could be polished up into something pretty cool. :)/>

Oh, how about more disk space for command computers?
Edited on 01 February 2015 - 01:04 PM
Exerro #372
Posted 01 February 2015 - 06:42 PM
I've also done some testing and found that running commands causes a coroutine yield, so by running every command in an individual coroutine you can get some decent building speeds. Not sure if this puts a lot of strain on the server, but running ~100 at a time would be fine I'm sure.

I'm definitely going to make a world edit API with these new computers, and some kind of game engine… an RPG game engine maybe… imagine the possibilities.

Edit: further testing has shown that commands (after being executed) fire "task_completed" events, which determines what the command call returns (true or false, "Command failed"). I have, however, created a setblock command that also takes replace_block as an optional parameter which causes it to only replace blocks of a certain type at the cost of a bit of lag. Now for boxes, spheres and cylinders…
Edited on 01 February 2015 - 06:43 PM
SquidDev #373
Posted 01 February 2015 - 07:49 PM
I've also done some testing and found that running commands causes a coroutine yield, so by running every command in an individual coroutine you can get some decent building speeds. Not sure if this puts a lot of strain on the server, but running ~100 at a time would be fine I'm sure.

I'm definitely going to make a world edit API with these new computers, and some kind of game engine… an RPG game engine maybe… imagine the possibilities.

You can also use execAsync (or async.functionName) to get a similar effect I think.

When 1.8 comes out we can use fill instead, which should speed up drawing even more.

I'm wondering if commands.getBlockInfo could return NBT as well? I'm not that well versed on Forge/Minecraft internals so I don't know how feasible this is.

I am very excited about this update though! Thanks Dan!
Edited on 01 February 2015 - 06:50 PM
dan200 #374
Posted 01 February 2015 - 07:53 PM
I've also done some testing and found that running commands causes a coroutine yield, so by running every command in an individual coroutine you can get some decent building speeds. Not sure if this puts a lot of strain on the server, but running ~100 at a time would be fine I'm sure.

I'm definitely going to make a world edit API with these new computers, and some kind of game engine… an RPG game engine maybe… imagine the possibilities.

Edit: further testing has shown that commands (after being executed) fire "task_completed" events, which determines what the command call returns (true or false, "Command failed"). I have, however, created a setblock command that also takes replace_block as an optional parameter which causes it to only replace blocks of a certain type at the cost of a bit of lag. Now for boxes, spheres and cylinders…

Yep, commands.async.whatever() or commands.execAsync( "whatever") will do issue the command without waiting for the return value. Should be well documented in the help file
masterdisasterHD #375
Posted 01 February 2015 - 08:30 PM
Any chance of colorable pocket computers in the next version?
pcguru000 #376
Posted 01 February 2015 - 08:42 PM
huge thanks to dan for the 1.66 beta update fixing the rendering bug for monitors… was killing my teleportation system to my new dance dance hall :)/> good work :D/>
CreeperWiz #377
Posted 02 February 2015 - 09:59 PM
Any chance of colorable pocket computers in the next version?
? Like turtles you mean?
Edited on 02 February 2015 - 08:59 PM
Thatparadox #378
Posted 03 February 2015 - 02:10 AM
Loving the Command Computer. I can't figure out how you add data to spawn mobs with certain properties (NBT tags).

So if I'm trying to spawn an invincible cow in console it would be: /summon Cow ~0 ~0 ~0 {Invulnerable:1}

I can summon a cow with commands.summon("Cow", x, y, z) but how do I add the {Invulnerable:1} to the code?
Edited on 03 February 2015 - 01:12 AM
MKlegoman357 #379
Posted 03 February 2015 - 07:12 AM
You can either pass it as a string or use the new textutils.serialiseJSON( table ) to convert a table into JSON. You can also pass the table directly.

EDIT: example:


local parameters = { Invulnerable = 1 }

commands.summon( "Cow 15 75", 50, parameters ) --# yes, you can put all arguments into one string

EDIT 2: you can actually pass a table directly into commands.*. Updated the example.
Edited on 03 February 2015 - 06:30 AM
masterdisasterHD #380
Posted 03 February 2015 - 07:19 AM
Any chance of colorable pocket computers in the next version?
? Like turtles you mean?

Yeah
dan200 #381
Posted 03 February 2015 - 07:28 AM
You can either pass it as a string or use the new textutils.serialiseJSON( table ) to convert a table into JSON.

EDIT: example:


local parameters = { Invulnerable = 1 }

local paramsJSON = textutils.serialise( parameters )

commands.summon( "Cow 15 75", 50, paramsJSON ) --# yes, you can put all arguments into one string

You can also just pass it a table, it'll call serialiseJSON by itself
Thatparadox #382
Posted 03 February 2015 - 08:33 AM
You can either pass it as a string or use the new textutils.serialiseJSON( table ) to convert a table into JSON.

EDIT: example:


local parameters = { Invulnerable = 1 }

local paramsJSON = textutils.serialise( parameters )

commands.summon( "Cow 15 75", 50, paramsJSON ) --# yes, you can put all arguments into one string

Oh wow, yeah ok I didn't realize you can just put a string in there like commands.summon( "Cow ~0 ~0 ~0 {Invulnerable:1}" )

Thanks for the help!
Bomb Bloke #383
Posted 03 February 2015 - 10:38 AM
I've also done some testing and found that running commands causes a coroutine yield, so by running every command in an individual coroutine you can get some decent building speeds. Not sure if this puts a lot of strain on the server, but running ~100 at a time would be fine I'm sure.

Running setblock in async mode seems to run pretty much instantly, in server terms… so long as the target block is already the same as the requested block, and the default "replace" action is in use.

Spamming actual change requests that have to be actioned, on the other hand, causes a bit of… stutter, shall we say. A hundred blocks at a time isn't anything to write home about, but I accidentally spammed about 200,000 changes to stone, and it took five or ten minutes before my game's framerate came back up from 2FPM and I could access the computer's interface again…

What surprised me is that the yield protection didn't kill it. In my prior tests I found that async will trigger yield-related crashes if "miss-used", but in the above example it didn't. I guess the game's tick rate fell as well, and so as far as ComputerCraft was concerned nothing was wrong. The commands would've all been passed to the server side by then anyways…

Speaking of async commands, I did see execAsync when I first looked at the help!… Then promptly forgot about it, as I tried to work out how command blocks work. I've never played much with them, nor with server commands in general, really. Still trying to work out if there's a way to read signs or check chest contents. I get the impression there isn't.

Anyway! I've tightened up the scanning script a bit. Although reading in world data is still quite slow, it can now viably handle much larger structures:

pastebin get pXjdQDf6 worldporter
pastebin get cUYTGbpb package
package get PVu6C3qc
worldporter build BBCastle 54
dan200 #384
Posted 03 February 2015 - 10:57 AM
Hmm, I could probably forcibly yield even in the async case if the size of the task queue rose beyond 1000 or so. shouldn't break too much
Bomb Bloke #385
Posted 03 February 2015 - 11:06 AM
Ah, this is what I'm saying - it seemed it didn't need to yield despite executing for far longer than ten seconds. My assumption is that ComputerCraft treats "ten seconds" as "200 server ticks", so if the server tick rate drops, then the script can run much longer without issue. Making async yield won't change any of that, and really I don't think there's anything to "fix" there.
dan200 #386
Posted 03 February 2015 - 11:11 AM
yes, but if it yielded, you wouldn't get 200,000 commands executed in one very long tick, you'd get 100 each tick for 200 ticks
Bomb Bloke #387
Posted 03 February 2015 - 11:42 AM
Given that yielding doesn't take a tick, and that CC code can execute over multiple ticks without yielding, I'm… completely lost. Are you talking about waiting on a delayed timer event or something, in the manner that sleep does?

If that's it, then I'm not really in favour of the idea. Seems to me that much of the benefit of using async is that you don't need to worry about it yielding - making it do so under "some conditions" complicates matters. Leave it up to the script author, I say - if they have access to the command in the first place, it's a fair bet that they're high-ranked enough on their server to be trusted to use it, and even at 100 commands a tick any mistakes are going to execute far too quickly for anyone to prevent them.
dan200 #388
Posted 03 February 2015 - 01:53 PM
yes, i meant yield and then resume once the queue had reduced to a manageable number (which will happen when the task queue has been emptied, which is once per tick).

now I think about it though, I don't have to yield when the command is being queued up, i just have to limit the rate that commands are executed to X per tick
Bomb Bloke #389
Posted 04 February 2015 - 03:28 AM
commands.list() seems a bit… odd. Putting aside that it seems to be there instead of the "list" server command, if I dump its output into a table, then table.sort() won't work on that table (no errors, but the content remains in the same order). Manually copying each index into another table results in something that can be sorted, but I've got no idea why this extra step is necessary.

It also mentions the "help" command, which doesn't have a respective function in the "commands" table (unlike all the other entries). This can still be ran with commands.exec() of course… but it only returns "true", making it seemingly useless. "seed" also only returns true. Where's the command output go?

Then there's the "forge" command… can't find any documentation for it, and I couldn't guess the correct parameters for it. What's it do?
Xukkorz #390
Posted 05 February 2015 - 06:35 PM
Is there a possibility of increasing range on wireless transmission for wireless modems wrapped to command computers? If not that then maybe "command" or "Admin" versions of peripherals that have extended functionality for mapping. I want to use them for a custom map but the range limitation is hard to work around and while having Skynet in Minecraft seems good its probably a bad idea.
Lyqyd #391
Posted 05 February 2015 - 07:45 PM
The modem range is configurable, which may be useful for your custom map project if you're shipping the mod configs as well.
Bomb Bloke #392
Posted 05 February 2015 - 09:09 PM
Since you mention it, how about letting Command computers re-write ComputerCraft's config values (even if the changes only apply to the current world, and then only until it's restarted)?

It'd also be nice if they could mount the drives of other computers, and re-write them remotely. You'd need a way of getting the ID of remote systems, though…

Come to think of it, if such a thing were implemented then an "adventure mode" computer would go hand-in-hand with Command computers. A system which won't boot from floppy, and doesn't have built-in access to the "edit" or "pastebin" scripts.
immibis #393
Posted 05 February 2015 - 09:33 PM
Since command computers are admin-only, what's the reasoning behind restricting the rate commands can be run at?
Cranium #394
Posted 05 February 2015 - 11:15 PM
Since command computers are admin-only, what's the reasoning behind restricting the rate commands can be run at?
That's just limited by how fast the computers can run period.
Thatparadox #395
Posted 05 February 2015 - 11:51 PM
not sure if this is a bug or I'm just being an idiot. Every computer is telling me I "must be an OPPed player in Creative mode" when I try to look at them (not turtles) like when you try to look at a command computer. This still happens when I create a new map in any game mode. Is it something I'm doing or should I submit a more detailed bug report?
Bomb Bloke #396
Posted 05 February 2015 - 11:54 PM
Sounds like that'll already be fixed for the (as yet unreleased) pr4.

Cranium, read further up the page to see what immibis is talking about. Personally I don't so much mind the idea so long as it doesn't trigger a yield. Spam too many commands per tick and the whole server chugs. I'm sorta on the fence though; I'd imagine that making the server chug gets the job done faster. Hrm.
Edited on 05 February 2015 - 11:02 PM
Lyqyd #397
Posted 06 February 2015 - 02:26 AM
I'd agree with Dan on this one. You don't really want to have your mod kill the tick rate if it doesn't need to, and from what it sounds like, doing fewer commands over more ticks may not even be slower, which makes it the better option in my opinion.
dan200 #398
Posted 08 February 2015 - 08:58 AM
New version in OP
MKlegoman357 #399
Posted 08 February 2015 - 11:09 AM
New version in OP

You've put the 1.64pr6 version of ComputerCraft, not 1.66pr4!
dan200 #400
Posted 08 February 2015 - 12:45 PM
Haha! my bad. Fixed
kreezxil #401
Posted 10 February 2015 - 09:46 PM
How much for a 1.8 version?
TurtleHunter #402
Posted 11 February 2015 - 04:16 PM
How much for a 1.8 version?

$5000, Cash please
Edited on 11 February 2015 - 03:16 PM
kreezxil #403
Posted 11 February 2015 - 06:15 PM
How much for a 1.8 version?

$5000, Cash please

You're not Dan200!
masterdisasterHD #404
Posted 11 February 2015 - 07:43 PM

I think he knows :P/>
TurtleHunter #405
Posted 11 February 2015 - 08:42 PM
:P/>
KamranMackey #406
Posted 12 February 2015 - 02:02 AM
Is there a public changelog available for this release yet?
MaxKoinune #407
Posted 13 February 2015 - 12:10 AM
It's a CC addon that i have installed or there's a new computer? it's called "Command Computer"
Bomb Bloke #408
Posted 13 February 2015 - 12:22 AM
Yes, the command computer is part of the 1.66 update.

Type "help whatsnew" into any computer to see the changes between 1.66 and 1.65. I don't think there's a list of the changes between 1.66pr3 and 1.66pr4 documented anywhere, however.
MaxKoinune #409
Posted 13 February 2015 - 12:53 AM
Interesting, what i can do with this new computer? and there is no "Command Pocket Computer"?
KingofGamesYami #410
Posted 13 February 2015 - 01:01 AM
It's named a "Command Computer" and has a texture similar to a vanilla command block. What do you think is the most likely use?
Bomb Bloke #411
Posted 13 February 2015 - 01:34 AM
Use that help command above for more info on their usage.
oeed #412
Posted 13 February 2015 - 06:07 AM
Dan, I'd really like to get your thoughts behind not having some form of pocket computer (or even better, all computers) alert - whether it be a beep or (probably fairly difficult) vibrate. It just seems like it's something that would be so useful yet I haven't really seen any reasoning for it not to be included.
Edited on 13 February 2015 - 05:08 AM
MKlegoman357 #413
Posted 13 February 2015 - 01:09 PM
Dan, I'd really like to get your thoughts behind not having some form of pocket computer (or even better, all computers) alert - whether it be a beep or (probably fairly difficult) vibrate. It just seems like it's something that would be so useful yet I haven't really seen any reasoning for it not to be included.

Here are his thoughts about it:

I might add this when i get some time.
Geforce Fan #414
Posted 13 February 2015 - 06:49 PM
In my opinion, I think disabling boot from disks is AWESOME! Now people will quit leaving computers unlocked or left on or with no password locks at all.
Not to mention viruses are possible now. This will bring a new element of fun to CC!
Bomb Bloke #415
Posted 13 February 2015 - 10:10 PM
That only applies to command computers, which require creative-mode access to get into in the first place.
CCGrimHaxor #416
Posted 14 February 2015 - 10:05 AM
Why so little suggestions being added?
Bomb Bloke #417
Posted 14 February 2015 - 10:50 AM
Many are obvious, and would've been added long before they were ever suggested - if Dan had infinite amounts of free time.

Many, on the other hand, are just plain rubbish. Even some which sound good may not be so easy to apply as they seem, or may have unfortunate side effects.
dan200 #418
Posted 15 February 2015 - 07:26 PM
ComputerCraft 1.7 has now been released (I bumped the version number). Thanks for the testing everyone!
dan200 #419
Posted 31 March 2015 - 10:42 AM
Re-opened for 1.74!
MKlegoman357 #420
Posted 31 March 2015 - 12:15 PM
There are some pretty nice new features :D/>. Here's the diff by the way ;)/>.
Wojbie #421
Posted 31 March 2015 - 12:19 PM
For pepole interested in tab-completition it is split in textile api and bios read() function with a little inbetween inside lua and edit programs. Interesting read for sure will see how far I can make it dance. It should be doable to make it autocomplete filenames, paths and program names for shell. This will be fun to code!

Edit: Both gray colors are usable. That makes a huge difference. Feel the color! Oh and key_up and mouse_up will be fun to test.
Edited on 31 March 2015 - 10:29 AM
Bomb Bloke #422
Posted 31 March 2015 - 12:45 PM
The notes from the "whatsnew" app read (taken from the link provided by MKlegoman, as I can't even get the current pr to launch - I assume it's working for you guys?!):

+* Added tab-completion to the "edit" and "lua" programs.
+* Added textutils.complete(), and a completion function parameter to read().
+* Added "key_up" and "mouse_up" events.
+* Non-advanced terminals now accept both grey colours.
+* Added a "Run" button to the edit program on Advanced terminals.
+* Turtles now respect server spawn protection (configurable).
+* Added a turtle permissions API for mod authors.
+* Command Computers can no longer be broken by survival players.
+* Fixed the "pick block" key not working on ComputerCraft items in creative mode.
+* Added a "_CCVERSION" constant.
Bomb Bloke #423
Posted 31 March 2015 - 02:57 PM
Ah, that's better - pr14 is booting fine. :)/>

Auto-complete seems to be working well enough, though I'm a little surprised it's not active in the shell.

Command Computers are now indeed immune to survival-mode players (… and turtles, tnt, pistons + presumably everything else). The only thing left is perhaps removing their peripheral functions so that survival mode players can't eg restart or shut them down, perhaps.

The behaviour on "up" events works such that you must initially press down while the computer's GUI is active, and in the case of mouse events you must specifically click over the GUI, in order for them to fire when you let go. They don't automatically fire if the user closes the GUI, nor do you get a mouse_up event if the cursor isn't within the GUI's area on release. Minor niggles which're quite possible for scripters to code around, and it'll be interesting to see some drag'n'drop interfaces coded with them.

All in all, lookin' good! :)/>
MKlegoman357 #424
Posted 31 March 2015 - 04:51 PM
Updated the diff on GitHub from pr13 to pr14! Just follow the link for another surprise!
Wojbie #425
Posted 31 March 2015 - 04:59 PM
Hmm. getTextColour and getBackgroundColour eh? That will make some parts of code less complicated.

I am with love with this auto-completion system. Got half-finished prototype for shell auto-completion function. After i finish it i will post if for other pepole to test. And i didn't crashed once on this test version. Makes me feel bad. Test versions are supposed to crash thats when you are testing stuff :D/>.
MKlegoman357 #426
Posted 31 March 2015 - 07:00 PM
Well, in addition to getting the terminal colors I'd say: improve all paintutils functions! Make them set the colors back to what it was when they are done drawing.

EDIT: total derp. That would brake a lot of scripts. I think I had something in mind for those function though, but I don't remember what…
Edited on 31 March 2015 - 07:41 PM
ElvishJerricco #427
Posted 31 March 2015 - 08:03 PM
Wonderful update. Are there any plans to bring auto complete to the shell?
Wojbie #428
Posted 31 March 2015 - 08:22 PM
Here is prototype of shell auto complete i am working on.

http://pastebin.com/iAisZ9VA

Right now it only lists all programs on empty input.
If it recognizes one of 4 basic programs it will suggest what is needed next and if there is space after program name it then will give you list of options.
Right now it only recognizes dj,monitor,pastebin and gps.

Most of code is based on my extended-shell project. And that project is full of spagetti code so starting clean is a good idea.
Edited on 31 March 2015 - 06:23 PM
Bomb Bloke #429
Posted 31 March 2015 - 09:20 PM
Well, in addition to getting the terminal colors I'd say: improve all paintutils functions! Make them set the colors back to what it was when they are done drawing.

That, um, would break a lot of scripts which rely on the current behaviour. Is it really a good idea?
Wojbie #430
Posted 31 March 2015 - 09:26 PM
Well, in addition to getting the terminal colors I'd say: improve all paintutils functions! Make them set the colors back to what it was when they are done drawing.
Well what if i want to start drawing in another color after they are done? They change change color back at the end and then I change it to something else i want. Thats two changes instead of one. Kinda ineffective.

Sidenote: Anyone running beta server? That would be great way to test SMP part of update.
Edited on 31 March 2015 - 07:27 PM
MKlegoman357 #431
Posted 31 March 2015 - 09:42 PM
Well, in addition to getting the terminal colors I'd say: improve all paintutils functions! Make them set the colors back to what it was when they are done drawing.

That, um, would break a lot of scripts which rely on the current behaviour. Is it really a good idea?
Well, in addition to getting the terminal colors I'd say: improve all paintutils functions! Make them set the colors back to what it was when they are done drawing.
Well what if i want to start drawing in another color after they are done? They change change color back at the end and then I change it to something else i want. Thats two changes instead of one. Kinda ineffective.

Yeah, I derped on this part…
dan200 #432
Posted 02 April 2015 - 11:13 AM
Posted a new version, this is the current state of the changelog:


New Features in ComputerCraft 1.74:
* Added tab-completion to "edit", "lua" and the shell.
* Added textutils.complete(), fs.complete(), shell.complete() and shell.setCompletionFunction().
* Added an autocomplete parameters to read().
* Added "key_up" and "mouse_up" events.
* Non-advanced terminals now accept both grey colours.
* Added term.getTextColour(), term.getBackgroundColour() and term.blit().
* Improved the performance of text rendering on Advanced Computers.
* Added a "Run" button to the edit program on Advanced Computers.
* Turtles now respect server spawn protection (configurable).
* Added a turtle permissions API for mod authors.
* Command Computers can no longer be broken by survival players.
* Fixed the "pick block" key not working on ComputerCraft items in creative mode.
* Fixed the "edit" program being hard to use on certain European keyboards.
* Added a "_CCVERSION" constant.
SquidDev #433
Posted 02 April 2015 - 12:01 PM
The shell completion looks really good. Thanks so much for adding this. Just so people know, blit allows you to draw one line to the terminal in the format blit(sText, sForeground, sBackground) using hex as the colours. I don't know what the performance gains are but I'm guessing they are pretty good.

Thanks Dan!
Alekso56 #434
Posted 02 April 2015 - 12:08 PM
here be diff
Bomb Bloke #435
Posted 02 April 2015 - 01:04 PM
blit errors the window API in a rather messy way if you try to go outside the bounds of a window with it… It also allows colour rendering on a non-advanced computer! :P/>

Great to see autocomplete in the shell. :)/>
Wojbie #436
Posted 02 April 2015 - 01:19 PM
Thanks for the diff. I am really interested in new shell autocomplete. It looks like instead of making next version of extended shell all I will have to do is to make patch containing extra autocomplete functions. And way it's setup I can see programs adding autocomplete data to shell automatically during first run.
CrazedProgrammer #437
Posted 02 April 2015 - 01:26 PM
This is amazing!

I love the auto completion and the new mouse_up and key_up events.
Is using term.blit faster than using term.set______Color and term.write()?
If so, I'm going to make use of it in my Surface API.
Bomb Bloke #438
Posted 02 April 2015 - 01:36 PM
I suspect it'll depend on the scenario; say you want to write "This is a line of text", using white text on a black background. Using blit, it might go something like this:

local myText = "This is a line of text"
term.blit(myText, string.rep("f", #myText), string.rep("0", #myText))

That's rather inconvenient compared to using term.write, and becomes moreso as your text gets longer and starts to cover multiple lines.

But if you want to do rainbow colours, then:

term.blit("RAINBOW!","01234567","89abcdef")

That's a lot easier than what you'd previously've needed to do, and will almost certainly execute faster, too.
Wojbie #439
Posted 02 April 2015 - 02:13 PM
I just realized. Way shell auto-complete its setup currently its impossible to make complicated auto-completition due to fact that and program is auto-completing 2nd word in argument list it will not be able to consider arguments entered before.. Per example program redstone has 3 possible arguments in first spot. Probe set and pulse. And each one of those has slightly different arguments after them. Well it will be fun to modify for my likes after all.
Anyone tested new window code? Is it faster after this change?
dan200 #440
Posted 03 April 2015 - 11:32 PM
Posted pr18. Includes tab-completion for almost all built-in programs.
MKlegoman357 #441
Posted 03 April 2015 - 11:39 PM
So there is now:

  • turtle.checkRedstone()
  • turtle.checkRedstoneUp()
  • turtle.checkRedstoneDown()
  • turtle.setRedstone( value )
  • turtle.setRedstoneUp( value )
  • turtle.setRedstoneDown( value )

But are they basically just rs.getInput("front"/"top"/"bottom") and rs.setOutput("front"/"top"/"bottom", value)? Or did I miss something?
Bomb Bloke #442
Posted 03 April 2015 - 11:46 PM
Well, if I stick a redstone torch in front of a turtle, turtle.checkRedstone() returns false whereas rs.getInput("front") returns true. Dunno if they're supposed to be the same, but currently they're not.

turtle.setRedstone(true) does output a signal, though.
Wojbie #443
Posted 03 April 2015 - 11:46 PM
Yay! tPreviousText is argument for autocomple function now! Its glorious and exactly what i needed! And all those automagic completion functions! I am gonna enjoy adding auto-complete support to all programs i will make from now on.

Well, if I stick a redstone torch in front of a turtle, turtle.checkRedstone() returns false whereas rs.getInput("front") returns true. Dunno if they're supposed to be the same, but currently they're not.

Can you show photo for your setup? Its working correctly for me.

EDIT: Also
completeMultipleChoice( sText, tOptions, bAddSpaces )
function sounds like good API function. but witch api would it fit in? textutils?
Edited on 03 April 2015 - 09:53 PM
Bomb Bloke #444
Posted 04 April 2015 - 02:51 AM
Can you show photo for your setup? Its working correctly for me.

A photo of… what, a turtle with a redstone torch in front of it? Really? ;)/>

Playing about further, it seems to only affect a turtle I'd placed before the update - which, come to think of it, I may've messed up somewhat using NBTEdit. Making it turn fixed it, but this does suggest that turtle.checkRedstone() isn't simply calling rs.getInput() (which worked), and I'm still unsure as to why redstone functionality is being copied into the turtle API.

but witch api would it fit in? textutils?

Sounds like a text-based utility to me.
CrazedProgrammer #445
Posted 05 April 2015 - 04:01 PM
It seems very strange, but term.blit("test", "0000", "eeee") draws test with black text and an orange background.
The colors API tells that 0 is white, and e is red. Maybe the colors are accidentally inverted (0 -> f - 0 = f, e -> f - e = 1).
Is this a bug, or is it intended?
I'm using CC 1.74pr18.
Edited on 05 April 2015 - 02:04 PM
Lignum #446
Posted 05 April 2015 - 06:39 PM
Maybe the colors are accidentally inverted (0 -> f - 0 = f, e -> f - e = 1).

They are. If I recall correctly the CC term code uses two strings to store the display. One is used for the text, the other for the background colours. A character in the text string is represented by [colour code][character] and a background colour in the colour string is just the colour code. I'm not sure but I think that these colour codes differ from paint's colour codes in that they're inverted. If I'm right, then you're wrong in using the paint colour codes.

However, it would be simpler if term.blit just converted the paint colours to the CC format…
CrazedProgrammer #447
Posted 05 April 2015 - 07:48 PM
Maybe the colors are accidentally inverted (0 -> f - 0 = f, e -> f - e = 1).

They are. If I recall correctly the CC term code uses two strings to store the display. One is used for the text, the other for the background colours. A character in the text string is represented by [colour code][character] and a background colour in the colour string is just the colour code. I'm not sure but I think that these colour codes differ from paint's colour codes in that they're inverted. If I'm right, then you're wrong in using the paint colour codes.

However, it would be simpler if term.blit just converted the paint colours to the CC format…
Hmm interesting. I don't mind it very much (I'm all about performance) but it can be confusing to some users.
Bomb Bloke #448
Posted 05 April 2015 - 11:06 PM
Once the changes are finalised, term.blit() will go into the wiki, and everyone will find themselves using that page as a reference (as opposed to paint).
GopherAtl #449
Posted 06 April 2015 - 01:00 AM
it's not a bug, exactly, but it seems it really should be changed to match. If nothing else, the paint api really ought to be rewritten to use this, and even if it's not, people will be writing their own code to do more faster rendering of images created in paint, and having them use different notation would be incredibly annoying.
dan200 #450
Posted 06 April 2015 - 10:59 AM
It seems very strange, but term.blit("test", "0000", "eeee") draws test with black text and an orange background.
The colors API tells that 0 is white, and e is red. Maybe the colors are accidentally inverted (0 -> f - 0 = f, e -> f - e = 1).
Is this a bug, or is it intended?
I'm using CC 1.74pr18.

This is a bug, could you please report it on the bug report thread?
dan200 #451
Posted 09 April 2015 - 01:29 PM
Posted a new version to the OP.
It fixes some bugs, and adds a Lua 5.2 compatibility layer in anticipation of a possible version upgrade in the future.
oeed #452
Posted 09 April 2015 - 01:31 PM
Posted a new version to the OP.
It fixes some bugs, and adds a Lua 5.2 compatibility layer in anticipation of a possible version upgrade in the future.

Yes, yes, and yes.

Oh and yes.

:D/>
SquidDev #453
Posted 09 April 2015 - 01:44 PM
Posted a new version to the OP.
It fixes some bugs, and adds a Lua 5.2 compatibility layer in anticipation of a possible version upgrade in the future.

Whoooh! Just wondering if this would mean the ability to have several computer threads instead of one as LuaJ 3.0 supports it?
ElvishJerricco #454
Posted 09 April 2015 - 01:52 PM
Posted a new version to the OP.
It fixes some bugs, and adds a Lua 5.2 compatibility layer in anticipation of a possible version upgrade in the future.


Oh… Oh god Dan. Really not looking forward to losing non-top-level-function environments…
dan200 #455
Posted 09 April 2015 - 01:57 PM
You know about the environment parameter Lua 5.2 adds to load() right? There were no uses of setfenv in CC that weren't trivially replaceable with that. Do you regually change the environment of a function long after it's been created?
apemanzilla #456
Posted 09 April 2015 - 01:57 PM
Posted a new version to the OP.
It fixes some bugs, and adds a Lua 5.2 compatibility layer in anticipation of a possible version upgrade in the future.

Woo! I can't wait!

Would it be possible to recreate setfenv and getfenv on the Java side of CC?

Edit:
You know about the environment parameter Lua 5.2 adds to load() right? There were no uses of setfenv in CC that weren't trivially replaceable with that. Do you regually change the environment of a function long after it's been created?
I was not aware of this. I'll look into it

Edit 2:

The load function seems to only accept strings of code or a function that returns a code string. Does this mean that the only way to run a function in an environment with it is by running something like:

load(string.dump(func), nil, "b", env)
Edited on 09 April 2015 - 12:02 PM
dan200 #457
Posted 09 April 2015 - 02:06 PM
One of the key features of Lua 5.2 is you can't change the environment of a function after it's been created. So yeah, you can't take a preexisting function and run it in a new envionment.

Edit: actually, you may be able to achieve something using the _ENV upvalue, but that can only be partially supported on our current compatibility layer. I suggest reading what the Lua manual has to say on the topic: http://www.lua.org/manual/5.2/manual.html#2.2
apemanzilla #458
Posted 09 April 2015 - 02:14 PM
One of the key features of Lua 5.2 is you can't change the environment of a function after it's been created. So yeah, you can't take a preexisting function and run it in a new envionment.

Edit: actually, you may be able to achieve something using the _ENV upvalue, but that can only be partially supported on our current compatibility layer. I suggest reading what the Lua manual has to say on the topic: http://www.lua.org/m...manual.html#2.2

So, right now it looks like there are two ways to have getfenv and setfenv-like implementations:
  • Using the debug library to set/get the _ENV upvalue (and very carefully hiding the debug library from all other programs)
  • Using string.dump and load to redefine the function in a new environment
dan200 #459
Posted 09 April 2015 - 02:19 PM
I will not be reimplementing getfenv or setfenv when we upgrade to Lua 5.2, doing so erases the benefit of upgrading to Lua 5.2. This won't be happening until at least one version after this one, however, so you have time to upgrade your programs.
apemanzilla #460
Posted 09 April 2015 - 02:20 PM
I will not be reimplementing getfenv or setfenv when we upgrade to Lua 5.2, doing so erases the benefit of upgrading to Lua 5.2. This won't be happening until at least one version after this one, however, so you have time to upgrade your programs.
Alright, so then it sounds like we'll be using string.dump if we ever need to change a function environment.

a = "global variable"
local b = function() print(a) end
local env = {print = print, a = "environment variable"}
local c = load(string.dump(b ), nil, "b", env)
c()
This code outputs "environment variable" in Lua 5.2.
Edited on 09 April 2015 - 12:24 PM
dan200 #461
Posted 09 April 2015 - 02:23 PM
Do you really change functions environments except just after creating them in your program? I'm struggling to see the use case.
apemanzilla #462
Posted 09 April 2015 - 02:26 PM
Do you really change functions environments except just after creating them in your program? I'm struggling to see the use case.

It's more for use in operating systems and other high-level programs where sandboxing is an issue. You may want to sandbox code someone else has created, perhaps replacing os.shutdown and os.reboot with functions that don't do anything.

You can also instead just swap the global environment temporarily, but there are other cases where it can be useful.
Edited on 09 April 2015 - 12:26 PM
dan200 #463
Posted 09 April 2015 - 02:35 PM
But surely the users programs are loaded from files? Meaning you can safely sandbox them on load time.
SquidDev #464
Posted 09 April 2015 - 02:37 PM
Do you really change functions environments except just after creating them in your program? I'm struggling to see the use case.

The only time I've ever needed to do it was porting over the Busted framework. This sets the local environment on the fly so tests do not have access to the main suite, etc… Though it should be possible to just rewrite the entire file's table to do the same thing. I don't see any harm in having get/setfenv reimplemented as if we want to sandbox, we can always remove them.
Wojbie #465
Posted 09 April 2015 - 02:51 PM
Wait does that mean we will [eventually] get Loved/Hated Goto! This will be interesting.
Edited on 09 April 2015 - 12:52 PM
dan200 #466
Posted 09 April 2015 - 02:58 PM
Wait, they added goto to lua? What a time to be alive.
apemanzilla #467
Posted 09 April 2015 - 03:01 PM
Wait, they added goto to lua? What a time to be alive.

Yeah, and a bunch of other cool stuff in Lua 5.3. Goto is from 5.2 however.

while true do
  goto Test
end
::Test::
print("done!")
Edited on 09 April 2015 - 01:06 PM
Wojbie #468
Posted 09 April 2015 - 03:05 PM
One of places i can see Goto getting usefull in CC? Excavate program. All those

if done then
  break
end
parts in nested loops replaced with one label and few gotos. No need for repeated breaks!


Yeah, and a bunch of other cool stuff in Lua 5.3. Goto is from 5.2 however.
Is Lua 5.3 backwards compatible with 5.2?
Wait never mind that was stupid question. Of course its not. 5.2 looks nicer anyways.
Edited on 09 April 2015 - 01:10 PM
MKlegoman357 #469
Posted 09 April 2015 - 04:24 PM
Although I don't like the function environments change in Lua 5.2 it is still a very nice change. Actually, would it be possible to port it straight to Lua 5.3, it adds some new interesting things. Anyway, in addition to Lua 5.2 I'd like to see full support of the standard Lua libraries. I really don't see why they are not full, almost every one of them can be rewritten in plain CC Lua. It would really help when you want to use a 'native' Lua library written by other people, you wouldn't have to modify them anymore. Of course, there shouldn't be any support for C libraries.
Edited on 09 April 2015 - 02:25 PM
apemanzilla #470
Posted 09 April 2015 - 04:56 PM
Although I don't like the function environments change in Lua 5.2 it is still a very nice change. Actually, would it be possible to port it straight to Lua 5.3, it adds some new interesting things. Anyway, in addition to Lua 5.2 I'd like to see full support of the standard Lua libraries. I really don't see why they are not full, almost every one of them can be rewritten in plain CC Lua. It would really help when you want to use a 'native' Lua library written by other people, you wouldn't have to modify them anymore. Of course, there shouldn't be any support for C libraries.
LuaJ only supports up to Lua 5.2 at the moment.
Bomb Bloke #471
Posted 09 April 2015 - 10:27 PM
One of places i can see Goto getting usefull in CC? Excavate program. All those

if done then
  break
end
parts in nested loops replaced with one label and few gotos. No need for repeated breaks!

You've already got the option of bundling the whole nested loop structure into a function, which you can then simply return from at any point.

Goto is, of course, a more elegant solution. Relatively speaking.
CodeWafels #472
Posted 09 April 2015 - 10:31 PM
what are the new things in this devbeta?
apemanzilla #473
Posted 09 April 2015 - 10:49 PM
Edit: Nvm, I derped.
Edited on 09 April 2015 - 08:58 PM
ElvishJerricco #474
Posted 10 April 2015 - 10:25 AM
Do you really change functions environments except just after creating them in your program? I'm struggling to see the use case.

LuaLua is one case where it's necessary. It's a language level extension on Lua for CC, and its runtime depends on being able to change function environments.

Also, there are some weird use-cases where you want to bundle an API with a program. For example, in Grin, I have several APIs I need to use that I have written to work as ordinary CC APIs. But one of Grin's features is its ability to work from a simple "pastebin run" command, so it all needs to be one file. My solution is to keep the APIs in the git repo, and use a text substitution system to insert the APIs within functions that get their environments set.


function json_api()
	@JSON@
end
local json = {}
setfenv(json_api, json)
json_api()

and then the text substitution system replaces @JSON@ with the contents of the json API file.

It's kinda dirty, but the point is that there are tons of odd-ball use-cases for function environments.

Then again I guess solutions that require forcibly changing environments are kind of like this.
SquidDev #475
Posted 10 April 2015 - 10:35 AM
-snip-
This is another case which is bugging me. In the case of Grin you have direct control over the source so you can always just add a local _ENV = setmetatable({}, {__index = getfenv()}) at the top of functions. I'm all for this change to Lua 5.2 though!
Edited on 10 April 2015 - 08:40 AM
Lupus590 #476
Posted 10 April 2015 - 12:25 PM
Like any change, there will be some toothaches to get round if/when CC goes to Lua 5.2

Ok, I can't hold it in… I AM REALLY EXCITED FOR A LUA UPDATE!!!!
Edited on 10 April 2015 - 10:25 AM
dan200 #477
Posted 10 April 2015 - 12:47 PM
Do you really change functions environments except just after creating them in your program? I'm struggling to see the use case.

LuaLua is one case where it's necessary. It's a language level extension on Lua for CC, and its runtime depends on being able to change function environments.

Also, there are some weird use-cases where you want to bundle an API with a program. For example, in Grin, I have several APIs I need to use that I have written to work as ordinary CC APIs. But one of Grin's features is its ability to work from a simple "pastebin run" command, so it all needs to be one file. My solution is to keep the APIs in the git repo, and use a text substitution system to insert the APIs within functions that get their environments set.


function json_api()
	@JSON@
end
local json = {}
setfenv(json_api, json)
json_api()

and then the text substitution system replaces @JSON@ with the contents of the json API file.

It's kinda dirty, but the point is that there are tons of odd-ball use-cases for function environments.

Then again I guess solutions that require forcibly changing environments are kind of like this.

You can achieve your example in Lua 5.2 like so:


local json = {}
do
    local _ENV = json
    function json_api()
        ...
    end
end
json_api()
ElvishJerricco #478
Posted 10 April 2015 - 01:25 PM
- snip -

Well, like I said, I'm sure my arguments for environments are just bad solutions to odd problems. But I have found enormous amounts of use for them.
dan200 #479
Posted 10 April 2015 - 01:36 PM
Lua 5.2 has environments, you just can't change them after the function is created. You set them either using the 4th parameter to load (when compiling a function from code), or using the _ENV pattern I showed in the previous post (when declaring a new function). Everyone concerned they're losing something they absolutely need would do well to read what the lua manual has to say on the topic: http://www.lua.org/m...manual.html#2.2
ElvishJerricco #480
Posted 10 April 2015 - 02:40 PM
Lua 5.2 has environments, you just can't change them after the function is created. You set them either using the 4th parameter to load (when compiling a function from code), or using the _ENV pattern I showed in the previous post (when declaring a new function). Everyone concerned they're losing something they absolutely need would do well to read what the lua manual has to say on the topic: http://www.lua.org/m...manual.html#2.2

I know very well how to use environments with 5.2. The issue is definitely minor and very niche, I'm not arguing against that. I'm merely pointing out that minor and niche is non-zero, and I have personally found several uses for setting environments on non-top-level-functions. Again, it's not major, so moving to 5.2 isn't the end of the world or anything. But it does take some justification.
Bomb Bloke #481
Posted 10 April 2015 - 02:52 PM
Thought I might do some speed tests - it seems that window-based rendering is faster, but unfortunately not by much. It's difficult to measure the difference. Benchmark rendering scores go something like this on my system:

1.73 - Text: 10.45, Color: 29.95, Advanced: 19.45
1.73 (no multishell) - Text: 1.95, Color: 2.05, Advanced: 3.6
1.74pr20 - Text: 9.55, Color: 30.95, Advanced: 15.2
1.74pr20 (no multishell) - Text: 1.95, Color: 2.1, Advanced: 3.65

Bearing in mind that the numbers deviate a little bit with each run (typically less than ~0.5), the most obvious change is that the "advanced" score is down four points (bearing in mind that "low" is supposed to mean "good").

Under general use (eg writing a whole line with unchanging text / background colours), term.write() and term.blit() operate at very nearly the same speed - running a few tests, I found the winner to be quite random. On the other hand, if you want to print a string while quickly switching between colours (eg a unique text / background colour for every character in your line), blit offers a dramatic speed boost. For example, it's about ten times faster with an eight character string… and the difference would increase as the string got longer.

Windows naturally make use of term.blit() now (for the purpose of redrawing lines), but you really won't see much of a speed difference there unless there are multiple colours in use on the same line. The aforementioned benchmark script never creates such a scenario, so that happens to be mostly useless for the purpose of demonstrating the change.
dan200 #482
Posted 10 April 2015 - 02:59 PM
Lua 5.2 has environments, you just can't change them after the function is created. You set them either using the 4th parameter to load (when compiling a function from code), or using the _ENV pattern I showed in the previous post (when declaring a new function). Everyone concerned they're losing something they absolutely need would do well to read what the lua manual has to say on the topic: http://www.lua.org/m...manual.html#2.2

I know very well how to use environments with 5.2. The issue is definitely minor and very niche, I'm not arguing against that. I'm merely pointing out that minor and niche is non-zero, and I have personally found several uses for setting environments on non-top-level-functions. Again, it's not major, so moving to 5.2 isn't the end of the world or anything. But it does take some justification.

again: you can create non-top-level-functions with custom environments using _ENV

Thought I might do some speed tests - it seems that window-based rendering is faster, but unfortunately not by much. It's difficult to measure the difference. Benchmark rendering scores go something like this on my system:

1.73 - Text: 10.45, Color: 29.95, Advanced: 19.45
1.73 (no multishell) - Text: 1.95, Color: 2.05, Advanced: 3.6
1.74pr20 - Text: 9.55, Color: 30.95, Advanced: 15.2
1.74pr20 (no multishell) - Text: 1.95, Color: 2.1, Advanced: 3.65

Bearing in mind that the numbers deviate a little bit with each run (typically less than ~0.5), the most obvious change is that the "advanced" score is down four points (bearing in mind that "low" is supposed to mean "good").

Under general use (eg writing a whole line with unchanging text / background colours), term.write() and term.blit() operate at very nearly the same speed - running a few tests, I found the winner to be quite random. On the other hand, if you want to print a string while quickly switching between colours (eg a unique text / background colour for every character in your line), blit offers a dramatic speed boost. For example, it's about ten times faster with an eight character string… and the difference would increase as the string got longer.

Windows naturally make use of term.blit() now (for the purpose of redrawing lines), but you really won't see much of a speed difference there unless there are multiple colours in use on the same line. The aforementioned benchmark script never creates such a scenario, so that happens to be mostly useless for the purpose of demonstrating the change.

Thanks for this. I guess i still need to optimise window.write/window.blit!
Tag365 #483
Posted 10 April 2015 - 03:06 PM
Would you like to merge my version of the edit script with the official version of it? I have the source for my version. Below is my version with more features.
Spoiler

-- Get file to edit
local tArgs = { ... }
if #tArgs == 0 then
	print( "Usage: edit <path> [line number]" )
	return
end

-- Error checking
local sPath = shell.resolve( tArgs[1] )
local bReadOnly = fs.isReadOnly( sPath )
if fs.exists( sPath ) and fs.isDir( sPath ) then
	print( "Cannot edit a directory." )
	return
end

local x,y = 1,1
if type(tonumber(tArgs[2])) == "number" then
  y = tArgs[2] + 1
end
local w,h = term.getSize()
local scrollX, scrollY = 0,y - 1

local tLines = {}
local bRunning = true

-- Code Highlighting Colours
local highlightColour, keywordColour, commentColour, textColour, bgColour
if term.isColour() then
	bgColour = colours.black
	textColour = colours.white
	highlightColour = colours.yellow
	keywordColour = colours.yellow
	commentColour = colours.green
	stringColour = colours.red
else
	bgColour = colours.black
	textColour = colours.white
	highlightColour = colours.white
	keywordColour = colours.white
	commentColour = colours.white
	stringColour = colours.white
end

-- Menus
local bMenu = false
local nMenuItem = 1
local tMenuItems
if bReadOnly then
	tMenuItems = { "SaveAs", "Exit", "GoTo", "Run", "Search", "Print" }
else
	tMenuItems = { "Save", "Exit", "GoTo", "Run", "Search", "Print" }
end
	
local sStatus = "Press Ctrl to access menu"

local function load( _sPath )
	tLines = {}
	if fs.exists( _sPath ) then
		local file = io.open( _sPath, "r" )
		local sLine = file:read()
		while sLine do
			table.insert( tLines, sLine )
			sLine = file:read()
		end
		file:close()
	end
	
	if #tLines == 0 then
		table.insert( tLines, "" )
	end
end

local function save( _sPath )
	-- Create intervening folder
	local sDir = sPath:sub(1, sPath:len() - fs.getName(sPath):len() )
	if not fs.exists( sDir ) then
		fs.makeDir( sDir )
	end

	-- Save
	local file = nil
	local function innerSave()
		file = fs.open( _sPath, "w" )
		if file then
			for n, sLine in ipairs( tLines ) do
				file.write( sLine .. "\n" )
			end
		else
			error( "Failed to open ".._sPath )
		end
	end
	
	local ok = pcall( innerSave )
	if file then 
		file.close()
	end
	return ok
end

-- Lua keywords
local tKeywords = {
	["and"] = true,
	["break"] = true,
	["do"] = true,
	["else"] = true,
	["elseif"] = true,
	["end"] = true,
	["false"] = true,
	["for"] = true,
	["function"] = true,
	["if"] = true,
	["in"] = true,
	["local"] = true,
	["nil"] = true,
	["not"] = true,
	["or"] = true,
	["repeat"] = true,
	["return"] = true,
	["then"] = true,
	["true"] = true,
	["until"] = true,
	["while"] = true,
}

local function tryWrite( sLine, regex, colour )
	local match = string.match( sLine, regex )
	if match then
		if type(colour) == "number" then
			term.setTextColour( colour )
		else
			term.setTextColour( colour(match) )
		end
		term.write( match )
		term.setTextColour( textColour )
		return string.sub( sLine, string.len(match) + 1 )
	end
	return nil
end

local function writeHighlighted( sLine )
	while string.len(sLine) > 0 do	
		sLine = 
			tryWrite( sLine, "^%-%-%[%[.-%]%]", commentColour ) or
			tryWrite( sLine, "^%-%-.*", commentColour ) or
			tryWrite( sLine, "^\".-[^\\]\"", stringColour ) or
			tryWrite( sLine, "^\'.-[^\\]\'", stringColour ) or
			tryWrite( sLine, "^%[%[.-%]%]", stringColour ) or
			tryWrite( sLine, "^[%w_]+", function( match )
				if tKeywords[ match ] then
					return keywordColour
				end
				return textColour
			end ) or
			tryWrite( sLine, "^[^%w_]", textColour )
	end
end

local function redrawText()
	for y=1,h-1 do
		term.setCursorPos( 1 - scrollX, y )
		term.clearLine()

		local sLine = tLines[ y + scrollY ]
		if sLine ~= nil then
			writeHighlighted( sLine )
		end
	end
	term.setCursorPos( x - scrollX, y - scrollY )
end

local function redrawLine(_nY)
	local sLine = tLines[_nY]
	term.setCursorPos( 1 - scrollX, _nY - scrollY )
	term.clearLine()
	writeHighlighted( sLine )
	term.setCursorPos( x - scrollX, _nY - scrollY )
end

local function redrawMenu()
    -- Clear line
    term.setCursorPos( 1, h )
	term.clearLine()

    -- Draw line numbers
    term.setCursorPos( w - string.len( "Ln "..y ) + 1, h )
    term.setTextColour( highlightColour )
    term.write( "Ln " )
    term.setTextColour( textColour )
    term.write( y )

    term.setCursorPos( 1, h )
	if bMenu then
        -- Draw menu
		term.setTextColour( textColour )
		for nItem,sItem in pairs( tMenuItems ) do
			if nItem == nMenuItem then
				term.setTextColour( highlightColour )
				term.write( "[" )
				term.setTextColour( textColour )
				term.write( sItem )
				term.setTextColour( highlightColour )
				term.write( "]" )
        		term.setTextColour( textColour )
			else
				term.write( " "..sItem.." " )
			end
		end
    else
        -- Draw status
        term.setTextColour( highlightColour )
        term.write( sStatus )
        term.setTextColour( textColour )
    end

	-- Reset cursor
	term.setCursorPos( x - scrollX, y - scrollY )
end

local tMenuFuncs = { 
	Save=function()
		if bReadOnly then
			sStatus = "Access denied"
		else
			local ok, err = save( sPath )
			if ok then
				sStatus="Saved to "..sPath
			else
				sStatus="Error saving to "..sPath
			end
		end
		redrawMenu()
	end,
	SaveAs=function()
		term.setCursorPos(1, h)
		term.clearLine()
		term.write("Save to>")
		sPath = read()
		bReadOnly = fs.isReadOnly(sPath)
		if bReadOnly then
			sStatus = "Access denied"
		else
			local ok, err = save( sPath )
			if ok then
				sStatus="Saved to "..sPath
			else
				sStatus="Error saving to "..sPath
			end
		end
		redrawText()
		redrawMenu()
	end,
	GoTo=function()
		term.setCursorPos(1, h)
		term.clearLine()
		term.write("Go to line>")
		y=math.max(math.min(tonumber(read()) or y, #tLines), 1)
		sStatus = "Moved to line "..y
		scrollY = math.max(y - 6, 0)
		redrawText()
		redrawMenu()
		end,
	Run=function()
		local scriptCode = ""
		for k, v in ipairs(tLines) do
			scriptCode = scriptCode..v
		end
		local fScript, err = loadstring(scriptCode)
		if fScript then
			term.setTextColor(colors.white)
			term.setCursorPos(1, 1)
			term.clear()
			fScript()
			term.setBackgroundColor(colors.black)
			term.setTextColor(colors.white)
			redrawText()
			redrawMenu()
		else
			sStatus = err or "Could not run script"
		end
	end,
	Search=function()
		term.setCursorPos(1, h)
		term.clearLine()
		term.write("Search for>")
		local sSearch = read()
		local matchx, matchy
		for k, v in ipairs(tLines) do
			if k > y then
				if string.find(v, sSearch) then
					matchx, matchy = string.find(v, sSearch), k
					break
				end
			end
		end
		if matchx then
			x, y = matchx, matchy
			scrollX, scrollY = x - 16, y - 1
			sStatus = "Found match at line "..matchy
			redrawText()
			redrawMenu()
		else
			sStatus = "No matches found below cursor"
			redrawText()
			redrawMenu()
		end
	end,
	Print=function()
		local printer = peripheral.find( "printer" )
		if not printer then
			sStatus = "No printer attached"
			return
		end

		local nPage = 0
		local sName = fs.getName( sPath )
		if printer.getInkLevel() < 1 then
			sStatus = "Printer out of ink"
			return
		elseif printer.getPaperLevel() < 1 then
			sStatus = "Printer out of paper"
			return
		end

		local screenTerminal = term.current()
		local printerTerminal = {
			getCursorPos = printer.getCursorPos,
			setCursorPos = printer.setCursorPos,
			getSize = printer.getPageSize,
			write = printer.write,
		}
		printerTerminal.scroll = function()
			if nPage == 1 then
				printer.setPageTitle( sName.." (page "..nPage..")" )			
			end
			
			while not printer.newPage()	do
				if printer.getInkLevel() < 1 then
					sStatus = "Printer out of ink, please refill"
				elseif printer.getPaperLevel() < 1 then
					sStatus = "Printer out of paper, please refill"
				else
					sStatus = "Printer output tray full, please empty"
				end
	
				term.redirect( screenTerminal )
				redrawMenu()
				term.redirect( printerTerminal )
				
				local timer = os.startTimer(0.5)
				sleep(0.5)
			end

			nPage = nPage + 1
			if nPage == 1 then
				printer.setPageTitle( sName )
			else
				printer.setPageTitle( sName.." (page "..nPage..")" )
			end
		end
		
		bMenu = false
		term.redirect( printerTerminal )
		local ok, error = pcall( function()
			term.scroll()
			for n, sLine in ipairs( tLines ) do
				print( sLine )
			end
		end )
        term.redirect( screenTerminal )
		if not ok then
			print( error )
		end
		
		while not printer.endPage() do
			sStatus = "Printer output tray full, please empty"
			redrawMenu()
			sleep( 0.5 )
		end
		bMenu = true
			
		if nPage ~= 1 then
			sStatus = "Printed "..nPage.." Pages"
		else
			sStatus = "Printed 1 Page"
		end
		redrawMenu()
	end,
	Exit=function()
		bRunning = false
	end
}

local function doMenuItem( _n )
	tMenuFuncs[tMenuItems[_n]]()
	if bMenu then
		bMenu = false
		term.setCursorBlink( true )
	end
	redrawMenu()
end

local function setCursor( x, y )
	local screenX = x - scrollX
	local screenY = y - scrollY
	
	local bRedraw = false
	if screenX < 1 then
		scrollX = x - 1
		screenX = 1
		bRedraw = true
	elseif screenX > w then
		scrollX = x - w
		screenX = w
		bRedraw = true
	end
	
	if screenY < 1 then
		scrollY = y - 1
		screenY = 1
		bRedraw = true
	elseif screenY > h-1 then
		scrollY = y - (h-1)
		screenY = h-1
		bRedraw = true
	end
	
	if bRedraw then
		redrawText()
	end
	term.setCursorPos( screenX, screenY )
	
	-- Statusbar now pertains to menu, it would probably be safe to redraw the menu on every key event.
	redrawMenu()
end

-- Actual program functionality begins
load(sPath)

-- Stop it from erroring if you attempt to go to a non-existant line at launch-time
if #tLines < y then
  y = #tLines
  scrollY = y - 1
end

term.setBackgroundColour( bgColour )
term.clear()
term.setCursorPos(x,y)
term.setCursorBlink( true )

redrawText()
redrawMenu()

-- Handle input
while bRunning do
	local sEvent, param, param2, param3 = os.pullEvent()
	if sEvent == "key" then
		if param == keys.up then
			-- Up
			if not bMenu then
				if y > 1 then
					-- Move cursor up
					y = y - 1
					x = math.min( x, string.len( tLines[y] ) + 1 )
					setCursor( x, y )
				end
			end
		elseif param == keys.down then
			-- Down
			if not bMenu then
				-- Move cursor down
				if y < #tLines then
					y = y + 1
					x = math.min( x, string.len( tLines[y] ) + 1 )
					setCursor( x, y )
				end
			end
		elseif param == keys.tab then
			-- Tab
			if not bMenu and not bReadOnly then
				-- Indent line
				tLines[y]="  "..tLines[y]
				x = x + 2
				setCursor( x, y )
				redrawLine(y)
			end
		elseif param == keys.pageUp then
			-- Page Up
			if not bMenu then
				-- Move up a page
				if y - (h - 1) >= 1 then
					y = y - (h - 1)
				else
					y = 1
				end
				x = math.min( x, string.len( tLines[y] ) + 1 )
				setCursor( x, y )
			end
		elseif param == keys.pageDown then
			-- Page Down
			if not bMenu then
				-- Move down a page
				if y + (h - 1) <= #tLines then
					y = y + (h - 1)
				else
					y = #tLines
				end
				x = math.min( x, string.len( tLines[y] ) + 1 )
				setCursor( x, y )
			end
		elseif param == keys.home then
			-- Home
			if not bMenu then
				-- Move cursor to the beginning
				x=1
				setCursor(x,y)
			end
		elseif param == keys["end"] then
			-- End
			if not bMenu then
				-- Move cursor to the end
				x = string.len( tLines[y] ) + 1
				setCursor(x,y)
			end
		elseif param == keys.left then
			-- Left
			if not bMenu then
				if x > 1 then
					-- Move cursor left
					x = x - 1
				elseif x==1 and y>1 then
					x = string.len( tLines[y-1] ) + 1
					y = y - 1
				end
				setCursor( x, y )
			else
				-- Move menu left
				nMenuItem = nMenuItem - 1
				if nMenuItem < 1 then
					nMenuItem = #tMenuItems
				end
				redrawMenu()
			end
		elseif param == keys.right then
			-- Right
			if not bMenu then
				if x < string.len( tLines[y] ) + 1 then
					-- Move cursor right
					x = x + 1
				elseif x==string.len( tLines[y] ) + 1 and y<#tLines then
					x = 1
					y = y + 1
				end
				setCursor( x, y )
			else
				-- Move menu right
				nMenuItem = nMenuItem + 1
				if nMenuItem > #tMenuItems then
					nMenuItem = 1
				end
				redrawMenu()
			end
		elseif param == keys.delete then
			-- Delete
			if not bMenu and not bReadOnly then
				if  x < string.len( tLines[y] ) + 1 then
					local sLine = tLines[y]
					tLines[y] = string.sub(sLine,1,x-1) .. string.sub(sLine,x+1)
					redrawLine(y)
				elseif y<#tLines then
					tLines[y] = tLines[y] .. tLines[y+1]
					table.remove( tLines, y+1 )
					redrawText()
					redrawMenu()
				end
			end
		elseif param == keys.backspace then
			-- Backspace
			if not bMenu and not bReadOnly then
				if x > 1 then
					-- Remove character
					local sLine = tLines[y]
					tLines[y] = string.sub(sLine,1,x-2) .. string.sub(sLine,x)
					redrawLine(y)
			
					x = x - 1
					setCursor( x, y )
				elseif y > 1 then
					-- Remove newline
					local sPrevLen = string.len( tLines[y-1] )
					tLines[y-1] = tLines[y-1] .. tLines[y]
					table.remove( tLines, y )
					redrawText()
				
					x = sPrevLen + 1
					y = y - 1
					setCursor( x, y )
				end
			end
		elseif param == keys.enter then
			-- Enter
			if not bMenu and not bReadOnly then
				-- Newline
				local sLine = tLines[y]
				local _,spaces=string.find(sLine,"^[ ]+")
				if not spaces then
					spaces=0
				end
				tLines[y] = string.sub(sLine,1,x-1)
				table.insert( tLines, y+1, string.rep(' ',spaces)..string.sub(sLine,x) )
				redrawText()
			
				x = spaces+1
				y = y + 1
				setCursor( x, y )
			elseif bMenu then
				-- Menu selection
				doMenuItem( nMenuItem )
			end
		elseif param == keys.leftCtrl or param == keys.rightCtrl then
			-- Menu toggle
			bMenu = not bMenu
			if bMenu then
				term.setCursorBlink( false )
			else
				term.setCursorBlink( true )
			end
			redrawMenu()
		end
		
	elseif sEvent == "char" then
		if not bMenu and not bReadOnly then
			-- Input text
			local sLine = tLines[y]
			tLines[y] = string.sub(sLine,1,x-1) .. param .. string.sub(sLine,x)
			redrawLine(y)
		
			x = x + 1
			setCursor( x, y )
		elseif bMenu then
			-- Select menu items
			for n,sMenuItem in ipairs( tMenuItems ) do
				if string.lower(string.sub(sMenuItem,1,1)) == string.lower(param) then
					doMenuItem( n )
					break
				end
			end
		end

	elseif sEvent == "paste" then
		if not bMenu and not bReadOnly then
			-- Input text
			local sLine = tLines[y]
			tLines[y] = string.sub(sLine,1,x-1) .. param .. string.sub(sLine,x)
			redrawLine(y)

			x = x + string.len( param )
			setCursor( x, y )
		end
		
	elseif sEvent == "mouse_click" then
		if not bMenu then
			if param == 1 then
				-- Left click
				local cx,cy = param2, param3
				if cy < h then
					y = math.min( math.max( scrollY + cy, 1 ), #tLines )
					x = math.min( math.max( scrollX + cx, 1 ), string.len( tLines[y] ) + 1 )
					setCursor( x, y )
				end
			end
		end
		
	elseif sEvent == "mouse_scroll" then
		if not bMenu then
			if param == -1 then
				-- Scroll up
				if scrollY > 0 then
					-- Move cursor up
					scrollY = scrollY - 1
					redrawText()
				end
			
			elseif param == 1 then
				-- Scroll down
				local nMaxScroll = #tLines - (h-1)
				if scrollY < nMaxScroll then
					-- Move cursor down
					scrollY = scrollY + 1
					redrawText()
				end
				
			end
		end

	elseif sEvent == "term_resize" then
	    w,h = term.getSize()
        setCursor( x, y )
        redrawMenu()
        redrawText()
	end
end

-- Cleanup
term.clear()
term.setCursorBlink( false )

term.setCursorPos( 1, 1 )

Edited on 10 April 2015 - 02:05 PM
ElvishJerricco #484
Posted 10 April 2015 - 03:08 PM
again: you can create non-top-level-functions with custom environments using _ENV

That's not really the same. I mean, functionally, it has the same effect. But the reason you actually call setfenv on non-top-level-functions is because you for some reason don't have access to its local scope. For example, LuaLua creates instance methods with their environments set to a special table. The functions are provided by the programmer, not anything the runtime has access to. So the runtime can't change or control the _ENV upvalue for these functions, meaning it relies strongly on the 5.1 environment model.

All in all we're not arguing anything important. You could update to 5.2 and I'd happily find another way around the problems that the 5.1 environment model can solve. It's just that it's not exceedingly rare to abuse the 5.1 model.

- snip -

Dude use a spoiler tag. That's a lot of text =P
Edited on 10 April 2015 - 01:08 PM
Bomb Bloke #485
Posted 10 April 2015 - 04:28 PM
Thanks for this. I guess i still need to optimise window.write/window.blit!

I'm not sure there's that much left to improve… For what it's worth, I gave it a go but didn't have much luck.

Spoiler
    -- Terminal implementation
    function window.write( sText )
        sText = tostring( sText )
        local nStart = nCursorX
        local nEnd = nStart + #sText - 1
        if nCursorY >= 1 and nCursorY <= nHeight and nStart <= nWidth and nEnd >= 1 then
            -- Modify line
            local tLine = tLines[ nCursorY ]
            if nStart == 1 and nEnd == nWidth then
                tLine.text = sText
                tLine.textColor = string.rep( tHex[ nTextColor ], nWidth )
                tLine.backgroundColor = string.rep( tHex[ nBackgroundColor ], nWidth )

                if bVisible then redrawLine( nCursorY ) end
            else
                local sClippedText = (nStart < 1 or nEnd > nWidth) and string.sub( sText, 2 - nStart > 1 and 2 - nStart or 1, nWidth - nStart + 1 ) or sText
                local sClippedTextCol, sClippedBackCol = string.rep( tHex[ nTextColor ], #sClippedText ), string.rep( tHex[ nBackgroundColor ], #sClippedText )

                if nEnd < nWidth then
                    if nStart > 1 then
                        tLine.text = string.sub( tLine.text, 1, nStart - 1 ) .. sClippedText .. string.sub( tLine.text, nEnd + 1, nWidth )
                        tLine.textColor = string.sub( tLine.textColor, 1, nStart - 1 ) .. sClippedTextCol .. string.sub( tLine.textColor, nEnd + 1, nWidth )
                        tLine.backgroundColor = string.sub( tLine.backgroundColor, 1, nStart - 1 ) .. sClippedBackCol .. string.sub( tLine.backgroundColor, nEnd + 1, nWidth )
                    else
                        tLine.text = sClippedText .. string.sub( tLine.text, nEnd + 1, nWidth )
                        tLine.textColor = sClippedTextCol .. string.sub( tLine.textColor, nEnd + 1, nWidth )
                        tLine.backgroundColor = sClippedBackCol .. string.sub( tLine.backgroundColor, nEnd + 1, nWidth )
                    end
                elseif nStart > 1 then
                    tLine.text = string.sub( tLine.text, 1, nStart - 1 ) .. sClippedText
                    tLine.textColor = string.sub( tLine.textColor, 1, nStart - 1 ) .. sClippedTextCol
                    tLine.backgroundColor = string.sub( tLine.backgroundColor, 1, nStart - 1 ) .. sClippedBackCol
                else
                    tLine.text = sClippedText
                    tLine.textColor = sClippedTextCol
                    tLine.backgroundColor = sClippedBackCol
                end

                if bVisible then
                    parent.setCursorPos( nX + (nStart > 1 and nStart - 1 or 0), nY + nCursorY - 1 )
                    parent.blit( sClippedText, sClippedTextCol, sClippedBackCol )
                end
            end
        end

        -- Move and redraw cursor
        nCursorX = nEnd + 1
        if bVisible then
            updateCursorColor()
            updateCursorPos()
        end
    end

Yeah, it's faster, but not by all that much - 8.5/30.5/14.5 on average.

Edit: Actually that code was broken. Fixed it… for what it's worth.
Edited on 13 April 2015 - 11:55 PM
Lignum #486
Posted 10 April 2015 - 05:46 PM
Perhaps instead of using two strings to store the terminal display, it should use an array instead? Blitting would be way less complex that way and as a consequence probably also faster.
SquidDev #487
Posted 10 April 2015 - 05:55 PM
Perhaps instead of using two strings to store the terminal display, it should use an array instead? Blitting would be way less complex that way and as a consequence probably also faster.

Also Strings are immutable and so have to be reallocated every time a draw occurs. I don't know how great the performance increase would be (if any) if it was changed though.
Bomb Bloke #488
Posted 11 April 2015 - 01:47 AM
"Two strings"?

Dividing line contents across a table would make it more complex, and I reckon the extra function calls required to do the spreading (and the recombining of the results) would do more to hurt matters than to help.
Lignum #489
Posted 11 April 2015 - 01:59 AM
"Two strings"?

Dividing line contents across a table would make it more complex, and I reckon the extra function calls required to do the spreading (and the recombining of the results) would do more to hurt matters than to help.

I'm not talking about term.blit, I'm talking about how ComputerCraft stores the display internally. Currently it's done with two strings, one stores the text along with its colour, the other stores the background colours. Because of this the blit function is just a huge mess of string manipulation, which lead me to think that perhaps using an array could simplify it and thus eventually increase performance. But maybe that's just because I often (wrongly) associate messy code with bad performance.
Bomb Bloke #490
Posted 11 April 2015 - 02:33 AM
Ah.

We'd been talking about getting the window API to operate at a speed closer to term.native(), so unfortunately Java-side changes won't help there.

I suppose something like the ".no_disk_startup" file check could be implemented, only to toggle multishell instead? That'd make the point moot, for those who care.
dan200 #491
Posted 13 April 2015 - 03:22 PM
If your program needs native performance (and you're ok with being incompatible with multishell and other windowing based OSes), you can just redirect to term.native()
Phoenix323 #492
Posted 18 April 2015 - 10:30 PM
When will ComputerCraft update to forge 1.8
Creator #493
Posted 18 April 2015 - 10:42 PM
That would be really great. Oh and dan200 I want to thank you for making such a great mod. I thought me a lot of skills: lua and iron logic (very strong logic). I really think it is the best mod available ;)/>
Bomb Bloke #494
Posted 19 April 2015 - 04:45 AM
Source for which part of it?

The Java-side of things is closed source.

But much of the code you get to play with - the majority of the APIs, shell, and so on - are written in plain Lua, and can be found within the assets folder of the mod archive itself.
Lyqyd #495
Posted 19 April 2015 - 06:47 PM
In case the above post isn't clear, ComputerCraft is closed-source, so the source is not available anywhere. You could decompile the mod, but you cannot distribute modified versions of it.
Phoenix323 #496
Posted 20 April 2015 - 08:24 AM
ok thanks
JoeNoIce #497
Posted 23 April 2015 - 10:26 PM
not to be a bother but when will 1.8 version of the mod be out?
Cranium #498
Posted 24 April 2015 - 12:07 AM
not to be a bother but when will 1.8 version of the mod be out?
Whenever it's out.
JoeNoIce #499
Posted 24 April 2015 - 07:15 AM
not to be a bother but when will 1.8 version of the mod be out?
Whenever it's out.

1 lol
and 2 when did you get moderator rank on this forum?
Bomb Bloke #500
Posted 24 April 2015 - 08:19 AM
when did you get moderator rank on this forum?

Believe it or not, that's actually documented.
Edited on 24 April 2015 - 06:20 AM
biggest yikes #501
Posted 26 April 2015 - 03:44 PM
when did you get moderator rank on this forum?
"January 23rd, 2013" according to http://www.computercraft.info/wiki/ComputerCraft_Timeline
Edited on 26 April 2015 - 01:45 PM
theoriginalbit #502
Posted 27 April 2015 - 04:17 AM
Believe it or not, that's actually documented.
Not everything is documented, my moderatorship wasn't
Geforce Fan #503
Posted 11 May 2015 - 01:57 AM
Question for dan: Why isn't the window API on the java-side? It would be a tremendous performance boost
Creator #504
Posted 11 May 2015 - 05:34 AM
Question for dan: Why isn't the window API on the java-side? It would be a tremendous performance boost

Because it CAN be programmed in lua. Only code interacting with your physical computer or minecraft is written in Java.
theoriginalbit #505
Posted 11 May 2015 - 06:28 AM
Only code interacting with your physical computer or minecraft is written in Java.
incorrect. anything actually functional is implemented Java-side. The Lua folder is essentially just things that help us program "better", take a look, if you were to remove the Lua folder you'd still be able to perform all the same tasks, just with some extra work required essentially coding what these APIs also do. That is why the Window API is not Java-side, it is not an essential API, it is not a requirement for the computer to function, it is something that is meant to make programming "easier" for us.

It would be a tremendous performance boost
it actually wouldn't give much of a performance boost at all, the code would be identical only written in Java. There is far more important changes that Dan could make to the Java-side to make rendering more efficient for both term and window APIs, as well as improving things such as networking performance.
dan200 #506
Posted 11 June 2015 - 01:33 PM
Just posted a new beta. It fixes a lot of reported bugs, and includes some backend changes to support ComputerCraftEdu, which I can officially announce will be released simultaneously with ComputerCraft 1.74 this monday!
Creator #507
Posted 11 June 2015 - 02:14 PM
Thank you Dan! :)/> Thank you for all the effort you are putting into ComputerCraft.
Alekso56 #508
Posted 11 June 2015 - 02:16 PM
And as always, here's the luachangelog.
CrazedProgrammer #509
Posted 11 June 2015 - 02:42 PM
That's amazing Dan!
Thank you for your hard work.
I think ComputerCraftEdu will teach a lot of people how to program :D/>
Edited on 11 June 2015 - 07:52 PM
biggest yikes #510
Posted 11 June 2015 - 02:46 PM
New tasty features!
_MC_VERSION? Thank you, thank you, thank you!
Lignum #511
Posted 11 June 2015 - 06:51 PM
Turtles seem to be able to push things now. First thing I tried was to make a turtle lift… it's hard to look around while it's moving but it works!
Also, computers seem to display a white background very briefly when they start up?
biggest yikes #512
Posted 11 June 2015 - 09:07 PM
Turtles seem to be able to push things now.
Indeed, that's in the changelog.
Also, computers seem to display a white background very briefly when they start up?
Yeah, I noticed that too. Probably something related with the colors being internally changed and stuff.
MKlegoman357 #513
Posted 11 June 2015 - 09:16 PM
Looks like there's a LuaJ constant too:

Creator #514
Posted 11 June 2015 - 09:17 PM
Nice and smooth
MKlegoman357 #515
Posted 11 June 2015 - 09:21 PM
The way turtles currently push things looks like it simply teleports you. Maybe it could be possible to make them actually push, rather than teleport, just like pistons?
Creator #516
Posted 11 June 2015 - 09:41 PM
How many blocks can the turtle push at once? Can it push anything?
Wojbie #517
Posted 11 June 2015 - 09:58 PM
How many blocks can the turtle push at once? Can it push anything?
Not Blocks. Players and Entities. Just tested that by making Storage Mine-cart elevator. Nice way to extend turtle inventory space providing it would only move up and down for easier coding. Only one minecart at the time but still thats a chest worth of stuff + 16 slots of turtle going up in 1x1 space.
Edited on 11 June 2015 - 08:04 PM
Bomb Bloke #518
Posted 12 June 2015 - 12:51 AM
That does sound like a cool idea for a turtle peripheral, though. Piston turtles! :lol:/>

Just posted a new beta. It fixes a lot of reported bugs, and includes some backend changes to support ComputerCraftEdu, which I can officially announce will be released simultaneously with ComputerCraft 1.74 this monday!

Congratulations, and thanks for all your hard work! :)/> I do have fun tinkering with CC.
dan200 #519
Posted 12 June 2015 - 09:37 AM
The way turtles currently push things looks like it simply teleports you. Maybe it could be possible to make them actually push, rather than teleport, just like pistons?

they do push like pistons.
Wojbie #520
Posted 12 June 2015 - 11:10 AM
they do push like pistons.

Yet something is different. When piston pushes you up there is no jittering and your viewdirection is not locked during movement up.
Bomb Bloke #521
Posted 12 June 2015 - 11:34 AM
Just throwing out a guess, haven't really played around with moving players via pistons, but maybe it's just not so obvious due to the speed at which pistons move. Turtles are relatively sedate.
SquidDev #522
Posted 29 June 2015 - 09:28 PM
I was working on updating CCTweaks to 1.7.4, and I noticed that the timeout length was increased to 7 seconds instead, just wondering what prompted that?
Lego Stax #523
Posted 05 August 2015 - 01:25 AM
Are there any plans to port CC to 1.8? Or is Dan just going to go straight for 1.9, since the update is around the corner and all.
Bomb Bloke #524
Posted 05 August 2015 - 11:52 PM
As far as we've been told, Dan's plans are to polish off development of Redirection, then perhaps to do a bit more work on his secret project. It's unlikely we'll see ComputerCraft ported to a different MineCraft version for at -the very least- a couple of months, but you never know.
ElvishJerricco #525
Posted 06 August 2015 - 11:10 PM
Are there any plans to port CC to 1.8? Or is Dan just going to go straight for 1.9, since the update is around the corner and all.

1.9 isn't exactly right around the corner. Mojang's release might be, but it will be quite a while before Forge is updated, and CC relies on Forge.
Lego Stax #526
Posted 07 August 2015 - 12:22 AM
As far as we've been told, Dan's plans are to polish off development of Redirection, then perhaps to do a bit more work on his secret project. It's unlikely we'll see ComputerCraft ported to a different MineCraft version for at -the very least- a couple of months, but you never know.

Thanks Bomb Bloke. I guess I'll stick to being hopeful.

Are there any plans to port CC to 1.8? Or is Dan just going to go straight for 1.9, since the update is around the corner and all.

1.9 isn't exactly right around the corner. Mojang's release might be, but it will be quite a while before Forge is updated, and CC relies on Forge.

That's true. However, the Forge team will likely start work on it right away after Mojang makes an official release, granted they're not busy doing other things.