This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Kolpa's profile picture

[Socket]

Started by Kolpa, 03 May 2012 - 05:05 PM
Kolpa #1
Posted 03 May 2012 - 07:05 PM
coud u maybe add support for using the socket requier :)/>/> as far as i know u can enable luajava to add requiers :)/>/> i realy woud like to see that to actualy code 'real' chats or other real server systems :)/>/>
Cloudy #2
Posted 03 May 2012 - 09:41 PM
coud u maybe add support for using the socket requier :)/>/> as far as i know u can enable luajava to add requiers :)/>/> i realy woud like to see that to actualy code 'real' chats or other real server systems :)/>/>

Your post makes little sense (what the hell is a requier?) but I'm guessing you're wanting socket support in CC by default.

Unlikely to happen by default, however you can by all means code a peripheral.
Kolpa #3
Posted 06 May 2012 - 07:10 PM
well u not knowing what a require is doesnt remove the sense of my post :)/>/>
require is similar to include in java :)/>/>
Cloudy #4
Posted 06 May 2012 - 07:26 PM
well u not knowing what a require is doesnt remove the sense of my post :)/>/>
require is similar to include in java :)/>/>

Yes, but the context you used it didn't make sense. English is not your native language, so I'll cut you some slack.

Adding sockets isn't as simple as typing "require sockets". A peripheral could be made to do it, however.
Kolpa #5
Posted 07 May 2012 - 01:31 PM
well it is when u are able to add the embed function to cc and have the socket api in the pc folder :)/>/>
Xtansia #6
Posted 07 May 2012 - 02:06 PM
You do realise that this is a Lua interpreter based in Java and most libraries like sockets are written in C?
Cloudy #7
Posted 07 May 2012 - 04:22 PM
You do realise that this is a Lua interpreter based in Java and most libraries like sockets are written in C?

Well sockets are easily possible in Java - and easy to put into a peripheral. But it definitely isn't as simple as "require sockets" and then they are in ComputerCraft :)/>/>
Xtansia #8
Posted 07 May 2012 - 11:36 PM
You do realise that this is a Lua interpreter based in Java and most libraries like sockets are written in C?

Well sockets are easily possible in Java - and easy to put into a peripheral. But it definitely isn't as simple as "require sockets" and then they are in ComputerCraft :)/>/>

But that is what he was meaning was putting the C library in you pc folder and then being able to call require sockets
Xfel #9
Posted 08 May 2012 - 08:30 AM
You do realise that this is a Lua interpreter based in Java and most libraries like sockets are written in C?

Well sockets are easily possible in Java - and easy to put into a peripheral. But it definitely isn't as simple as "require sockets" and then they are in ComputerCraft :)/>/>

But that is what he was meaning was putting the C library in you pc folder and then being able to call require sockets

And the java SE runtime contains a java wrapper api for sockets. Where is the problem?
Xtansia #10
Posted 08 May 2012 - 11:06 AM
You do realise that this is a Lua interpreter based in Java and most libraries like sockets are written in C?

Well sockets are easily possible in Java - and easy to put into a peripheral. But it definitely isn't as simple as "require sockets" and then they are in ComputerCraft :)/>/>

But that is what he was meaning was putting the C library in you pc folder and then being able to call require sockets

And the java SE runtime contains a java wrapper api for sockets. Where is the problem?

I'm not talking about a Java implementation of Sockets I'm talking about what the original question was which was the ability to put the LuaSockets library file in you computers folder and then be able to call "require socket" as you would on a standard lua installation.
Xfel #11
Posted 09 May 2012 - 01:04 PM
Definetely no. The original libraries are not compatible with luaj. the luaj vm works completely different from the default lua one.