42 posts
Posted 18 October 2012 - 06:08 AM
Hi,
This is mostly to dan but I have just got a Raspberry ∏ and the OS (I don't know how you spell more then one OS, it would be grate it someone told me thanks.) that are out there are a bit to steep to learn hopefully this is not to much to ask but will someone create a ComputerCraft OS for the Raspberry ∏ that would be grate you would need a input output API for it and it would be cool for a input output API for rednet.
thanks
2005 posts
Posted 18 October 2012 - 07:32 AM
Are you suggesting making a version of ComputerCraft that runs on your Raspberry or making a Raspberry in CC? Or are you suggesting that Computer Craft support Python in addition to Lua?
42 posts
Posted 18 October 2012 - 02:44 PM
a version of computercraft that runs on the raspberry ∏ and making the raspberry ∏ a cc terminal
2005 posts
Posted 18 October 2012 - 05:32 PM
Well, who's to say that the CC terminal isn't a raspberry powered box? Not me. Perhaps you could give some specific ideas of what you would like to see changed to make it seem more like a raspberry?
But as for the other, whether you can run forge/modloader powered mods on different platforms is ultimately not up to the CC development team. It's up to forge and modloader.
1 posts
Posted 21 October 2012 - 09:24 PM
I read this post and I went and asked my dad who is a EE if you can program the raspberry pi to run like a LUA terminal and he said it is possible to do it.But it would be a challenge to add programs on pastebin.
2005 posts
Posted 21 October 2012 - 10:12 PM
See, the CC computers are raspberries that use lua. That's why they're so cheap.
2447 posts
Posted 21 October 2012 - 11:49 PM
Surely Lua can just run on the pi? You could add some stuff to control the pins etc - could be neat!
1619 posts
Posted 05 November 2012 - 06:18 PM
Om nom nom
1243 posts
Location
Indiana, United States
Posted 05 November 2012 - 11:32 PM
Om nom nom
What the hell is this? -.-
1214 posts
Location
The Sammich Kingdom
Posted 05 November 2012 - 11:59 PM
Om nom nom
What the hell is this? -.-
He was obviously hungry so he ate a cookie.
147 posts
Location
England
Posted 07 November 2012 - 06:43 AM
I doubt anyone would want to work with assembly. So this suggestion is highly unlikely to be made. And why buy a raspberry pi and complain it is too hard to understand, its the whole point. If you start hard you will be a great programmer. Lua is a cool language but you can't use it in many things as its just a scripting language. If you want to make programs and games I suggest just sticking with the OSes supported by the device and learn from there.
For Dan to make this possible he would have to create a shell in assembly and then make it so assembly has all the Lua functions as there will be no APIs for it like the Java Lua api that CC uses. Hard stuff
997 posts
Location
Wellington, New Zealand
Posted 07 November 2012 - 04:49 PM
Jasonfran, you have tempted me to write an OS in Lua just to prove you wrong….
2217 posts
Location
3232235883
Posted 07 November 2012 - 07:43 PM
Jasonfran, you have tempted me to write an OS in Lua just to prove you wrong….
Do it.
147 posts
Location
England
Posted 07 November 2012 - 08:49 PM
Go for it. Its such a shame you can't write an operating system in Lua though
496 posts
Location
New Zealand
Posted 07 November 2012 - 11:29 PM
Go for it. Its such a shame you can't write an operating system in Lua though
And why not?
147 posts
Location
England
Posted 08 November 2012 - 04:48 AM
Go for it. Its such a shame you can't write an operating system in Lua though
And why not?
Uh because its not a machine language, its a scripting language. You CANNOT write a computer operating system in Lua as CPUs don't comprehend it, they are built to run on Assembly.
The only way computercraft works is because it uses a Java API that emulates it. About 50% of the Lua functions in CC are Java, all the OS api is Java based. You can write and operating system then add a Lua scripting environment but you'd need an API that emulates Lua, and you can't get them for Assembly. Go ahead, try but fail early on
3790 posts
Location
Lincoln, Nebraska
Posted 08 November 2012 - 06:43 AM
All you need is a C compiler, and you can write an OS with Lua. That is the MINIMUM requirement for Lua to work. If you read about Lua in their documentation, you see it's already embedded in microprocessors, and several other small footprint areas such as smartphones and toys. Can't you put a C compiler on the raspberry pi and then run Lua through it?
1243 posts
Location
Indiana, United States
Posted 08 November 2012 - 08:56 AM
All you need is a C compiler, and you can write an OS with Lua. That is the MINIMUM requirement for Lua to work. If you read about Lua in their documentation, you see it's already embedded in microprocessors, and several other small footprint areas such as smartphones and toys. Can't you put a C compiler on the raspberry pi and then run Lua through it?
Then from there, it'd be child's play to port the CC APIs over. But it's useless - the Raspberry Pi is a novelty, not a serious computer.
351 posts
Posted 08 November 2012 - 09:12 AM
Then from there, it'd be child's play to port the CC APIs over.
I don't believe anyone has done this "childs play" though some people have tried. Maybe you can do better, and give us a luac emulator of CC?
1243 posts
Location
Indiana, United States
Posted 08 November 2012 - 11:17 AM
I don't believe anyone has done this "childs play" though some people have tried. Maybe you can do better, and give us a luac emulator of CC?
-.- It would be quite simple, having already created a Lua port to the Pi, to implement some redstone emulation and rednet. I can't do it: I don't know C or any of its variants very well.
42 posts
Posted 13 November 2012 - 03:56 PM
I doubt anyone would want to work with assembly. So this suggestion is highly unlikely to be made. And why buy a raspberry pi and complain it is too hard to understand, its the whole point. If you start hard you will be a great programmer. Lua is a cool language but you can't use it in many things as its just a scripting language. If you want to make programs and games I suggest just sticking with the OSes supported by the device and learn from there.
For Dan to make this possible he would have to create a shell in assembly and then make it so assembly has all the Lua functions as there will be no APIs for it like the Java Lua api that CC uses. Hard stuff
1 I'm not complaining, its as you said a suggestion.
2 I know Python just as well as i know Lua. you must of misunderstood me or i miss worded it.
3 I hate importing things that is why i would like to code in Lua.
4 I like coding Lua better then java or python (personal preference).
5 Yes, it is cool, and yes it is only a scripting language but the cc apis can make it more then just that.
I hope that clearse some stuff up
1054 posts
Posted 13 November 2012 - 04:03 PM
Uh because its not a machine language, its a scripting language. You CANNOT write a computer operating system in Lua as CPUs don't comprehend it, they are built to run on Assembly.
The only way computercraft works is because it uses a Java API that emulates it. About 50% of the Lua functions in CC are Java, all the OS api is Java based. You can write and operating system then add a Lua scripting environment but you'd need an API that emulates Lua, and you can't get them for Assembly. Go ahead, try but fail early on
Wow, do you have any source for all that? Can you give me one commonly used OS that is entirely written in assembly? Typically, the bootloader is the only thing written in assembly. Everything else is often written in C (or other low level languages). This is compiled to asm, which can directly be compiled to binary. As well as lua can be compiled to assembly/binary. No difference, except for what you can do with the language (lua is limitted on some levels as far as I know).
Anyways, basically, all you need is a lua interpreter (as been stated before). I don't think it's worth porting the ComputerCraft api's though.
180 posts
Posted 13 November 2012 - 04:25 PM
You could just install Raspbian (A Debian Linux distrobution) on the raspberry pi, then install Java on it, and finally install tomass1996's ComputerCraft Emulator. There is also a binary package of Lua 5.1 for it you can install.
apt-get install java6-runtime lua5.1
As you can install both the Java runtime (JRE) and the development kit (SDK), I don't see any reason why you couldn't also run Minecraft directly on it either.
Unfortunately my raspberry got damaged and I have another one on order that won't arrive until Friday, so I can't provide you step by step directions, but all of the software you would need for this is already available. I can confirm Java works.
I didn't think to try running Minecraft on it, but most certainly will next weekend! :P/>/>
992 posts
Posted 13 November 2012 - 04:56 PM
You could just install Raspbian (A Debian Linux distrobution) on the raspberry pi, then install Java on it, and finally install tomass1996's ComputerCraft Emulator. There is also a binary package of Lua 5.1 for it you can install.
apt-get install java6-runtime lua5.1
As you can install both the Java runtime (JRE) and the development kit (SDK), I don't see any reason why you couldn't also run Minecraft directly on it either.
Unfortunately my raspberry got damaged and I have another one on order that won't arrive until Friday, so I can't provide you step by step directions, but all of the software you would need for this is already available. I can confirm Java works.
I didn't think to try running Minecraft on it, but most certainly will next weekend! :P/>/>
Even if it can only run a CC emulator and development pad I think you have convinced me to get one too. I always have idea when I am away from my main computer and wanted a light weight computer to make some noted on or test ideas I never knew that the pi could have java capability.
42 posts
Posted 15 November 2012 - 06:31 PM
You could just install Raspbian (A Debian Linux distrobution) on the raspberry pi, then install Java on it, and finally install tomass1996's ComputerCraft Emulator. There is also a binary package of Lua 5.1 for it you can install.
apt-get install java6-runtime lua5.1
As you can install both the Java runtime (JRE) and the development kit (SDK), I don't see any reason why you couldn't also run Minecraft directly on it either.
Unfortunately my raspberry got damaged and I have another one on order that won't arrive until Friday, so I can't provide you step by step directions, but all of the software you would need for this is already available. I can confirm Java works.
I didn't think to try running Minecraft on it, but most certainly will next weekend! :P/>/>
i did add minecraft. the day I got it I clocked it to the max and boom it lagged harder then a giraffe
you need to start to look into the gaming view of the hardware.
its a lagy peace of crap that has trouble opening a window and the emulator dues not support the GPIO pins
I'm trying to get a real life version of the computers
the os is fast lightwight and simple
i cant and don't want to lug around my 40 lb desktop and i cant run minecraft or test rednet and/or redstone stuff on the emulator on my net book
180 posts
Posted 15 November 2012 - 08:38 PM
you need to start to look into the gaming view of the hardware.
its a lagy peace of crap that has trouble opening a window and the emulator dues not support the GPIO pins
I see. Then all I can say is good luck on your project.
42 posts
Posted 16 November 2012 - 12:59 PM
better the nothing
1243 posts
Location
Indiana, United States
Posted 18 November 2012 - 01:16 AM
better the nothing
I think you mean "Better than nothing."?
Also, it's not. It's actually worse than nothing, imho.
180 posts
Posted 18 November 2012 - 03:21 AM
So in playing more, I think I see what the OP did wrong.
By default the ram/vram settings only give 32mb to the GPU which doesn't let it do much 3D work.
If you up that to 64mb to just enable the GPU 3D, the CC emulator runs OK with enough ram.
Now all I need to do is code in GPIO pin support and I feel the Pi will work great as a stand alone emulator.
There is still not enough RAM to run full minecraft at any decent speed :{
419 posts
Location
your hardrive
Posted 18 November 2012 - 12:47 PM
i checked the rasberry pi wiki lua should work with it
3 posts
Posted 07 June 2013 - 06:36 PM
Im not too sure if this is what somebody has pointed out, but can you run Lua on the Pi? I know some Lua, and I know its easy to learn and understand, and since I havent really coded anything or learned a whole lot about any language(except some Java and Lua) I would love to be able to write programs, in Lua, on the Pi.
4 posts
Posted 18 June 2013 - 04:05 AM
Uh because its not a machine language, its a scripting language. You CANNOT write a computer operating system in Lua as CPUs don't comprehend it, they are built to run on Assembly.
The only way computercraft works is because it uses a Java API that emulates it. About 50% of the Lua functions in CC are Java, all the OS api is Java based. You can write and operating system then add a Lua scripting environment but you'd need an API that emulates Lua, and you can't get them for Assembly. Go ahead, try but fail early on
One could write a standalone bootable lua interpreter in C/C++/Assembly that does hardware abstraction and write the rest in Lua. Also, you can definitely get them for assembly. In fact, the official Lua interpreter is compiled to assembly.
1243 posts
Location
Indiana, United States
Posted 18 June 2013 - 10:26 AM
Im not too sure if this is what somebody has pointed out, but can you run Lua on the Pi? I know some Lua, and I know its easy to learn and understand, and since I havent really coded anything or learned a whole lot about any language(except some Java and Lua) I would love to be able to write programs, in Lua, on the Pi.
Yes, you can run Lua on the Pi. Just run "lua" in a terminal window.
19 posts
Posted 18 June 2013 - 02:44 PM
You could just install Raspbian (A Debian Linux distrobution) on the raspberry pi, then install Java on it, and finally install tomass1996's ComputerCraft Emulator. There is also a binary package of Lua 5.1 for it you can install.
apt-get install java6-runtime lua5.1
As you can install both the Java runtime (JRE) and the development kit (SDK), I don't see any reason why you couldn't also run Minecraft directly on it either.
Unfortunately my raspberry got damaged and I have another one on order that won't arrive until Friday, so I can't provide you step by step directions, but all of the software you would need for this is already available. I can confirm Java works.
I didn't think to try running Minecraft on it, but most certainly will next weekend! :P/>/>
i did add minecraft. the day I got it I clocked it to the max and boom it lagged harder then a giraffe
you need to start to look into the gaming view of the hardware.
its a lagy peace of crap that has trouble opening a window and the emulator dues not support the GPIO pins
I'm trying to get a real life version of the computers
the os is fast lightwight and simple
i cant and don't want to lug around my 40 lb desktop and i cant run minecraft or test rednet and/or redstone stuff on the emulator on my net book
When I tried Minecraft: Pi Edition on my Pi, it actually ran pretty well.
Also, not being able to smoothly open and move windows is not as much a problem with the hardware as it is a problem with the software that runs on it. Currently X11 is used for the GUI in Raspbian (or well, any Linux distro for real use that has a GUI pretty much) and there currently no drivers for X that make use of the Pi's graphics hardware, so everything is done on the CPU. This is slow for obvious reasons.
Wayland appears to be a solution for this issue."start to look into the gaming view of the hardware"? This is just a rather weak ARM SoC, what do you expect from it? The best you can get out of this thing is Quake 3 at a pretty decent framerate.
355 posts
Posted 19 June 2013 - 02:47 PM
It suprises me this topic hasnt been locked yet…
2447 posts
Posted 20 June 2013 - 01:42 AM
Aaand with that…