ummwut 0 Posted November 18, 2014 Share Posted November 18, 2014 I had an idea for a project that I felt the community would appreciate: a fairly puny operating system. It binds the keyboard+screen+gpu, then enters into a Lua prompt. That's pretty much it. I'll be finished with the last details in the next few days, but I felt I'd make this post now to get some feedback for what I was doing, and if it was even desired by the community. Generally I'm disappointed with Lua prompts, and given how available to modification some components of the system are, I've decided to add two extra features. 1) The prompt will be scrollable, as it is in some host systems. The motivation for doing this was mostly that I was tired of typing in a command, such as iterate over a table and print the keys, and most of the table scrolling right out of the (sometimes tiny) monitor's range. 2) It will be possible to edit the input, similar to an editor. I felt this was a very powerful convenience given how very little the system has; not including a proper file manager would certainly make a proper editor out of the question. Execution is triggered by Shift+Enter, so Enter can assume the usual behavior of breaking to a new line. How do you guys feel about all of this? Quote Link to post Share on other sites
Cat 3 Posted November 18, 2014 Share Posted November 18, 2014 Sounds good. (wonder if this post belongs elsewhere due to no code...)Here is one of my suggestions, how about a fill-in suggestion thing as you type?Like:I'm typing in - os.e and the suggestion would be os.execute and if I press ENTER it would make the input os.execute.(A general idea on display: os.execute) Quote Link to post Share on other sites
ummwut 0 Posted November 19, 2014 Author Share Posted November 19, 2014 That's a simple thing to implement, but it would be pretty slow, since it would have to iterate through tables and do a bunch of string matching. I'll think about it after I finish up the remaining code. Maybe someone else, or yourself, could add it in after I post the code up? After all, are you not here because you enjoy coding? Quote Link to post Share on other sites
Cat 3 Posted November 19, 2014 Share Posted November 19, 2014 That's a simple thing to implement, but it would be pretty slow, since it would have to iterate through tables and do a bunch of string matching. I'll think about it after I finish up the remaining code. Maybe someone else, or yourself, could add it in after I post the code up? After all, are you not here because you enjoy coding? Shouldn't be slow at all honestly unless there was an issue with CPU usage and OC. It should be almost instantaneous; after all NP++ and VS can do it. On Key Press update string and result=searchSuggestions(string) end On Draw Event do setColor(255,255,255) write(string) if result ~= "" then setColor(80,80,255) write(result) setColor(255,255,255) end I am here to have discussion, I have my own project too (it's in C#). I'm also here to give suggestions. If you feel like trying to implement, feel free. Quote Link to post Share on other sites
skyem123 4 Posted November 27, 2014 Share Posted November 27, 2014 Well, I have made miniOS (the FS system needs to be fixed, but you don't need that part) that is small, you could use it a base and modify it to suit your needs. You would need to write the code for the LUA interpriter. This sounds like an idea for the "OS" of computers like the ZX Spectrum. The autocompletion thing may not work as the CPU in opencomputers is slowed down to make it not overload multiplayer servers / your computer, If you implemented it efficiently, maybe? Quote Link to post Share on other sites