5663 Commits

Author SHA1 Message Date
Vexatos
84b028a69b Merge branch 'master-MC1.10' into master-MC1.11
# Conflicts:
#	build.gradle
#	build.properties
#	src/main/scala/li/cil/oc/server/component/traits/TankWorldControl.scala
#	src/main/scala/li/cil/oc/server/component/traits/WorldTankAnalytics.scala
2017-06-21 10:23:37 +02:00
Vexatos
4dd3dcfb4b Merge remote-tracking branch 'origin/master-MC1.9.4' into master-MC1.10
# Conflicts:
#	src/main/scala/li/cil/oc/util/ExtendedArguments.scala
2017-06-21 10:17:53 +02:00
Vexatos
ed352059eb Merge remote-tracking branch 'origin/master-MC1.9.4' into master-MC1.9.4 2017-06-21 10:15:27 +02:00
Vexatos
111982e635 Merge remote-tracking branch 'origin/master-MC1.8.9' into master-MC1.9.4
# Conflicts:
#	src/main/scala/li/cil/oc/server/component/traits/TankWorldControl.scala
#	src/main/scala/li/cil/oc/server/component/traits/WorldTankAnalytics.scala
2017-06-21 10:09:51 +02:00
Vexatos
72600f5623 Merge remote-tracking branch 'origin/master-MC1.7.10' into master-MC1.8.9
# Conflicts:
#	src/main/scala/li/cil/oc/util/ExtendedArguments.scala
2017-06-21 10:07:18 +02:00
payonel
ed99999119 tty needs to load full when loading term library due to meta-metatabling 2017-06-21 00:45:00 -07:00
payonel
e684e588ef support yield through pipes 2017-06-21 00:25:43 -07:00
payonel
5fdee17fcd openos 1.6.5 update fixes and optimizations, one api removed
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
2017-06-21 00:25:43 -07:00
payonel
a61204aee8 Critical fix for threads, small fixes for /bin/edit, /lib/process, greetings, and term.read
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
2017-06-21 00:25:43 -07:00
Vexatos
2ee3a1a119 Made tank controllers work better with blocks that provide multiple tanks. 2017-06-12 11:06:12 -07:00
payonel
1ce5e06df2 send drop even without drag 2017-06-12 10:53:50 -07:00
Vexatos
361db00400 Properly fixed CC dependency.
Closes #2422.
2017-06-12 19:40:32 +02:00
Nexarius
5383b641e7 Update robot.names 2017-06-11 09:20:29 -07:00
payonel
15308be683 Merge remote-tracking branch 'upstream/master-MC1.9.4' into master-MC1.10 2017-06-11 08:49:32 -07:00
payonel
2ccf66f2e7 Merge remote-tracking branch 'upstream/master-MC1.8.9' into master-MC1.9.4 2017-06-11 08:48:43 -07:00
payonel
c76414f58a Merge branch master-MC1.7.10 into master-MC1.8.9 2017-06-11 08:41:48 -07:00
payonel
74d77b1fdf fix: dispatch interrupts to all handlers, pipe coroutine resume status, term.read(), and thread waitForAll() fixes 2017-06-10 19:00:11 -07:00
payonel
067f217813 openos 1.6.4
the "thread" update

**Threads**
OpenOS 1.6.4 brings the new thread library api. Documentation in our ocdoc wiki soon to come. An openos thread is an autonomous non-blocking detachable child process
 * Autonomous: Threads asynchronously begin execution immediately after creation without needing to call resume. The thread proc may call coroutine.yield, but will resume on its own
 * Non-Blocking: Threads can call computer.pullSignal (or any higher level wrapper such as event.pull, io.pull, etc) without blocking the main kernel process nor any other thread
 * Detachable: By default, threads are scoped to the process in which they are created, i.e. their parent process. Any thread will block the parent process from closing unless:
  A. The thread detaches from the parent process. In which case it does not block any process and runs independently, e.g. `t:detach()`
  or
  B. The parent process throws an exception or calls os.exit in which case all attached threads are killed, e.g. `os.exit()`
  or
  C. The thread is manually suspended, e.g. `t:suspend()`

**Command Redirection**
The other major improvement in this update is highly improved shell parsing for command substitution and io redirection. Some highlights include
 * Can place before the command now, e.g. `2>/dev/null ./run_my_scripts.lua`
 * Can properly use globbing or env vars as redirect targets, e.g. `./run_my_scripts.lua >$my_log_file`
 * Fixed various bugs related to redirect and argument evaluation

**Memory**
50k free! As I love to do, this update reduces memory allocation needed to reach the shell prompt. The majority of the recent memory improvements are not just delaying allocation, but actual code cleanup and optimizations. Many of the changes are minor but they are numerous. With 1 stick of tier 1 RAM, openos reaches shell with 50k bytes free.

Changelog:
Bump version from 1.6.3 to 1.6.4
Cause grep to yield when taking too long
Remove additional gpu.bind calls during boot, reduces the number of screen resize calls
Move SHELL env var creation to /boot/94_shell.lua - This is an important user workflow fix to allow users to specify a custom SHELL without openos ever needing to load /bin/sh and its libraries
Fix event dispatch to not double call event timers in some scenarios
new /lib/thread.lua
fixed /lib/process from hiding exceptions in some scenarios
significant memory optimizations and code cleanup for /bin/sh
refactoring of command redirection, variable evaluation, glob expansion, and argument lists in /bin/sh
fixed term.setCursorBlink so that it properly waits for inf time for the next event when not blinking, rather than pulling every .5 seconds
fixed /bin/sh shell from losing exit_code when using || and && with multiple commands
fix /bin/lua error message when using os.exit
cherry picking serialization fix from 62471f7d320758bebb280666ed98388ea61cb4c8
2017-06-10 19:00:11 -07:00
SDPhantom
62471f7d32 Update serialization.lua (#2416)
Corrected global leak, "_" is a valid variable and can lead to problems if it exists.
2017-06-07 11:44:49 -07:00
payonel
06a0861597 OpenOS 1.6.3 update (#2414)
Why a version change?
> This minor version change should not introduce breaking changes, but older code doing non standard things with process environments, `require` and the package library, shebang redirections, or direct calls to /bin/lua, may see some breakages. Also, `shell.resolve` has been fully reworked. This is a crucial and heavily used api. Thus, in case of any mistakes or bugs a version change will help pinpoint regressions. I've heavily tested the resolve code, but it is new code and deserves some bake time in the wild.

Changelog:
/bin/lua removes shebang line and calls load directly. Improves workflows that define custom environments, and loadfile no longer removes shebang lines

load: loaded code chunks now inherit the parent _ENV naturally, having a real-lua behavior

require: heavily optimized and made errors more natural and helpful, exposing more information about failure to require a library

/lib/pipes: commented out pipes.create which is a future feature to create event-boxed threads

process: more process crash text is dumped to the shell to help identify "out of memory" issues

shell.resolve: reworked and optimized! possibly breaking change: specifying an extension (ext) to `shell.resolve(name, ext)` will no longer return results to directories, but only files (if they exist). However, it was never the intent of this method to return results to directories when specifying an extension

various memory optimizations throughout. openos now allocates ~153k to boot to shell.
2017-06-02 13:33:45 -07:00
payonel
f297eefd7d fix typos and pwchar option in term.read 2017-05-28 01:16:32 -07:00
payonel
7f4c9c4ffa dos2unixify the source 2017-05-27 15:20:37 -07:00
payonel
aa932bc7bc minor: remove unused code in /lib/sh 2017-05-27 14:58:21 -07:00
payonel
d80c7a8436 update pastebin url to https 2017-05-26 23:31:07 -07:00
payonel
e3ab7fc868 Bubble bug (#2405)
* better ls failure check

* always yield from sh threads, do not call event.pull directly

* load env wrapping and some bug fixes
2017-05-26 07:22:45 -07:00
Vexatos
8f660dddef Missed one. 2017-05-24 18:29:32 +02:00
Vexatos
ac756b6770 Don't display empty stacks. 2017-05-24 18:26:35 +02:00
payonel
fcb9122d63 revert change that removed local_env return options from modules 2017-05-23 01:33:06 -07:00
payonel
d1b7cb977f promote ENV to loaded code in lua shell 2017-05-23 01:08:27 -07:00
payonel
1a4e15b0a6 fix ls exit code when piping 2017-05-23 00:29:35 -07:00
payonel
0543d0eaf5 prefer component.doc to __string for component documentation 2017-05-23 00:19:40 -07:00
payonel
b02c60ef11 when saving a file with edit, make the missing dirs if needed 2017-05-22 23:42:40 -07:00
payonel
f2b5e01730 install and cp fixes (#2398)
testing completed
2017-05-22 23:10:59 -07:00
Vexatos
a766c6f213 Merge remote-tracking branch 'origin/master-MC1.10' into master-MC1.11 2017-05-20 23:22:18 +02:00
Vexatos
294a09edde Added a driver for forge energy devices. 2017-05-20 23:20:37 +02:00
Vexatos
ff4a6f9aa1 Added converter for fluid tank properties. 2017-05-20 22:40:31 +02:00
Vexatos
c751b9ed4b Fixed floppy disk name and JEI tab icon. Also updated JEI integration and removed code which is no longer necessary. 2017-05-20 18:09:29 +02:00
payonel
08bb90faa3 print verbose status for /bin/mv -v 2017-05-16 22:29:39 -07:00
payonel
57698127fb fix quoted command substitution to preserve white space in shell
also corrects some other cases of space respect
2017-05-16 17:56:45 -07:00
Florian Nücke
344958d53e Merge branch 'master-MC1.11' of github.com:MightyPirates/OpenComputers into master-MC1.11 2017-05-15 22:49:34 +02:00
Florian Nücke
e203ab4d33 Darn you MCPBot_Reborn! 2017-05-15 22:45:30 +02:00
payonel
80213eed8b Merge remote-tracking branch 'upstream/master-MC1.10' into master-MC1.11 2017-05-15 07:20:22 -07:00
payonel
59e268c849 Merge remote-tracking branch 'upstream/master-MC1.9.4' into master-MC1.10-upstream 2017-05-15 07:20:00 -07:00
payonel
4b551f8fc4 Merge remote-tracking branch 'upstream/master-MC1.8.9' into master-MC1.9.4 2017-05-15 07:19:20 -07:00
payonel
dd15d6c7fb Merge remote-tracking branch 'upstream/master-MC1.7.10' into master-MC1.8.9 2017-05-15 07:18:04 -07:00
payonel
e9680ec0e8 tab complete fix for nil hints 2017-05-14 23:53:00 -07:00
payonel
807dfb7224 bad timer bug fix: event timers should default to once 2017-05-14 23:39:14 -07:00
Vexatos
ef103be3c5 I knew I had to do this during the port, but then I forgot.
Fixes #2382.
2017-05-15 07:24:33 +02:00
payonel
8f9eabc84e hostname to PS1 fix
hostname in PS1 cannot be set by the init signal as that occurs before /etc/profile, which overrides PS1

Also, clean up some code to not try to change PS1, but just change HOSTNAME

Added `hostname --update` to update $HOSTNAME by reading /etc/hostname again
2017-05-14 20:49:01 -07:00
payonel
7f1739614d improve error message for hostname 2017-05-14 17:18:31 -07:00