Jump to content




OneOS Version 2 - The All in One Operating System


910 replies to this topic

#461 oeed

    Oversimplifier

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

Posted 15 June 2014 - 05:54 AM

View PostCsstform, on 15 June 2014 - 04:21 AM, said:

View Postoeed, on 15 June 2014 - 03:46 AM, said:

-snip-

Even though I may not see it in the competition, I am really looking forward to this!
Yea I'm gona have to give CCJam a miss, I'm just not going to have anything to show for really.

#462 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 15 June 2014 - 02:03 PM

So it is something awesome. Though that screenie you posted didn't have syntax highlighting. Will that be added later?

Also, some people do use other languages. GravityScore's Brainfuck interpreter, someone made a peripheral for Jython a while back, etc.

#463 killorx

  • Members
  • 34 posts

Posted 15 June 2014 - 08:39 PM

i tried to install it into the beta. and it will not work. should i use 1.63 or 1.64pr2
i tried to install the oneos into the adv computer and it said. check your internet connection. nothing is being blocked.

#464 oeed

    Oversimplifier

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

Posted 15 June 2014 - 09:45 PM

View Postawsmazinggenius, on 15 June 2014 - 02:03 PM, said:

So it is something awesome. Though that screenie you posted didn't have syntax highlighting. Will that be added later?

Also, some people do use other languages. GravityScore's Brainfuck interpreter, someone made a peripheral for Jython a while back, etc.
Yea, I tried adding syntax highlighting but I was having a few issues. They will definitely be added though.

I don't know of anyone who's really made an actual program out of it really. Still, can't hurt to add it.

#465 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 16 June 2014 - 12:16 AM

Well, it could just be useful to add extra highlighting for different functions, like the functions for an API.

#466 skwerlman

  • Members
  • 163 posts
  • LocationPennsylvania

Posted 16 June 2014 - 05:04 AM

View Postawsmazinggenius, on 15 June 2014 - 02:03 PM, said:

So it is something awesome. Though that screenie you posted didn't have syntax highlighting. Will that be added later?

Also, some people do use other languages. GravityScore's Brainfuck interpreter, someone made a peripheral for Jython a while back, etc.
I don't think I've ever even seen a brainfuck highlighter...

#467 killorx

  • Members
  • 34 posts

Posted 17 June 2014 - 12:33 PM

The program no longer works. it always goes to. too long without yielding

#468 Win7yes

  • Members
  • 110 posts

Posted 17 June 2014 - 09:35 PM

View Postkillorx, on 17 June 2014 - 12:33 PM, said:

The program no longer works. it always goes to. too long without yielding
What Program?

#469 oeed

    Oversimplifier

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

Posted 17 June 2014 - 10:32 PM

View Postkillorx, on 17 June 2014 - 12:33 PM, said:

The program no longer works. it always goes to. too long without yielding

Do you mean the OS as a whole or one bit?
What version are you using?

#470 oeed

    Oversimplifier

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

Posted 21 June 2014 - 11:54 PM

Ok, so I haven't really been able to do much work on OneOS/OneCode because my Mac's hard drive can't be found by my Mac, it's being repaired at the moment and there shouldn't be any dataloss. However, it meant that I haven't really have access to recent code.

I managed to find a backup somewhere with some newish code, although it doesn't have any OneCode stuff. Because of this I've focused on the actual programs, the API driving everything and their format.

Here is the code for a fairly basic program with a clickable button that changes text when you click on it. In my previous system this would be about 100 - 200 lines, let alone programs in which people had to write their own API, but this is only 14 lines, most of which is actually formatting! If you remove the unneeded lines it's only 7.
OneOS.LoadAPI('/System/API/Bedrock.lua', false)
OneOS.LoadAPI('/System/API/Drawing.lua')
OneOS.LoadAPI('/System/API/View.lua')
OneOS.LoadAPI('/System/API/Button.lua')

local program = Bedrock:Initialise()

program:ObjectClick('Button1', function(self, event, side, x, y)
  self.Text = 'Hi'
end)

program:Run(function()
  program:LoadView('main')
end)

Which creates, when clicked:
Posted Image

In future I'm also looking to remove the loadAPIs (other than Bedrock [the main framework] of course).

This code is loading a view called main, which you'll design with drag and drop, from a file that looks like this:
{
  ["Objects"]={
	[1]={
	  ["Y"]=2,
	  ["X"]=2,
	  ["Name"]="Button1",
	  ["Type"]="Button",
	  ["Text"]="A Button"
	},
  },
  ["BackgroundColour"]=8192,
}

In the designer you'll be able to set a name for each object (e.g. button) which allows you to easily get that object and set what happens when it's clicked etc.

Here is a bit of code and comments showing what you can either do at the moment or will be added very soon.
Spoiler

You'll noticed that there is no while loop or a huge if statement for events.
All events have a function that you can assign which is called when fired If it's a custom event you can use RegsterEvent.

This is all very early stages, I've only just got it working. But essentially I'd like feedback on the style and layout of it. If people don't like how it works they won't use it, which makes the entire thing pointless.

Edited by oeed, 22 June 2014 - 12:18 AM.


#471 Saldor010

  • Members
  • 467 posts
  • LocationThe United States

Posted 22 June 2014 - 12:36 AM

That looks amazing, Oeed!

#472 oeed

    Oversimplifier

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

Posted 22 June 2014 - 02:09 AM

View PostJiloacom, on 22 June 2014 - 12:36 AM, said:

That looks amazing, Oeed!

Thanks!

I should also mention a few other things.

Most importantly, everything is subject to change, even the stuff above is rather out of date. Sometimes I realise that one way of doing something does work as well, so I end up changing huge amounts.

I've also been working speeding up drawing, sometimes it gets really slow. To help with this all objects now cache their drawing, meaning that if it's asked to draw and it already has but the content is still the same it won't have to recalculate a whole ton of stuff. To be honest I don't really know if this will improve the situation (although I presume it will). I'm also looking in to making the buffering system quicker.

This will, yet again, push the 1.2 release forward. I've decided to essentially convert all the programs across to this framework, it'll save a ton of space and allow for easier editing in the future. I haven't decided if OneCode will be included with 1.2 though, that might come 1.3 (which will probably be only a few weeks later).

Edit: So, I've also decided it will be beneficial to move to an inheritance based object model. In English, basically all the on-screen objects (buttons, labels, etc) will inherit one base object which has lots of the base code for initialisation, drawing, etc. Kind of like I intended to do with PearOS (although it's worth noting that it didn't actually work in PearOS as I thought it did, it appeared to but didn't really). This too will save a ton of space, it changes all object files from 80+ lines to in many cases just 10. This is due to the radical reengineering the framework has allowed me to do, objects are no longer initialised with their values (width, position, etc). Instead they are injected from the interface file later.

There's a lot of changes, but I really think this will provide a huge boost in terms of speed of OneOS as well as fixing things and future additions.

Edited by oeed, 23 June 2014 - 09:43 AM.


#473 awsmazinggenius

  • Members
  • 930 posts
  • LocationCanada

Posted 24 June 2014 - 02:33 AM

Looking at the code for that simple program, it looks really easy to make programs if you use the API. Unfortunately, I can't use it, because if I were to ever get around to releasing my programs, it would be critical that they work on CraftOS, and it's not practical to separately distribute those API files unless you were to minify and concatenate them, and under the license you can't distribute modified versions.

Edited by awsmazinggenius, 24 June 2014 - 02:35 AM.


#474 oeed

    Oversimplifier

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

Posted 24 June 2014 - 04:07 AM

View Postawsmazinggenius, on 24 June 2014 - 02:33 AM, said:

Looking at the code for that simple program, it looks really easy to make programs if you use the API. Unfortunately, I can't use it, because if I were to ever get around to releasing my programs, it would be critical that they work on CraftOS, and it's not practical to separately distribute those API files unless you were to minify and concatenate them, and under the license you can't distribute modified versions.

I will definitely make it possible for people to release their programs for CraftOS. I'll make a single file minified version for the API, it will probably be under 100KB

#475 Agoldfish

  • Members
  • 451 posts
  • LocationSome Fish Bowl in Ohio.

Posted 24 June 2014 - 07:46 PM

Wow, almost 500 posts! Nice job Oeed. This is porbably one of the most successful programs yet to date.

#476 oeed

    Oversimplifier

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

Posted 24 June 2014 - 09:44 PM

View PostAgoldfish, on 24 June 2014 - 07:46 PM, said:

Wow, almost 500 posts! Nice job Oeed. This is porbably one of the most successful programs yet to date.
Yea, actually now I look at it, it's the 3rd most replied to program. The 1st being Advanced Mining Turtle and 2nd being Firewolf.
Also noticed the 2nd most replied to OS is PearOS :P

In terms of out of all the forums though many forum games and servers beat all the programs by miles.

#477 MrStickmanPro1

  • New Members
  • 1 posts

Posted 29 June 2014 - 02:01 PM

Hey,

first of all, I gotta say that this is the best OS I've seen so far for computercraft. Well done.

However, I've got one question: If yes, how can you use external monitors?

- MrStickmanPro1

#478 Beeskee

  • Members
  • 27 posts

Posted 30 June 2014 - 05:14 AM

This is pretty sweet, I'm running it on FTB Unleashed and everything seems to be going well so far. The only bug I have encountered is in the app store, it crashes. I get this error: "startup:572: attempt to get length of number"

#479 itzstarstruck

  • Members
  • 26 posts
  • LocationAus

Posted 02 July 2014 - 12:00 PM

Awesome!
Please keep up the good work oeed
-========= MRZOMBIEKINS LUA PROGRAMMER =======-

:D

#480 NanoBob

  • Members
  • 102 posts

Posted 03 July 2014 - 11:28 AM

I wanted to test it out, but when I ran the installer I got an error
Bios:500: Domain not permitted
I got this error just while it was Determining latest Version





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users