* term.pull fix, the tty stream no longer needs a cursor object
* buffer reads now pass the original result and reason all the way back. this allows /bin/sh to distinguish ^c from ^d
* /bin/sh cleanup to not show prompt when there is no input tty
* /bin/cat chunk based [huge performance and memory savings, can handle enormous files now]
* /bin/sleep blinks now
* removed unnecessary methods from tty
* cursor blinking and scrolling terminal improvements
* fixed bad term call to tty write
/bin/sleep ^c was printing an error because it was returning the event data, which prompts was interpretting as error details [unexpected]
use a .prop file to have the robot component magic fs be ignored when running `install`
Changes
* thread: fix coma state issue where thread would not resume
* thread: add thread.current(), returns current thread [ the init thread is still technically not a thread ]
* tty: simplify the api with read, and separate all stream methods from the library
* sleep: /bin/sleep will now show blinking cursor and can be interrupted
* echo: use io.write instead of print. print loads slightly more resources
quiet mode in /bin/source was a mess -- making .shrc scripts not able to print. Also, a lot of the /bin/sh arg parsing code has traditionally been over complicated. cleaned that up as well thanks to old code that expected strings in the args having been removed some time ago
Users shouldn't use tty read nor write directly, they should always use io or term. But...it is messy to try to hide these methods as private methods in the io library, so I'll just have to check the io tty-ness just in case
LS_COLORS now respects linux style ansi code list, and /bin/ls has been updated to respect that
cursor blinking ws being reset too often that has been fixed
cyan ideally should be 0x00ffff, but that colors becomes green when switching bit depths. Thus, openos will use 0x00B6FF for ansi code for cyan
fixed some vt100 color list parsing
* huge terminal performance boost
* echo -e option, interpret backslashes
* favor io.write instead of print on low level code as print is slightly more memory expensive
* use vt100 ansi color coding for PS1
* use tty as std io back end stream
* consolidate buffer delay code
* add ctrl+backspace and ctrl+w options in io.read
* delay load more
* term code cleanup
* add buffer:size(), returns size of pending data on the stream
* memory free 59k
* openos 1.6.7
More memory savings, significant boot time savings
**Memory Savings**
The largest library in terms of cost in bytes in 1.6.5 was /lib/filesystem. Most of this library is not needed for boot, and in 1.6.6 the library is half loaded for boot with a delay load of the rest of the library when needed. There are also other minor memory improvements, see **Changes** for details
**Boot Time**
This update also introduces a newly written /bin/sh.lua that takes advantage of a common stdio system. This work was primary done to reduce memory needed to load the shell. However, during development of a simplified /bin/sh, I found that the /bin/source, /etc/profile, and /home/.shrc feature added to openos 1.6 had a significant boot time cost. I began optimizing /bin/source heavily and found that I could not make sufficient speed improvements due to the nature of how shell commands execute. Thus /etc/profile has been removed in favor of /etc/profile.lua, a script that sets up the environment the same but as a lua script. ~/.shrc is still honored if it exists on a system, and is sourced (/bin/source) as a set of shell commands. This change speeds up boot time from floppy by 3s, and on hdds by 1s.
**Possible Breaking Changes**
/etc/profile has been moved to /etc/profile.lua, but /home/.shrc is still sourced as shell script commands.
**Changes**
* /bin/sh.lua rewrite that takes advantage of standard io and uses the new /etc/profile.lua shaving 6s off boot time
* /bin/source.lua improve performance by reducing the number of processes created
* move /etc/profile to /etc/profile.lua and recode the actions in lua-form.
* move all ~/.shrc actions to /etc/profile.lua for performance reasons
* move motd to start of /etc/profile.lua to get the shell display as soon as possible
* update greetings that referenced /etc/profile to properly refer to /etc/profile.lua now
* update openos version to 1.6.6 to respect the impact of these changes
also remove unused vars and some light code clean up
moving some methods out of tty into delay loaded space for memory
fix print from overwriting vbuf settings on stdout
fix regression for expanding ${VAR}
closes#2434
This change should allow popen, pipes, and threads to specify with exactness how many coroutines back they want to yield. This makes popen and threads immune to internal coroutine scenarios
Also using a code cleanup provided by @SDPhantom
* Fixed possible error reporting bug in filesystem.copy()
Made local data initialize to false. Previously was nil and if the function was unable to open either file, this would cause the function to return true as its first value. data becomes nil when copying is finished, so this sorts itself out.
Added arg checking to filesystem.name
process: process.running has been deprecated for over 2 years and is now obsolete, please use process.info
process: added process.internal.run designed to run a coroutine to completion
01_process: cleaner coroutine_handler intercept code
event: removed unnecessary local function and added an optional handlers param to register to simplify thread code
io: update popen to use new /lib/pipe.lua library
pipe: new /lib/pipe replace /lib/pipes
> superior coroutine stack code, can reparent stacks
> handles all pipe work, sh calls /lib/pipe now for pipes
sh: now uses /lib/pipe to build pipe chains, calls shell.run to run a pipe chain.
thread: greatly improved reliability of embedded and detached threads
boot: removed dead code
thread fix:
Significant quality update for embedded threads (threads inside threads inside threads...) Also, added a "thread_exit" event. This is not yet official, I may add more meta data to the event later.
/bin/edit:
Found a case where text was being trimmed where it doesn't need to be
/lib/process
protect a .. operator from crashes with a tostring
greetings
updated the comment in a greeting, you can no longer just remove /etc/motd without a stderr error about the file missing on boot (without changing your /etc/profile)
/lib/term
term.read() was behaving as io.read() for tty, and as io.read("*l") for non-tty, now they both use *L