SquidDev, on 25 October 2018 - 11:20 AM, said:
[MC1.12+][Fork] CC: Tweaked
#41
Posted 05 November 2018 - 07:43 AM
#42
Posted 10 November 2018 - 01:40 AM
#43
Posted 10 November 2018 - 01:49 AM
IndustrialLemon, on 10 November 2018 - 01:40 AM, said:
As far as Computeacube's additional APIs go, I've no plans for adding them to CC:Tweaked. While PCREs are more powerful than Lua's patterns, introducing an API for them is a little grotty. It's another non-standard way of manipulating strings, and doesn't integrate as cleanly with the rest of the language.
Edited by SquidDev, 10 November 2018 - 01:49 AM.
#44
Posted 10 November 2018 - 02:16 AM
EDIT: Also I'm sure there's a better place to report bugs but while I've got you. I just experienced a bug that was so hard to describe. I have a GPS system that runs off of a disk/startup dir and every time I would edit the disk/startup.lua file and save it would save the file with clips of the programming strewn about at the bottom. Every save it was worse. So, in the beginning, it was just a piece of, 'shell.run("gps host "..x, y, z)'. But a couple saves later and it was more like this.
shell.run("gps host "..x, y, z) end t"..x, y, z) end end t"..x, y, z) en end x, y, z end
Keep in mind everything after the first 'end' was deleted everytime each save before the next.
Edited by IndustrialLemon, 10 November 2018 - 02:21 AM.
#45
Posted 10 November 2018 - 10:36 PM
IndustrialLemon, on 10 November 2018 - 02:16 AM, said:
#46
Posted 24 November 2018 - 02:32 PM
As far as interesting changes go (you can see the full changelog on GitHub)
- Rename all tile entities to have the correct computercraft: prefix. Existing tile entities should be mapped via a data fixer, but please tell me if you encounter issues.
- Fix files not being truncated when opened for a write.
- .read* methods no longer fail on malformed unicode. Malformed input is replaced with a fake character (this is what CC did before).
- Fix numerous issues caused when wireless modems were attached to wireless networks.
In preparation for this release, we updated SwitchCraft to use a development build of CC:T, just to see how stable it was. Unfortunately, the answer came all too soon, as SwitchCraft crawled to a halt.
Due to some other changes, some wireless modem code was now being called far more frequently than before. The function in question acquired a lock, added of removed something from a collection, and released the lock. However, this function would be called both on the main thread, and by several computers off-thread. The main thread would spent an awful lot of time waiting for other threads to finish, and so lagging the sever.
While we were able to fix this quite quickly (it turned out the lock wasn't really needed), we started having other issues - somehow, Java had created far too many threads, and so was unable to execute critical tasks. We didn't previously keep track of how many threads the JVM was using, but after adding that, we were able to see there was a bit of a problem.
While the number of "live" threads was pretty steady, the total number of threads ever created was growing. Rapidly. In fact, the JVM was creating, and then promptly destroying, 50 threads per second. The obvious solution here was to pool the threads: instead of creating and destroying them, we can take a thread from the pool, use it to run some Lua, and then return it once finished. This means you only need to create new threads when the pool is empty.
A couple of modifications to Cobalt later, and we had a graph which looked like this. The total number of threads looks far more healthy, but the number of live threads never goes down! The thread pool was set to evict threads which hadn't been used for a while, so something else was going on. It turns out, computers were not correctly cleaning up their coroutines when they shut down. We had a couple of computers which were stuck in boot loops, which only exacerbated the problem. Thankfully this was trivial to fix, leaving us with a graph which looks much more sane.
Ideally in the future, we would be able to move Cobalt to use one thread for all coroutines, which would substantially reduce the number of threads used (of the server's ~1.2k threads, ~1.1k are created by ComputerCraft), however that is still a way away. This'll have to do for now...
I'm sure there was a point for me writing this massive wall of text, but it eludes me. I hope somebody maybe finds this a little bit interesting .
#47
Posted 25 November 2018 - 02:16 AM
#48
Posted 25 November 2018 - 09:35 AM
Bomb Bloke, on 25 November 2018 - 02:16 AM, said:
#49
Posted 25 November 2018 - 10:51 PM
#50
Posted 26 November 2018 - 10:57 AM
Bomb Bloke, on 25 November 2018 - 10:51 PM, said:
- There are a reasonable number of computers which don't do anything, but need to respond to events when they get them. For instance, SC has a lot of shops, which need to respond to monitor touches.
- CC:T has a command to shutdown all (or some) servers on a computer. We've used this in the past when the server is utterly choking, but you find the number of "on" computers is pretty much at the normal level within a few hours.
- I'd argue that punishing computers not doing anything is a little counter-productive. Obviously every computer is a bit of a memory (and thread) drain, but computers doing more work than required is definitely more of an issue than computers just sitting doing nothing at all.
*I've just realised that SwitchCraft has just become one giant data-gathering operation for CC now. Oh well.
#51
Posted 20 December 2018 - 06:02 PM
Changes from the last CC:Tweaked release
- Using longs inside .seek rather than 32 bit integers. This allows you to seek in very large files.
- Move the /computer command into the main /computercraft command
- Allow copying peripheral names from a wired modem's attach/detach chat message.
- Fix InventoryUtil ignoring the stack limit when extracting items
- Fix computers not receiving redstone inputs sent through another block.
- Fix JEI responding to key-presses when within a computer or turtle's inventory.
#52
Posted 21 December 2018 - 08:50 AM
#53
Posted 11 January 2019 - 09:57 PM
The big change this release is that I've (finally) rewritten the http API to entirely use Netty. While Netty has been used for websockets since they were first introduced, we've always depended on the Java standard library to make http requests. While this is convenient, it does end up being rather limiting in what we can do with it. The switch to netty offers several small, but critical advantages:
- Support http to https redirects: While the http API has always handled redirects on the same protocol, it wouldn't allow redirecting between protocols. This means websites which automatically upgrade you to https will function as expected.
- Allow using the PATCH request method: We've allowed using most other methods for a while now (GET, POST, PUT, DELETE, etc...), but not PATCH. This meant you had to use custom headers to interact with some REST APIs.
- Less thread usage: Previously, every HTTP request would be run on a separate thread, which was a little inefficient. The asynchronous nature of netty means that ComputerCraft should rarely go above 8 threads, how ever many concurrent HTTP requests you are making.
Just a couple of other things which changed this release:
- The config file has had a bit of a spring cleaning: Related properties should be grouped into child categories (http, turtle, peripheral), which makes the whole file a little easier to navigate. This should be automatically upgraded when you load the mod, but let me know if you experience issues.
- I've also begun work on implementing the long-discussed HTTP limits, as described in this issue. I've tested them a fair bit, but again if you experience issues (or regressions with the netty changes), do report them so they can be fixed ASAP!
- There's also been an awful lot of cleanup going on throughout the main CC codebase. This issue documents it a little more, but we're pretty much just replacing our home-grown implementations with ones built into vanilla or Forge. It means we can delete an awful lot of code (always a plus), and hopefully make things more consistent too.
#54
Posted 21 January 2019 - 05:30 PM
Changelog
- Allow seeking within ROM files. I've wanted this since the initial implementation, but there were some unexpected problems. I've finally got round to implementing this (though it possibly is of dubious use).
- Make several tile entities (modems, cables, and monitors) non-ticking, substantially reducing their overhead, On SwitchCraft this reduced tick time by about 10ms, though this is probably more than most people will see due to the Sponge overhead and the rather large number of monitors and cables.
That said, it's still a pretty large change, so let me know if you experience issues related to any of the peripheral blocks.
- Fix cables not rendering the breaking steps
- Try to prevent /computercraft_copy showing up in auto-complete.
- Fix several memory leaks and other issues with ROM mounts.
- Fix not being able to craft upgraded turtles or pocket computers when Astral Sorcery was installed.
#55
Posted 24 January 2019 - 09:44 PM
Spoilers! Yeah, I can't draw numbers very well.
Edited by SquidDev, 24 January 2019 - 09:45 PM.
#56
Posted 24 January 2019 - 10:39 PM
#57
Posted 21 February 2019 - 10:22 PM
Yeah, I'm bad at screenshots.
Anyway, I've just pushed an alpha of CC:Tweaked for Forge 1.13.2. A couple of things to note:
- Forge is still pretty unstable (for instance, the current build, .45 is broken - you'll have to use .44). As a result, there's currently some features we can't implement and bugs we can't fix (there's some container desync, turtle upgrades don't always render. This should be resolved over the coming weeks.
- This is not compatible with previous worlds: the save format has changed a lot, and there's nothing I can do to load worlds created in 1.12 or before.
- We're still an alpha, and Minecraft internals have changed a lot - there will be bugs, and there are still changes to be made.
It's probably worth mentioning at this point that 1.12 will remain in development for a wee while yet - I'm expecting it to take a while before 1.13 has become "mainstream" (and 1.14 will probably be out before then).
#58
Posted 23 February 2019 - 11:02 AM
Now, onto more exciting things! Like with most CC:T releases, there's been a fair few changes, but you're unlikely to notice any of them. The "big" change is that Cobalt got a lot of long-needed attention, meaning it's even more compliant to standard Lua, and a wee bit less resource intensive in places. Many thanks to SwitchCraft yet again for helping test things.
Also, many thanks to Lignum and WIlma456 for their PRs - one of the sad things about CC:T is that it has had much less community involvement than the original repo, so it's always nice to have other contributors! Anyway, the changelog:
Changes from the last CC:Tweaked release
- Handle connection errors on websockets (Devilholk)
- Make require a little more consistent with PUC Lua, passing the required name to modules and improving error messages.
- Track how long each turtle action takes within the profiling tools
- Bump Cobalt version
- Coroutines are no longer backed by threads, reducing overhead of coroutines.
- Maximum stack depth is much larger (2^16 rather than 2^8)
- Stack is no longer unwound when an unhandled error occurs, meaning debug.traceback can be used on dead coroutines.
- Coroutines are no longer backed by threads, reducing overhead of coroutines.
- Reduce jar size by reducing how many extra files we bundle.
- Add term.nativePaletteColo(u)r (Lignum)
- Split colours.rgb8 into colours.packRGB and colours.unpackRGB (Lignum)
- Printers now only accept paper and ink, rather than any item
- Allow scrolling through the multishell tab bar, when lots of programs are running. (Wilma456)
- Fix modems not being advanced when they should be
- Fix direction of some peripheral blocks not being set
- Strip \r from .readLine on binary handles.
- Websockets handle pings correctly
- Fix turtle peripherals becoming desynced on chunk unload.
- /computercraft tables are now truncated correctly
#60
Posted 25 February 2019 - 10:45 AM
Bomb Bloke, on 25 February 2019 - 09:46 AM, said:
Edited by SquidDev, 25 February 2019 - 01:04 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users