Jump to content


Cruor's Content

There have been 9 items by Cruor (Search limited from 10-February 22)


By content type

See this member's

Sort by                Order  

#194699 What are you planning to do with the new Computercraft 1.64 features?

Posted by Cruor on 29 September 2014 - 07:39 AM in General

First thing i'm going to do is check for a config option to turn off the new functions, and if there isn't one, I will make an ASM patch to get one. I do not approve of the new functions, what so ever...
It's one of the things I loved about turtle's design, the fact that they were so simple. Having to compare Blocks/items and use refuel(0) and craft(0) to figure out what stuff is.



#194706 What are you planning to do with the new Computercraft 1.64 features?

Posted by Cruor on 29 September 2014 - 10:11 AM in General

Yes it makes it easier, and it breaks the forth wall. In my honest opinion these are borderline overpowered functions and should at the very least be posible to turn off(and as far as I know there is no config option).
Not to mention that it makes clever setups and use of compare and compareTo redundant.



#194819 What are you planning to do with the new Computercraft 1.64 features?

Posted by Cruor on 30 September 2014 - 08:37 PM in General

View Postnitrogenfingers, on 29 September 2014 - 01:02 PM, said:

View PostCruor, on 29 September 2014 - 10:11 AM, said:

Yes it makes it easier, and it breaks the forth wall. In my honest opinion these are borderline overpowered functions and should at the very least be posible to turn off(and as far as I know there is no config option).

Out of curiosity what exactly makes them overpowered? You can create the exact same effect by having a bunch of compareTo's as you say, but the difference is this is substantially easier to set up. I'm not sure "easy" and "powerful" are necessarily equivalent...

Not that I'm saying I disagre with you, I'm still not sure what to make of the changes. But I'd like to use these to update my butler, make him a bit more efficient and provide more feedback to the user over what's happening.

I mean it simplifies stuff way to much. Writing stuff to interact with blocks and items is way to simple now.

For example, here is some pictures of my proof of concept sorting system: http://imgur.com/a/56tlB
Code is 90 lines, nothing is hardcoded, turtles are configured by putting items in various slots.
The amount of time used to set up the system is around two minutes, it has NONE of the limitations of a pre 1.64 sorting system.
I can put down as many turtles as I want, support as many items as I want per turtle side, and even supports items with different damage values.

Way to powerful and easy to use in my honest opinion.



#195633 Shurtle Preview

Posted by Cruor on 08 October 2014 - 08:28 PM in General

Shurtle is a stack based language for making turtle movement from the shell more convenient.

The project was started because I found the built in `go` program too inconvenient, and wanted something which was easier to use, and more powerful.
So far Shurtle supports more than just basic Turtle movment. It has for loops, while loops and ternary, making it able to do most of your turtle shenanigans.

Documentation and example programs are work in progress.

Documentation as of 2015-07-26

Example farm program

Old preview video

At the moment the project is still in alpha, and is not publicly available.



#227655 Shurtle Preview

Posted by Cruor on 26 July 2015 - 02:11 PM in General

Cleaned up topic. Documentation and example code added.



#195429 Post your desktop!

Posted by Cruor on 06 October 2014 - 09:06 PM in General

I'm so hyped for putting my desktop picture in here.
Spoiler


That was... boring...



#213418 [1.7.10] Sleep sleeping for incorrect amount of ticks

Posted by Cruor on 10 April 2015 - 05:19 PM in Bugs

MC 1.7.10, CraftOS 1.6, ComputerCraft1.65
Bug is also in latest beta (1.74pr20)

When sleeping for 0.2s towards 0.65s included, it adds another tick. Meaning a 0.2s sleep actually is 0.25, and so on.

Output from test program, first arg is sample count, second is time. (Yes, it is consistent with higher sample count)
Posted Image


Edit:
After decompiling the source, the problem seems to be in OSAPI.java
   public void advance(double dt) {
	  Map var3 = this.m_timers;
	  synchronized(this.m_timers) {
		 this.m_clock += dt;
		 Iterator previousTime = this.m_timers.entrySet().iterator();
		 while(previousTime.hasNext()) {
			Entry entry = (Entry)previousTime.next();
			OSAPI.Timer previousDay = (OSAPI.Timer)entry.getValue();
			previousDay.m_timeLeft -= dt;
			if(previousDay.m_timeLeft <= 0.0D) {
			   this.queueLuaEvent("timer", new Object[]{entry.getKey()});
			   previousTime.remove();
			}
		 }
	  }
The inaccuracy is caused by the use of doubles at the m_timeLeft -= dt;
Digging deeper, said method is called from ServerComputer.java
   public void update() {
	  super.update();
	  this.m_computer.advance(0.05D);
	  this.m_changedLastFrame = this.m_changed || this.m_computer.pollChanged();
	  this.m_computer.clearChanged();
	  this.m_changed = false;
	  ++this.m_ticksSincePing;
   }

Edit 2:
Proof that this is due to the use of doubles, and not tick alignment (or whatever other magical phenomenon you specify it under).
https://ideone.com/hqthf8
Incase Ideone doesn't keep paste around

Can this be changed to ticks represented in integers instead?



#217817 [1.7.10] Sleep sleeping for incorrect amount of ticks

Posted by Cruor on 19 May 2015 - 07:31 PM in Bugs

Added Java code too show the problem with using doubles.



#216957 [1.7.10] Sleep sleeping for incorrect amount of ticks

Posted by Cruor on 12 May 2015 - 04:08 PM in Bugs

Added more details and potential solution.