Jump to content




[API] [OS] Windows-Style Computers! (update)

api networking

18 replies to this topic

#1 KFAFSP

  • Members
  • 42 posts
  • LocationGermany

Posted 04 August 2012 - 06:58 PM

Hello again ComputerCraft Users!

This post is undergoing an update. I'm merging to the new project. It is now more concentrated on making a new OS for CC. The features will remain the same, still. Advanced Computers messed up my concept, so I'm currently merging from TCanvas to TColorCanvas... When finished TForm and GUI Classes like that, KOS will be officially released. Until then, yours KFAFSP.

Old DL-Links still in place in case you need them.

As you may have noticed, I am German, but every Comment or Translation will be done in English first.
Please excuse possible spelling errors, and notice that I start some nouns with capital letters on purpose.

Just for your information, there will be no pastebin downloads. (Instead, HDC will run a WSUS-like Service, which syncs with my own Webserver). In the meantime, I will publish a .zip on my Webserver for every relevant SVN-Revision.

Download :

Spoiler

For all interested Users : (If you need an MD5 API only, fetch this. Adapted from a LUA Implementation whose Author I seem to have forgotten):

Bugs have been reported in the new CC Version. There will be another implementation along with LSASS though.

HASH (MD5 only!) : DOWNLOAD

#2 KFAFSP

  • Members
  • 42 posts
  • LocationGermany

Posted 05 August 2012 - 04:53 PM

Ok, since noone already posted stuff, I can get a nice-fitting changelog Post set-up here.

Changelog :

Spoiler


Nothing to show here...

Stay tuned!

#3 BigSHinyToys

  • Members
  • 1,001 posts

Posted 05 August 2012 - 05:11 PM

Just a point but not everybody knows what SVN is or client Installed Maybe you should link to a free SVN program. Or use pastbin when you have stable code and use SVN server for nightly builds.

#4 jjh

  • New Members
  • 3 posts

Posted 05 August 2012 - 07:42 PM

Looks cool, I was doing something similar but perhaps a bit simpler.

Have you tried solving the issue with figuring out whether a client or a server is trusted?

For example, if you want to set up a new computer without having to know the ID of the main domain controller computer. In a typical case you would send a broadcast to discover machines, but how to verify the result?

In a real life scenario you would use something like PKI cryptography but that seems a bit hard to do with CC.

Of course not a big deal to remember the ID of the main computer, but let's say in a scenario where you were to move the main computer... you would need to reinitialize all other computers because the ID of the master changes :P/>

#5 KFAFSP

  • Members
  • 42 posts
  • LocationGermany

Posted 05 August 2012 - 07:47 PM

Thank You BigSHinyToys! I modified my first post to match these criteria. But I'll stay away from pastebin for now...

View Postjjh, on 05 August 2012 - 07:42 PM, said:

[...] Have you tried solving the issue with figuring out whether a client or a server is trusted? [...][...] Of course not a big deal to remember the ID of the main computer, but let's say in a scenario where you were to move the main computer... you would need to reinitialize all other computers because the ID of the master changes ;)/> [...]
Actually, its not that complicated. If you run my currently under develpoement installer, it will give the server a name. Thanks to CC, It will then remember both ID and Harddisk Data, even when destroyed! My DC responds to an ICMP Packet via Rednet, which can be broadcasted. I actually never thought of verifying the results, I just thought : Like in RL, you need to register the computer in the domain by giving admin login credentials. So, this must be verification enough...About Cryptography, MD5 is already working, so SHA is next. Maybe I'll implement DES-16 :P/> ?Great to see people interested in this project. As I said, there is more to come. But next week, RC2 (new code) should be stable.

#6 jjh

  • New Members
  • 3 posts

Posted 05 August 2012 - 08:02 PM

Ah, I see. I never tried labeling computers so I didn't know of such functionality :P/>

Yeah the verification stuff was just something fun I thought about trying. It's not really necessary in a friendly server environment ;)/>

You could probably spoof the packets pretty easily without crypto. I saw a few libs implementing two way crypto in Lua but they all depended on some additional Lua extensions

#7 KFAFSP

  • Members
  • 42 posts
  • LocationGermany

Posted 05 August 2012 - 08:24 PM

Naaah, RSA is just Prime-Crunching :P/>! I think it can be done in pure-lua too. But first, I need to finish the client os! People maybe want to actually USE this... Currently, it is just nice to look at.

Just BTW, are you British/American ? If not, could you contribute to my work with a translation =D ? You dont have to tell, just being curious.

#8 D3matt

  • Members
  • 830 posts

Posted 11 August 2012 - 07:38 AM

I can see myself using this for client/server programs, being a windows IT guy myself. I'll have to withhold judgement until I actually try the client though. How will distribution the client to client computers if you're using WSUS? Are we intended to put the client as the global startup file? Is there a WSUS boot disk that downloads the main client? (I suppose that would be more like WDS wouldn't it.) That actually sounds like a good idea.

I don't know any german whatsoever but I can ensure the english translations at least sound good in english, whether the translation is correct or not ;)/> If you'd like.

Oh, and I'd like to second a request for pastebin or zip for the initial download.

#9 KFAFSP

  • Members
  • 42 posts
  • LocationGermany

Posted 11 August 2012 - 01:22 PM

If you go to "Downloads", there is a .zip-Link at the bottom. Currently at Rev. 41. You may checkout the code, but KOS is still under developement.

Returning to WSUS and Installation:

WSUS was just an idea. I wanted to create a server, which cheks a .php on my Webserver for updated files. Then, it fetches a list and downloads the files. Later on they can be distributed over rednet. This of course requires modems, because RedPower BC would be too slow. But this is just an idea for the future.

Installation is done via a setup program, which will copy some Files onto the DiskDrive ontop of the PC, containing a startup file. This will always be executed, because it has the highest boot-order. Also, a PC with a DiskDrive ontop looks nice ;)/> . This startup will launch a custom Environment Service, that is loading all required API's by itself into it's own Environment Table, thus simulating a new BIOS. It will then create coroutines for each service, and launch the GUI. Farely simple design, but should do the job.

The current Build includes the EnvMgr.lua for KOS, and the template.lua for making the other APIs. I think I'll finish the apildr.lua and kbios.lua this week and give it a try. After this is done, I'll finish the setup program.

#10 D3matt

  • Members
  • 830 posts

Posted 11 August 2012 - 08:37 PM

I think an updater similar to WSUS is a great idea. And a WDS-like package for installing custom images and such (I might make this myself if you don't).

#11 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 01 September 2012 - 12:22 PM

Wäre froh wenn ich helfen könnte

#12 KFAFSP

  • Members
  • 42 posts
  • LocationGermany

Posted 02 September 2012 - 11:34 AM

Maybe you have noticed that the commits "freezed" on this project. Thats is just because I decided to write my own OOP Emulation for Lua. Its done by now, and I'm just about to upload it. It has some Features other Emulations are missing, such as : Encapsulation, a Syntax Parser for self-made File-Type, predefined Classes, a Compiler.

Basically, I have added a new Pascal-like File Format which is still Lua-Code, but has some extra Keywords such as : INCLUDE, CLASS, GLOBAL, INITIALIZATION, PROGRAM and stuff. I made a Notepad++ Stylesheet .xml for Syntaxhighlighting if needed. The parser will load such a file, run the Initialization, register a Global Namespace for GLOBALs and add defined CLASSes, but check if INCLUDEs are already loaded. In case the file contained a PROGRAM, it will be compiled and stored, so it can be executed later, unlike the Init Part which is executed instantaneously.

I hope this sounds interesting to you, and it actually is really easy and fun to use. Loading takes quite long, but if you parsed the file once, you can "compile" it into HEX, so loading will be faster later on (next startup). So it's basically a new programming language for ComputerCraft :D/>.

The Class-Names and their structure is just like in Delphi for Windows. This means there is a TCanvas Class for drawing on the screen, and a TBitmap Class for loading Bitmaps (actually works quite well!).

@Wolvan : Nachdem die ersten .class Files oben sind, muss erstmal das OS programmiert werden. Du könntest mir dabei helfen, wenn du dich etwas mit den Windows-Klassen auskennst. Es sind nämlich noch einige hinzuzufügen. Da ich jetzt auf OOP umgestiegen bin, muss ich erstmal die ActiveDirectoryDomainServices neu schreiben, sollte aber schnell gehen. Was ich bräuchte wäre jemand, der Services (Dienste) schreibt. Im Prinzip sind das Klassen, die eine Execute() Funktion haben, die als COROUTINE definiert wird. Damit mehrere parallel laufen können. Danke im voraus für sämtliche Hilfe!

The next update will be uploaded at 18:20 MEZ today. Stay tuned.

#13 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 04 September 2012 - 07:02 PM

Und du sagst immernoch lua als sprache? Dann sollte es mir eigentlich möglich sein so was zu schreiben. Ich hab zwar noch nicht wirklich mit coroutines gearbeitet aber das würde ich schon lernen

#14 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 13 November 2012 - 06:40 AM

Hm, KFAFSP - I get this error when trying to use md5.Calc()

hash:51: number is too large
How can i fix :/?

#15 CoolisTheName007

  • Members
  • 304 posts

Posted 13 November 2012 - 07:30 AM

This is awesome, but your computers need all to be in range of each other, right?
I'm planning to do a dynamic network service for rednet, that on query automatically relays messages through the shortest path to the destination. Do you know any starting point?
EDIT: Lyqyd did it already. Maybe it's possible to use both...

#16 mrjosheyhalo

  • Members
  • 19 posts

Posted 20 November 2012 - 09:50 AM

svn Is good and all but svn is where everything go`s so every little while you should relice a zip to like 1.0.0 2.0.0 and every thing else should go on svn for download ps I play gmod to

#17 KFAFSP

  • Members
  • 42 posts
  • LocationGermany

Posted 25 November 2012 - 12:21 AM

Ok so, it's been a while. I'm currently working on a rewrite because I have encountered problems with Environment management. No updates until the new version is done.

@remiX : Probably the String you gave the Calc function was too long for the byte-logic unit to handle. It is from dan200, so i don't know it's limitations. And I have the bad feeling that in a recent update something changed the logic behaviour when handling 16bit. If you want hashing really bad, try out crypt api. It only manages SHA1, but you can of course wait for me to release the new version. It will contain my own implementation of md5 and SHA1, also SHA1 HMAC.

@CoolisTheName007 : I have also stumbled upon this, but I cant include it to KOS. The OS will have (or the dev-build already has) it's own thread management system, including services like in windows. Lyqyd did his own coroutine host function, which makes it necessary to rewrite it for KOS in order to be usable by all Applications. But I will give you an update on this one.

@mrjosheyhalo : Look in the downloads section. There are .ZIP links you can use. But better wait until I release the new version, unless you want to checkout my Class Library implementation already.

#18 CoolisTheName007

  • Members
  • 304 posts

Posted 25 November 2012 - 12:35 AM

View PostKFAFSP, on 25 November 2012 - 12:21 AM, said:

snip

You can nest coroutines.
Actually, in terms of coroutines, and in general multitasking, I've almost finished porting a multitasking framework to CC; and everything I'm coding is done so that it will work from inside whatever coroutine you call it, without touching the global environment. Consequently it should be fairly easy to include Lyquidnet in your OS.

#19 KFAFSP

  • Members
  • 42 posts
  • LocationGermany

Posted 12 June 2013 - 03:19 PM

So, it's been a while. I am having to issue a delete on this topic. I have negelcted working on it, but instead focused a lot more on my class library. The result is : no OS, but a very stable and complex Class library capable of every concept of OOP you can think of. This will be published under the name of "cclib" later this month. Some changes rendered the old APIs unusuable, but opened doors for more complex stuff like loading and drawing bitmaps in an acceptable speed for example. See you later.

To the two guys following this topic : If you really got interested in this, PM me and we might have a chance to work on this together, as I have focused more on modularity this time.

To wolvan : As you can see, I have not forgotten the project. I used my time to come up with some very cool thing. Currently, I'm even able to draw strings with üäö... without complications as the minecraft text renderer actually allows for them, but lua is just bitchin' about 2-byte strings. My strutils package however can handle that, and has proven to be very useful concerning printing German error messages :D.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users