CC: Tweaked 1.109 for 1.20.1 #1630
SquidDev
started this conversation in
Announcements
Replies: 2 comments
-
While I'm sad to see bytecode go, I'm grateful for the amazing work you put in. Thank you @SquidDev! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for this discussion post here, I do really enjoy this mod and I'm really excited to finally leave CraftOS v1.8 ^^ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On this day 6 years ago, the first version of CC: Tweaked was released. I normally entirely forget about this anniversary, belatedly remembering around early December. However, this year I've finally remembered, and so its time for another CC: Tweaked release.
CraftOS 1.9
ComputerCraft (and thus CC: Tweaked) has been on "CraftOS 1.8" ever since the first betas of ComputerCraft 1.80 back in 2016. While version numbers are largely symbolic, CC:T 1.109 contains several major changes, and so this feels a good way to highlight something important:
This release is going to break things
Throughout the development of CC: Tweaked I've tried to preserve backwards compatibility as much as possible. For the most part, I've been pretty successful here, and programs from 2014 (and probably earlier) still run fine.
Unfortunately, this version has changes which break compatibility with previous versions of the mod. I expect the vast majority of programs to continue to work fine, but some especially weird and wacky programs will break. Our documentation has a list of breaking changes , so do check that out!
Lua 5.2
Way back in 2015, ComputerCraft 1.74 started work on updating ComputerCraft to use Lua 5.2, by backporting some 5.2-specific APIs and adding a config option to disable some Lua 5.1-only functions.
Since then, things have remained relatively unchanged. We've continued to backport other functionality from more recent Lua versions, but never taken the final step of updating to Lua 5.2.
CC:T 1.109.0 finally makes this jump, adding full support for Lua 5.2 features, including
_ENV
andgoto
. Sorry Lyqyd.File handle rework
Historically ComputerCraft had two types of interacting with files. "Text mode" (which reads chunks of text) and "binary mode", which reads a single byte at a time. One of the first changes I made to ComputerCraft was to unify the two modes, giving them a more consistent interface.
Text mode is a bit of a mixed bag. It automatically converts UTF-8 files (and HTTP requests) to CraftOS's encoding (latin1 plus some extensions), which can be useful, but also sometimes confusing. Most of the time it was safer just to use binary mode instead.
Last month, Jack raised an issue about the encoding of websocket messages . Unlike HTTP and file handles, there is no "binary mode" for websockets, and so there's no way to use raw unconverted contents of websocket (text) messages.
This felt like a good time to do something I've wanted to do for a while - remove text mode. Now all file handles, HTTP requests, and websockets work with the raw (unencoded) bytes.
This shouldn't cause problems if you're just interacting with ASCII-encoded files (which is the vast majority of ComputerCraft programs) or were already using binary mode. If you do need to convert UTF-8 data to plain text, this should be fairly easy with the built-in
utf8
library.Emulators. Two of them!
This doesn't really impact any user of the mod, but I thought it was kinda fun and worth talking about.
Since its inception, CC: Tweaked's documentation site embedded a web-based emulator, which allows you to run examples from within the browser. This was powered by copy-cat, a separate project of mine.
Unfortunately, copy-cat development lagged behind CC:T, often by several months, meaning that newer features of the mod wouldn't be available in the emulator. In September I did an overhaul to copy-cat to make it easier to maintain, and then added the core components to CC:T directly. This means we build the emulator as part of the documentation site, ensuring the two are always in sync.
Many thanks to konsoletyper and the TeaVM contributors , for their work on making all this possible.
While testing some of the CraftOS changes mentioned higher up, I found myself really missing an easy way to fiddle with a computer without having to go in-game. As a result, CC:T now also comes with its own emulator. I should mention here that this is not intended as a general-purpose emulator; it's very much for developers of the mod.
In Closing
I must admit, it feels a bit weird to be writing such a jovial set of release notes given the atrocities over the last month (and more globally, a pretty terrible few years). Just a periodic reminder to make sure you're registered to vote and stay involved and engaged with politics. I want to believe things can get better.
Thank you to everyone who has helped keep CC: Tweaked alive over these last 6 years. ❤️
Beta Was this translation helpful? Give feedback.
All reactions