Jump to content




CraftOS 2.0 - Dan's Secret Project

computer help

  • You cannot reply to this topic
798 replies to this topic

#522 Creator

    Mad Dash Victor

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

Posted 01 December 2015 - 08:35 AM

Doesn't luaj have bugs luac hasn't?

#523 ElvishJerricco

  • Members
  • 803 posts

Posted 01 December 2015 - 12:02 PM

View PostCreator, on 30 November 2015 - 06:59 PM, said:

Running it on Java would be slow. Isn't there a C/C++ implementation? I believe it'd be faster.

This is a common misconception about Java. It isn't slow. According to benchmarks, it's actually quite fast. The JIT makes it able to keep up with C in real world applications. Occasionally, Java can even beat C, because of its ability to consolidate optimizations between libraries (optimizations through dynamic linking). Truthfully, it will often be on the wrong side of C, and perform marginally slower. But it's forgivable, and still very fast.

Java's performance problems come in the way of the garbage collector, and programming poorly for it. Minecraft is so much less performant than its Win10 and mobile C/C++/C# (whichever it is) equivalents because those versions have been properly optimized, and aren't destroying a GC. Java Minecraft is written such that it hammers the GC, which slows it down significantly.

That said, I have no evidence to claim whether LuaJ is slower or faster than Lua. That's dependent on how well / poorly LuaJ and Lua are written. I'd have to look at benchmarks.

Edited by ElvishJerricco, 01 December 2015 - 03:52 PM.


#524 SquidDev

    Frickin' laser beams | Resident Necromancer

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

Posted 01 December 2015 - 01:54 PM

View PostElvishJerricco, on 01 December 2015 - 12:02 PM, said:

That said, I have no evidence to claim whether LuaJ is slower or faster than Lua. That's dependent on how well / poorly LuaJ and Lua are written. I'd have to look at benchmarks.

Based off the benchmarks for LuaJ 3.0 some elements run faster, most run slower than native Lua (some are up to half the speed). LuaJC is much faster than Lua, but is still beaten by Lua on some benchmarks. There are some elements of LuaJ which could be optimised - I guess it could also be possible to write a runtime JIT compiler for LuaJ like JRuby has.

#525 FUNCTION MAN!

  • Members
  • 292 posts

Posted 01 December 2015 - 10:45 PM

I'd rather see it using LuaJIT than the alternatives. It beats HotSpot by miles, and most times is faster than C for common applications, in both dev-time and run-time.

#526 Creeper9207

  • Members
  • 211 posts

Posted 01 December 2015 - 10:51 PM

Looks like a CC is being made for 1.8 as well

Edited by Creeper9207, 01 December 2015 - 10:52 PM.


#527 FUNCTION MAN!

  • Members
  • 292 posts

Posted 02 December 2015 - 12:39 AM

Yea, but that's boring CC.

#528 Bomb Bloke

    Hobbyist Coder

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

Posted 02 December 2015 - 12:41 AM

Sounds like good news to me, but I DO hope that the monitor and bit API bugs are fixed for MC 1.7.10.

#529 FUNCTION MAN!

  • Members
  • 292 posts

Posted 02 December 2015 - 12:45 AM

View PostBomb Bloke, on 02 December 2015 - 12:41 AM, said:

Sounds like good news to me, but I DO hope that the monitor and bit API bugs are fixed for MC 1.7.10.

Ah, yes, that would be good news indeed.

#530 oeed

    Oversimplifier

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

Posted 02 December 2015 - 10:56 AM

Yeah, it was a CC update after all.

https://twitter.com/...824488883965954

Sounds like it'll delay CraftOS 2.0 by a few weeks, but it'll certainly be a great update.

#531 SquidDev

    Frickin' laser beams | Resident Necromancer

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

Posted 02 December 2015 - 05:10 PM

Are we allowed to do feature requests? (I know suggestions exists, but most of these have been said there before and I don't want to bump topics).

Lua 5.2
I know Dan has mentioned it - 1.8 is such a change for most mods that I feel it would be fine breaking most programs too. Then we also suffer the pain of updating our code to 1.8! Also I love _ENV, and LuaJ 3.0 is multithreaded.

Binary fix
Its possible, just a pain to do. Something like CCTweaks's IArguments to handle both binary and string arguments would be nice.

Bit operators fix
This is just the matter of casting to long then int. Also, Lua 5.3 uses longs (64 bit) instead of 32 bit integers, so it would be nice to have a bit64 library as well as a bit32 one.

Network API
So CCTweaks doesn't have to. Puppy eyes

I'm really grateful that Dan has started the port (and to those who have sponsored him).

Edited by SquidDev, 02 December 2015 - 05:10 PM.


#532 apemanzilla

  • Members
  • 1,421 posts

Posted 02 December 2015 - 07:07 PM

View PostSquidDev, on 02 December 2015 - 05:10 PM, said:

Are we allowed to do feature requests? (I know suggestions exists, but most of these have been said there before and I don't want to bump topics).

Lua 5.2
I know Dan has mentioned it - 1.8 is such a change for most mods that I feel it would be fine breaking most programs too. Then we also suffer the pain of updating our code to 1.8! Also I love _ENV, and LuaJ 3.0 is multithreaded.

Binary fix
Its possible, just a pain to do. Something like CCTweaks's IArguments to handle both binary and string arguments would be nice.

Bit operators fix
This is just the matter of casting to long then int. Also, Lua 5.3 uses longs (64 bit) instead of 32 bit integers, so it would be nice to have a bit64 library as well as a bit32 one.

Network API
So CCTweaks doesn't have to. Puppy eyes

I'm really grateful that Dan has started the port (and to those who have sponsored him).

What do you mean by network API?

#533 Creator

    Mad Dash Victor

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

Posted 02 December 2015 - 07:23 PM

Like TCP and stuff. Enhanced HTTP.

#534 SquidDev

    Frickin' laser beams | Resident Necromancer

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

Posted 02 December 2015 - 08:28 PM

View PostCreator, on 02 December 2015 - 07:23 PM, said:

Like TCP and stuff. Enhanced HTTP.

No (though I'd like it and CCTweaks also does it). Actually I meant the ability to extend the wired network with custom components - it is a really useful thing for mod developers to be able to do. Also a turtle refuel API.

Edited by SquidDev, 02 December 2015 - 08:29 PM.


#535 Creator

    Mad Dash Victor

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

Posted 02 December 2015 - 08:41 PM

View PostSquidDev, on 02 December 2015 - 08:28 PM, said:

View PostCreator, on 02 December 2015 - 07:23 PM, said:

Like TCP and stuff. Enhanced HTTP.

No (though I'd like it and CCTweaks also does it). Actually I meant the ability to extend the wired network with custom components - it is a really useful thing for mod developers to be able to do. Also a turtle refuel API.

But CC2.0 will be outside of MCN, then why an enhanced modem API?

#536 apemanzilla

  • Members
  • 1,421 posts

Posted 02 December 2015 - 10:04 PM

View PostSquidDev, on 02 December 2015 - 08:28 PM, said:

View PostCreator, on 02 December 2015 - 07:23 PM, said:

Like TCP and stuff. Enhanced HTTP.

No (though I'd like it and CCTweaks also does it). Actually I meant the ability to extend the wired network with custom components - it is a really useful thing for mod developers to be able to do. Also a turtle refuel API.
Ah, yes, both of those would be useful. I assumed you meant an in-game API.

#537 SquidDev

    Frickin' laser beams | Resident Necromancer

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

Posted 02 December 2015 - 10:07 PM

View PostCreator, on 02 December 2015 - 08:41 PM, said:

But CC2.0 will be outside of MCN, then why an enhanced modem API?

I was talking about the pending 1.8 release - this has become more of a "look what Dan has tweeted" thread.

#538 Bomb Bloke

    Hobbyist Coder

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

Posted 02 December 2015 - 10:11 PM

View PostSquidDev, on 02 December 2015 - 05:10 PM, said:

Lua 5.2
I know Dan has mentioned it - 1.8 is such a change for most mods that I feel it would be fine breaking most programs too. Then we also suffer the pain of updating our code to 1.8!

Truth be told, we can already make a start on such updates; there's a config option in ComputerCraft.cfg which attempts to disable all 5.1-specific functions in favour of their 5.2 counterparts.

Beats me how "complete" the conversion is, but I'd wager it's sufficient for most scripters to get their compatibility tweaks in place before 5.2 appears for reals.

#539 FUNCTION MAN!

  • Members
  • 292 posts

Posted 02 December 2015 - 11:57 PM

I personally really don't care about Lua 5.2. Lua 5.3 is where it's at! Bitwise operators and utf8 and actual integers yes please.

#540 Creeper9207

  • Members
  • 211 posts

Posted 03 December 2015 - 02:28 AM

Does LuaJ support java 8 or just 7?

#541 Bomb Bloke

    Hobbyist Coder

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

Posted 03 December 2015 - 03:50 AM

Most software compiled under an older JDK will operate just fine with a newer JRE. Heck, I still use Java 6 to build the few classes I make (though I'm obviously a bit better about keeping my runtime environments up to date). Granted, compatibility isn't 100% for all programs, but it's pretty good.

In the case of LuaJ, I'm using it just fine under Java 8. I suspect over half of ComputerCraft's userbase is doing the same.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users