Jump to content




[MC 1.8.9-1.11.2] CC Tweaks


288 replies to this topic

#61 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 10 September 2015 - 08:33 PM

Hmm. Nope. pullItemRemote and pushItemRemote are not showing on peripherals.

We have

OpenModsLib-1.7.10-0.8
OpenPeripheral-1.7.10-AIO-5
CCTweaks-1.7.10-0.2.2
BiblioCraft[v1.11.0][MC1.7.10]

And those 2 methods don't show on wrap and are not valid to call eather.

Edited by wojbie, 10 September 2015 - 08:35 PM.


#62 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 10 September 2015 - 08:41 PM

View Postwojbie, on 10 September 2015 - 08:33 PM, said:

Hmm. Nope. pullItemRemote and pushItemRemote are not showing on peripherals.

And those 2 methods don't show on wrap and are not valid to call eather.

Right. I'll debug now. I've created some issues on GitHub for these two which is probably the best place to follow them and add any additional information.

Edit: In regards to OpenPeripheral: It should be a fairly trivial fix. They've renamed a method which means some of the hackery I need to do breaks. I'll try to fix this in the next couple of days.

Edited by SquidDev, 10 September 2015 - 08:48 PM.


#63 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 12 September 2015 - 05:16 PM

View Postwojbie, on 10 September 2015 - 08:33 PM, said:

Hmm. Nope. pullItemRemote and pushItemRemote are not showing on peripherals.

And those 2 methods don't show on wrap and are not valid to call eather.

I've just published CCTweaks 0.2.2.1 to Curse to fix issues with OpenPeripheral. It should show up in the next hour or so.

#64 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 18 September 2015 - 06:51 AM

I've released a fix for some concurrency issues with networking which should (fingers crossed) fix server crashes people were having.

CCTweaks 0.2.2.2 is available on Curse as always. It should show up in the next hour or so.

Edited by SquidDev, 10 October 2015 - 02:44 PM.


#65 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 10 October 2015 - 02:56 PM

So. I appear to have fixed The String Bug.

CCTweaks 0.2.3 can be downloaded on Curse. This update also prevents unnecessary chunk-loading when loading networks, fixes some bugs and improves debugging capabilities.

It can take an hour or so for the download to appear on Curse.

Edited by SquidDev, 10 October 2015 - 02:59 PM.


#66 Justy

  • Members
  • 210 posts
  • LocationCLGD

Posted 10 October 2015 - 08:32 PM

View PostSquidDev, on 10 October 2015 - 02:56 PM, said:

So. I appear to have fixed The String Bug.

CCTweaks 0.2.3 can be downloaded on Curse. This update also prevents unnecessary chunk-loading when loading networks, fixes some bugs and improves debugging capabilities.

It can take an hour or so for the download to appear on Curse.
What is this "String Bug" you speak of?

#67 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 10 October 2015 - 09:27 PM

View Postjustync7, on 10 October 2015 - 08:32 PM, said:

-snip-
What is this "String Bug" you speak of?

It's a long-standing bug that ComputerCraft has (I think the bug is from LuaJ so it's not CC's fault). The bug has to do with one of the ways that LuaJ/CC uses strings and so is known as "the string bug".

Edit: Below post explains it better.

Just in case it disappears or something

Edited by Lupus590, 10 October 2015 - 10:09 PM.


#68 ElvishJerricco

  • Members
  • 803 posts

Posted 10 October 2015 - 09:53 PM

View Postjustync7, on 10 October 2015 - 08:32 PM, said:

What is this "String Bug" you speak of?

To elaborate, binary data can't be represented in String form when converting between Java and Lua, because LuaJ treats all binary data as Unicode. This mangles the data supposedly irreparably. So the HTTP api (which only returns strings) can't be used to download binary files such as zip files.

#69 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 11 October 2015 - 12:32 AM

View PostSquidDev, on 10 October 2015 - 02:56 PM, said:

So. I appear to have fixed The String Bug.

Could you please elaborate? I gave this code snippet a try with CCTweaks 0.2.3 installed, but chars 128 and above fail as usual;

local array = {}

for i = 0, 255 do
	array[i+1] = i
end

array = string.char(unpack(array))

local out = fs.open("test.txt", "w")
out.writeLine(array)
out.close()

local ink = fs.open("test.txt", "r")
print(array == ink.readLine() and "Match!" or "Mismatch...")
ink.close()


#70 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 11 October 2015 - 11:49 AM

View PostBomb Bloke, on 11 October 2015 - 12:32 AM, said:

View PostSquidDev, on 10 October 2015 - 02:56 PM, said:

So. I appear to have fixed The String Bug.

Could you please elaborate? I gave this code snippet a try with CCTweaks 0.2.3 installed, but chars 128 and above fail as usual;

Should have explained. The fs API is the only one I haven't patched, partially because it is the most work, and partially because binary mode exists already. There isn't 'one size fits all' solution to the string bug so I've rewritten the relevant bits of most APIs (http, os.queueEvent, rednet) to support binary transfer. If people want it, I'll also patch the fs API but I left it as is for this release.

TLDR:
Everything works but fs.

#71 ElvishJerricco

  • Members
  • 803 posts

Posted 11 October 2015 - 10:38 PM

View PostSquidDev, on 11 October 2015 - 11:49 AM, said:

Should have explained. The fs API is the only one I haven't patched, partially because it is the most work, and partially because binary mode exists already. There isn't 'one size fits all' solution to the string bug so I've rewritten the relevant bits of most APIs (http, os.queueEvent, rednet) to support binary transfer. If people want it, I'll also patch the fs API but I left it as is for this release.

TLDR:
Everything works but fs.

Couldn't you patch the LuaJ string conversion methods to fix everything?

#72 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 12 October 2015 - 06:36 AM

View PostElvishJerricco, on 11 October 2015 - 10:38 PM, said:

Couldn't you patch the LuaJ string conversion methods to fix everything?

Tried that. Doesn't work. Instead I avoid string conversion entirely and replace instances of String with byte[] (this is on an opt in basis in order not to break peripherals, etc...). This means I have to go through the class and find the best way of rewriting it. In the case of HTTP I just rewrote the entire thing (because BufferedReader also tries to encode the byte array). The filesystem is much more complicated than HTTP so I didn't touch it. I'll probably have a go over the next couple of days to see how possible it is.

#73 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 16 October 2015 - 05:43 PM

Just released CCTweaks 0.2.3.1 (available from all good retailers, or failing that just Curse). This should fix crashes when passing tables to peripheral methods.

#74 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 16 October 2015 - 07:30 PM

The quadrocopers bug is fixed

#75 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 17 October 2015 - 02:09 PM

View PostSquidDev, on 11 October 2015 - 11:49 AM, said:

Should have explained. The fs API is the only one I haven't patched, partially because it is the most work, and partially because binary mode exists already. There isn't 'one size fits all' solution to the string bug so I've rewritten the relevant bits of most APIs (http, os.queueEvent, rednet) to support binary transfer. If people want it, I'll also patch the fs API but I left it as is for this release.

TLDR:
Everything works but fs.

I've just implemented binary support for the file system (so file-system handles support can read/write binary without enabling the "b" flag). It will probably end up in the next CCTweaks version.

#76 Justy

  • Members
  • 210 posts
  • LocationCLGD

Posted 18 October 2015 - 05:27 AM

View PostElvishJerricco, on 10 October 2015 - 09:53 PM, said:

snip

View PostLupus590, on 10 October 2015 - 09:27 PM, said:

snip
Oh. That bug. That explains why Dan was complaining about how Lua doesn't have a 'string' type, just an array of bytes called 'string'. Thanks for the explanation.

#77 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 20 October 2015 - 07:26 PM

We just passed 1024 downloads on Curse! Thanks for everyone for the support!

#78 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 05 November 2015 - 06:09 PM

Just released CCTweaks 0.2.3.2 (I love versioning :)). This adds:
  • Bind to/from block for turtle wireless bridge
  • Binary support for file system
  • HTTP response headers (use getResponseHeaders)
  • HTTP response is sent as additional argument on failure (on the "http_failure" event).
It should appear on Curse in the next hour or so.

#79 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 05 November 2015 - 06:33 PM

What is a binary filesystem?

#80 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 05 November 2015 - 07:35 PM

View PostCreator, on 05 November 2015 - 06:33 PM, said:

What is a binary filesystem?

It is just my fix for the string bug applied to the filesystem, so you can now use readAll and write("\234 and other characters above 127") without it being corrupted.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users