Jump to content




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


525 replies to this topic

#1 dan200

  • Administrators
  • 542 posts
  • LocationCambridge, England

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.

#2 Sxw

  • Members
  • 306 posts
  • LocationWhenever, Wherever!

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.

#3 dan200

  • Administrators
  • 542 posts
  • LocationCambridge, England

Posted 28 January 2014 - 12:21 PM

No modem.. yet!

#4 wilcomega

  • Members
  • 466 posts
  • LocationHolland

Posted 28 January 2014 - 12:31 PM

finally, been waiting all day for you to release the beta!

#5 Alekso56

  • Members
  • 62 posts

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!

#6 wilcomega

  • Members
  • 466 posts
  • LocationHolland

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

#7 AmandaC

  • Members
  • 55 posts

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?

#8 Wojbie

  • Members
  • 630 posts
  • LocationKinda lost

Posted 28 January 2014 - 03:35 PM

View PostAlekso56, on 28 January 2014 - 12:42 PM, said:

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 by wojbie, 28 January 2014 - 04:29 PM.


#9 Calculator

  • Members
  • 14 posts
  • LocationBelgium

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.

View PostAmandaC, on 28 January 2014 - 03:29 PM, said:

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 by Calculator, 29 January 2014 - 05:38 AM.


#10 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,442 posts

Posted 28 January 2014 - 04:28 PM

In reference to wojbie's comment above, I believe channel 65534 is used for GPS requests.

#11 Wojbie

  • Members
  • 630 posts
  • LocationKinda lost

Posted 28 January 2014 - 04:46 PM

View PostLyqyd, on 28 January 2014 - 04:28 PM, said:

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 by wojbie, 28 January 2014 - 04:47 PM.


#12 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 28 January 2014 - 04:57 PM

View PostAlekso56, on 28 January 2014 - 12:42 PM, said:

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 by MKlegoman357, 28 January 2014 - 05:02 PM.


#13 Calculator

  • Members
  • 14 posts
  • LocationBelgium

Posted 28 January 2014 - 06:01 PM

View PostMKlegoman357, on 28 January 2014 - 04:57 PM, said:

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

View PostMKlegoman357, on 28 January 2014 - 04:57 PM, said:

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 by Calculator, 28 January 2014 - 06:01 PM.


#14 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

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?

#15 AmandaC

  • Members
  • 55 posts

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

#16 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

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 by oeed, 29 January 2014 - 03:09 AM.


#17 MudkipTheEpic

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

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.

#18 dan200

  • Administrators
  • 542 posts
  • LocationCambridge, England

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.

#19 kalnat

  • Members
  • 14 posts

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 by kalnat, 30 January 2014 - 10:25 AM.


#20 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,442 posts

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users