Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal


Popular Content

Showing content with the highest reputation since 04/01/14 in all areas

  1. 5 points


    OpenScreens for Minecraft Forge 1.12 to 1.12.2 OpenScreens adds more display options for OpenComputers. Curse Link: https://minecraft.curseforge.com/projects/openscreens Holo Screens Holo screens are floating displays with adjustable size and color. Hologram projector model and texture by ZefTheFox Right clicking a holo screen with a dye will change the background color. Right clicking the sides with an empty hand while crouching adjusts the size of the display. Flatscreens Flatscreens are simple displays that are... flat! There's two types, one on the front of the block and one on the back to allow more freedom. I have questions/need support! Where can I get help? You can always ask in my Discord server. If your issue is related to OpenComputers, you can read the OpenComputers Wiki. Report bugs here. My website: https://itsmeow.dev/ Discord Server: https://discord.gg/zrjXjP5 Curse Link: https://minecraft.curseforge.com/projects/openscreens
  2. 5 points
    I decided to make an editor with syntax highlighting, just for the fun of it. The name stands for "syntax highlighting editor", it's very unoriginal, but I'm bad at names To use it, run this command on OpenOS: pastebin get ZnwyunqL /bin/shedit.lua The color scheme was (sorta, I redid it later) copied from this paste. Features: Syntax highlighting! Indent on enter Line numbers Jump to line Hex colors are highlighted with the color they refer to (example: ) And probably more in the future if I need them.. Screenshot: Any recommendations or comments are appreciated!
  3. 4 points

    Stem - easy internet bridge

    What is STEM? Did you ever want to have a linked card, but without this pair-to-pair limitations? Well, you have internet card. And that is already half of the solution. The other half is to use Stem. Stem is a message transmitter for your OpenComputers devices with internet cards. Using a small OpenOS library you can use Stem to send and receive messages. Unlike the standard `modem` component, Stem-messaging uses not addresses, but `channels`. You can send messages to any channels, and you can subscribe to any number of channels to listen for messages from them. Installation The best way is to use HPM: hpm install stem If you do not have HPM, install it like this: pastebin run vf6upeAN If you do not want to use HPM repository, you can just use wget: wget https://gitlab.com/UnicornFreedom/stem/raw/master/stem.lua Example of a program using STEM local event = require('event') -- use STEM client library local stem = require('stem') -- open a connection to a STEM server -- the `stem.fomalhaut.me` is a default one local server = stem.connect('stem.fomalhaut.me') -- subscribe for messages from the channel with ID 'my-channel-id' server:subscribe('my-channel-id') -- then listen for events in a loop... while true do local name, channel_id, message = event.pull('stem_message') if name ~= nil then print(channel_id, message) end end -- ...or register an event listener event.listen('stem_message', function(_, _, channel_id, message) print(channel_id, message) end) -- you can also send message to the channel -- (you do not need to be subscribed to this channel, to send a message) server:send('my-channel-id', 'hello there') -- unsubscribe from channel server:unsubscribe('my-channel-id') -- completely close the connection to the STEM server server:disconnect() That is all. But there is more. Web client If you open the link to Stem server in your browser: https://stem.fomalhaut.me/ You will see some statistics and the web client. Enter your channel ID into the form, and you can send messages to your robot in real time, right from your phone, without even starting Minecraft. The web client is limited with UTF-8 encoding, though. (Using OpenOS you can send literally anything, as long as the message fits in 64kb of data.) Security Questions The channels by default do not have any special security measures applied. They do not have any authentication mechanisms, the do not have any encryption. Anyone who knows the ID of a channel can send a message to it and can listen for responses. But. The length of ID is 256 bytes. And that can be any bytes - from 0 to 255. That means, that you have 256^256 possible combinations for your ID. And that is a giant number. If you need to secure your channel - just use something long and incomprehensible as your ID. As an additional measure you can use end-to-end encryption, or anything else - this is up to you. Default STEM server uses HTTPS, and does not store any information - message in, message out. Self-hosted STEM solution For those of you who are strong in spirit and computer knowledge - there is a self-hosted option. You can build Stem server from sources and run it on your machine. This is also pretty easy. Additional instructions can be found on GitLab. Useful links GitLab repository: https://gitlab.com/UnicornFreedom/stem Protocol description: https://gitlab.com/UnicornFreedom/stem/wikis/protocol Default server: https://stem.fomalhaut.me/ HPM package: https://hel.fomalhaut.me/#packages/stem If I forgot something - feel free to ask here, or in IRC (my nickname is Totoro there). Also the project contains at least one "Easter egg" feature, that can offer some interesting options if you know HTML/CSS/JS. The Stem protocol is open - you can modify it, you can create your own clients in any programming language, etc.
  4. 3 points


    There is a Github organization named OpenPrograms which a couple of us use to share our OpenComputers related programs. Feel free to have a look, you may find something useful there! If you wish to contribute / have a repository in that Organization, just ask - either here or on the IRC. OpenPrograms on Github The OpenPrograms program list
  5. 2 points
    KestrelOS GUI-based, Windows-alike, highly customizable, and safe Operating System for common pourposes What's the major GUI-based OS currently available? The amazing system created by Igor, called MineOS (I'm sure everyone by now knows about it). Igor's system is based on OpenOS, that looks like MacOS and is by itself the most amazing system released yet, with all sorts of programs and even 3D libraries which is mind blowing. So why create yet another GUI-based system? There are several reasons why I decided to take on this journey. First of all, the majority of OS's out there, including MineOS is based upon OpenOS, which makes it a bit streamline and boring, but also unsafe. KestrelOS is made entirely from scratch with it's own libraries, services and style. I wanted to create something new, that would give less freedom than OpenOS (which is KestrelOS's main disadvantage), over a much more secure way to process applications. I also wanted to make KestrelOS as simple as possible, so anyone that is familiar to Windows will recognize most of it's content. How exactly KestrelOS works? KestrelOS implements safety policy, where only so called "managers" have absolute control over the system's event management. The "heart" of the system is a manager called "taskman" (Task Manager). Every other manager is registered to taskman and is a read-only table with functions that cannot be altered once the system has booted up. This restrains a lot of freedom for the user, but also prevents malicious software of changing core functions of the system in order to spy or corrupt data. There is few core managers that will "steer" every process in the system, taskman being the most important one as it is the only library in the entire system that has access to a now unavailable command: computer.pullSignal This forces every application to register itself into taskman in order to be able to hook itself under the heartbeat. What is this weird "heartbeat" you're talking about? Taskman has a loop, in which it listens for any signal. I called it the heartbeat, because it waits only 0.25 of a second to update any tasks hooked under specific processes even if nothing happens. This allows multitasking, or for example updating the clock on the bottom-right of the screen What are the so-called "managers" doing? Those so-called managers are here to serve programs with several system services. For example, there's a manager called "driverman", which loads system drivers, which are usually a single library that communicates with a specified type of component. There's a driver for graphics, which is communicating with the GPU, but uses Igor's amazing double-buffering technique (although I made my own version of it from scratch, but it is very primitive right now) to draw into the screen. Drivers are basically bridges between gpu's, datacards etc. that make sure such a given component is available and return optimized methods to use those components better. Of course, every driver has it's own version, name, description, and can be retrieved manually from driverman using the driver id or name, in case you'd like to implement your own driver and use it. What other features it has? Well, most of the system features are actually the managers which act as the main "pillars" of the system. Here's few of main managers that I remember as of now (as I'm not on my home PC right now, I'm writing from my work PC): driverman - manages drivers fileman - manages mounts for different filesystems and resolves path using mounts taskman - heartbeat of the system, manages processes and tasks assigned to those processes regman - manages system's registry guiman - uses kgraphics driver from driverman to draw complex GUI elements on the screen ... (there's a few more that I can't remember now or that are under development) ... Any concerns/disadvantages? Well, like stated before, it actually restrains quite some core functions to prevent malicious application of accessing those in order to prevent system spying or corruption. This removes quite a lot of freedom, but once you log in and unlock everything, you should be able to edit that manually in the system files if you so desire. Any pictures? Well I'm on my work PC not at home so I can't do any pictures, what I can say is that most of the baseline managers are implement and that I'm working on the GUI now, so don't say hurray yet as I'm working on it. Sorry Release date? Undefined.
  6. 2 points
    I just finished the first version of bundle - a rc application which virtually merges multiple filesystems into a bigger one. You can use it whenever a RAID full of tier 3 HDD isn't enough for your needs. On the picture above, for example, you can see 10 RAIDs with 30 tier 3 HDDs which yield a virtual HDD that can store over 200MB of data. You can also use filesystems of different size and create files bigger than any of the used filesystems since bundle is capable of storing a file on multiple HDDs. If you encounter any bug, please report it on my github repository. Also check out the wiki page. How to use it First of all you can download it from pastebin (id: TmeSNidd) or my github repository and install the file in the directory for rc script (/etc/rc.d/bundle.lua). Before using it you should configure the constants at the top of the script in accordance with their descriptions. Otherwise Bundle might work incorrectly. Then you need to add some filesystems by executing rc bundle add [address] in the shell. Please replace [address] by the address of the desired filesystem. Doing so wipes the added filesystem. However, Bundle never incorporates filesystems automatically. Next you should allow bundle to run in background by executing rc bundle enable Just reboot the computer and it should be listed by df Note that the label of the first added filesystem and the filesystem provided by Bundle are always equal since that's the way how bundle stores it. You can also view the added filesystems by executing rc bundle list You can also remove added filesystems by rc bundle remove [forcefully] Currently, this just removes the last added filesystem, however. If the removal causes the lose of data this fails except you set [forcefully]. Usage notes Don't install the OS on a Bundle filesystem since Bundle requires some functions of OpenOS. Bundle uses a virtual copy of the file structure. On the one hand this makes "hardware" operations faster, on the other hand it might lead to errors when running out of memory. Bundle works with Lua 5.2 as well as Lua 5.3. Known bugs Seek operations that set the current position to a value that is bigger than the size of the file cause the file the become bigger than its actual physical size. This is also the case on filesystem components of Open Computers but with bundle it might cause internal errors. That is it for now, have fun using Bundle.
  7. 2 points

    Big Reactors Grid Control

    Hi there! So, I've run the "test" program in my 1.10.2 devenv and got the same bunch of 1s. I then changed getEnergyStored() to always return a fixed values without querying the reactor and tested again: same result. This is good, as it's not the reactor code that it's slowing thigs down What I basically have, code wise, is an OC'Enviroment with a bunch of @Callbacks (getEnergyStored, getFuelAmount, etc). DE also implement an Enviroment but it use a string lookup (from ManagedPeripheral) to call the methods. If OC is using reflection to find the correct method on every method invocation we could have and explanation of the delay. I'll have to look around a bit more in OC code Z
  8. 2 points
    I want a Special Thinger ™! Author of OpenPrinter, and OpenLights with 600+ and 200+ downloads respectively. http://www.curse.com/mc-mods/minecraft/225127-openprinter and http://minecraft.curseforge.com/mc-mods/225225-openlights, I also contributed a bit to the IRC program OpenPrinter adds Text printers and scanners to the game, and OpenLights adds a colorable light block. I guess for color 255 0 0 (assuming that's Red IGN is MichiyoRavencroft Thanks, looking forward to my Special Thinger ™
  9. 1 point

    OETF #17 - Open HyperText Protocol

    You can use the port that is not 80. since i said "SHOULD" and not "MUST". But i'll try to change this for better clarity
  10. 1 point

    The Guard - security system

    The Guard - security system The Guard is a base security control program I've written in 2016. It allows you to use some of the security devices from the OpenSecurity mod. It has modular architecture - all features are implemented in independent modules that can be replaced. It has action-driven - you can specify how everything behaves using the action system. Features modular architecture action-driven configurable behavior redstone support (Redstone I/O blocks) support of security devices from OpenComputes: keypads biometric readers RFID card readers turrets entity detectors motion sensors alarms Further reading The guard has its own wiki, on which you can find the installation instructions as well as the example configuration and other information. If somebody is interested in writing a new module, I can create a wiki page with API documentation (basic information is provided in the_guard.lua file). WIKI Disclaimer Although I have tested this program, a few issues might have slipped through. In that case feel free to report them in this thread or, even better, on the issue tracker if you have Gitlab account. If there's an error, be sure to include log contents (logs button on the right side of the program's interface) containing that error. Screenshots
  11. 1 point
    Hi guys, Draconic Control will be the first program I'll be releasing (more to come). The important stuff first: By now there are quite a few programs out there to control draconic reactors. However most of these don't even get close to about 1 MR/t. With this program 1.9 MRF/t (on average) is very well possible. Of course if you're not interested in RF/t but only total RF generated, this program is for you as well. Also, this one has a nice gui. Go check it out here: https://tenyx.de/draconic_control/ Yes, it comes with yet another (unreleased) GUI library *cough*. And yes it uses some kind of self built installer *doublecough*. This program has a CC and OC version. If you want to skip to the OC setup instructions, click here: https://tenyx.de/draconic_control/#setup_oc I'm open for suggestions and so forth. This is the first of quite a few things I'm about to release so stay tuned if you like this one You can follow me on twitter @XyFreak1 to stay up-to-date - I promise I won't spam your tweetdeck or something - mostly release related stuff Have Fun - XyFreak WARNING DO NOT USE THIS WITH OC 1.7.4! Timers are broken in that versions OpenOS and upgrading to this version will cause big holes in your world sooner or later!
  12. 1 point

    OC Programs - Share programs

    do you want to make an ass out or yourself? this is how you make an ass out of yourself. Also, what? Like, what do you mean you want people to teach you but you don't want to look at videos? If videos are a problem, then google is your friend. Lua ain't too hard to learn. also holy duck it's hard to decipher what the hell you're saying
  13. 1 point
    Have you ever wanted to encrypt something but couldn't afford a T2 data card? Well, look no further than icekey-lua and Igloo! Low Level: IceKey IceKey is the low level library. It's no RSA, but it should work for most purposes in OC. If you want to learn more about ICE, click here. Useful if you want to do more with the block cipher, rather than just encrypting files or whatnot. It can be found here. High Level: Igloo Igloo is the high level library, great for encrypting/decrypting files. Automatically uses a CBC and padding. It can be found here. PRs welcome!
  14. 1 point
    Well, first of all, if you only need the message to contain one string, then you are better off by just sending the string as the message, so no need to make a table with that string, serialize the table transforming it into a string which is then send via the modem, once received, transformed back into a table which is then indexed to get the string you want to send... But anyways, I would assume the error with the serialization comes from trying to serialize a nil value. You're using a timeout with your event.pull, that means, event.pull returns nil if no modem_message was received within that 239 seconds. So either you simply remove the number specifying the timeout, or you add an if-statement checking whether you actually received a message and skip the serialization part when the message is nil. -- without the timeout, if this is possible, but it looks like you want your robot to execute some stuff every 239 seconds function loopWait() loopOff = false db.clear(1) me.store({name = "minecraft:record_wait"}, db.address, 1) selectEmpty() me.requestItems(db.address, 1, 1) ic.equip() robot.useUp() repeat _, _, _, _, _, serialized_message = event.pull("modem_message") received_table = require("serialization").unserialize(serialized_message) if recieved_table.loopSwitch == "off" then loopOff = true end robot.useUp() selectFull() ic.equip() robot.useUp() until loopOff == true robot.useUp() selectFull() me.sendItems() end -------------------------------- -- with an if statement verifying there actually was a message received function loopWait() loopOff = false db.clear(1) me.store({name = "minecraft:record_wait"}, db.address, 1) selectEmpty() me.requestItems(db.address, 1, 1) ic.equip() robot.useUp() repeat _, _, _, _, _, serialized_message = event.pull(239, "modem_message") if serialized_message then received_table = require("serialization").unserialize(serialized_message) if recieved_table.loopSwitch == "off" then loopOff = true end end robot.useUp() selectFull() ic.equip() robot.useUp() until loopOff == true robot.useUp() selectFull() me.sendItems() end But the easiest and best way would be to send your string directly as the message -- the computer sending the message modem.send(address, port, "off") -- receiving computer function loopWait() loopOff = false db.clear(1) me.store({name = "minecraft:record_wait"}, db.address, 1) selectEmpty() me.requestItems(db.address, 1, 1) ic.equip() robot.useUp() repeat _, _, _, _, _, message = event.pull(239, "modem_message") if message == "off" then loopOff = true end robot.useUp() selectFull() ic.equip() robot.useUp() until loopOff == true robot.useUp() selectFull() me.sendItems() end
  15. 1 point


    Fuchas 0.4.0 is almost done The new features are: MineOS installer: AVAILABLE Multi-user: AVAILABLE Dualboot (arleady used for 0.3.0): AVAILABLE CPIO-based installer (very very stable installation and allow updates): AVAILABLE Security! (permissions): AVAILABLE Default unicode support: AVAILABLE Virtual components: AVAILABLE (updated 06/30/2019)
  16. 1 point

    Hep with my code?

    Print3d doesn't check getMaxShapeCount() at all. Go to your OpenComputer config file and check the value of "maxPrinterShapes".
  17. 1 point

    HDD corruption every reattaching

    there was a regression caused by updates to JAVA that appears to have possibly broken OC in previous versions. Truth is we were likely misusing a nonblocking file handle, and we were vulnerable to this issue for a long time. But with recent java updates, this issue is causing this serious bug that you have encountered. We have patched our official release of OC to deal with this. You will need to do one of the follow 1. disable bufferChanges in the oc settings. you said you did this, this is actually how to protect yourself from the bug. I suspect you actually hit the bug when bufferChanges was set to true or 2. update to our latest 1.7.4 version ( https://minecraft.curseforge.com/projects/opencomputers/files ) There is no way to recover lost data, short of your own backups. I am very sorry for this frustration I know this has caused
  18. 1 point
    I believe I see where you're trying to go with this but I think there is an easier way. Store the reactor proxies as values in a key/value table and then send method names and args to be executed. Here's a simple example.. -- # Reactor server: Recieves commands from remote client to be run local component = require 'component' local event = require 'event' local modem = component.modem modem.open(1040) -- # List of reactors to call methods remotely upon local reactors = { r1 = component.proxy(component.get '0c60c'), r2 = component.proxy(component.get '0ef58'), r3 = component.proxy(component.get '255aa') } repeat -- # pack it all into a table local msg = table.pack(event.pull('modem_message')) -- # the droids we're looking for local reactor, method = msg[6], msg[7] -- # args to call with the remote method (if any) local args = #msg > 7 and table.pack(table.unpack(msg, 8)) or {} -- # if remote reactor id is present then... if reactors[reactor] then -- # execute the method call with args on a specific reactor. guarded for faulty messages with pcall so we dont crash. local result = table.pack(pcall(reactors[reactor][method], table.unpack(args))) print(sting.format("called %s on reactor id %s", method, reactor)) -- # respond to client with result modem.send(msg[2], msg[3], table.unpack(result)) end -- # client can send the message 'exit' to quit or hold Ctrl+C on the server until msg[6] == 'exit' -- # End of server -- # client: Send remote commands to be run on server components -- # A very simple client... Spruce it up as needed local component = require 'component' local event = require 'event' local modem = component.modem modem.open(1040) modem.send(server.address, server.port, 'r1', 'isProcessing') -- # exec 'isProcessing' on 'r1' at server print(event.pull('modem_message', modem.address, server.address, server.port)) -- # print and await server response -- # End of client
  19. 1 point
    Admin edit: This is a project run by HydroNitrogen, the OC Staff Team do not have or exert any control over it. Introduction: Hey all! A long time ago, I started an OC/CC Discord server, and it was and still is a big success. We've helped numerous people with their problems quickly, laughed together, discussed ideas and shared cat pictures with over 150 members! A not so long while ago I re-launched a new version of this OC/CC Discord with more properly optimized structuring, clean looks and correct configuration to give you the best experience. This new server is targeted to Minecraft Computer Mods in general. We have CC enthousiasts, OC enthousiasts, and even programmers who just are into Minecraft in general. This Discord is unofficial and not oficially related to ComputerCraft, OpenComputers or RetroComputers. About the server: This server focuses on providing a quick and talkative chat based place for people with interests in ComputerCraft and/or OpenComputers to interact, ask for help, show creations and more. Everyone is welcome here and banning or kicking shouldn't be necessary. Still, some people may push limits and therefore we have to enforce simple rules. Do not harass, excessively insult, act annoying, spam or post malicious content. These rules can be interpreted in a lot of ways, but as long as you don't have malicious intentions, you don't need to worry about it ;). To help you during your stay we've specified a few distinct places to chat, called channels. We provide the following channel structure: INFORMATON - #welcome -> In this text channel you can view relevant information regarding channels, roles and rules. - #news -> This channel wil present you with occasional (important) updates regarding the Computer Modding community. For really rare special events, an @everyone ping may be used. COMPUTERCRAFT - #computercraft -> For discussing anything directly related to ComputerCraft. Here you can ask for help, share ideas and more. OPENCOMPUTERS - #opencomputers -> For discussing anything directly related to OpenComputers. Here you can ask for help, share ideas and more. LISTS AND ADS - #creations -> Here you can advertise your creations for both OC and CC. You should only post one message per creation with a link to a forum post if available. This channel is not for chatting, only for posting! - #resources -> Here you can advertise your creations for both OC and CC. You should only post one message per creation with a link to a forum post if available. This channel is not for chatting, only for posting! OFF-TOPIC - #everything -> For anything, literally anything that is not directly related to ComputerCraft or OpenComputers. You can talk other mods here, or post a picture of your cat. We're still the internet. - #meta -> The meta channel is for anything regarding this Discord itself. Found something wrong, weird or have ideas how this Discord could be better? Share and discuss them here! That are all the text channels. Moreover, there also exists a voice channel voice for those of you who must speak out loud. Joining the Discord server: CLICK HERE TO ENTER THE DISCORD SERVER (as of writing we have 300 members and are still growing!) I hope everyone can benefit from and enjoy their stay in the Discord servers. Idea's, issues and feedback should be posted in the Discord itself! See you there!
  20. 1 point
    This is a suggestion on how and why to rework OC's sysyield timeouts. The required fixes basically give ability to implement preemptive multitasking for free. 1. Current implementation of sysyield timeouts is insufficient Currently, it is not a real protection against executor thread hogging. It is only a safeguard, and a very efficient one. Consider the following code: local function dos() while true do end end while true do pcall(coroutine.resume, coroutine.create(dos)) computer.pullSignal(0) end Flash it onto a EEPROM, and throw that into a bare T1 case with just a CPU, a smallest RAM stick, and some power to keep it going. Turn on that computer, and you have a hogged a single executor thread until someone shuts it down. Boot some more computers off the same EEPROM, and you can easily hog all executor threads on a server. On default config, running just 4 of such hogs makes other computers practically unusable, every sysyield causes a 5 second delay. Tweaking the timeout won't really help, since then programs will have to pull(0) much more often, and in the presence of such hogs every yield will cause a delay. Just killing the whole machine when it starts hogging executors won't help in some cases, specifically if computer is turned on by WoL, redstone signal or another computer. Even though it's highly unlikely, such hogging can happen accidentally. Specifically, if a system is built so that it restarts on unknown errors, sysyield timeout will not stop an accidental infinite loop in it. 2. How it is currently implemented I don't think I have a complete understanding yet, but that's how I see it: The coroutine library is wrapped: coroutine.yield() adds an extra nil as the first value, to differentiate normal yields from sysyields coroutine.resume() repeatedly does following: Call sethook() on the coroutine to terminate it on a sysyield timeout Call the real coroutine.resume() If the first returned value is nil (i.e. normal yield), return the rest Otherwise (i.e. sysyield), yield all values and continue the loop Therefore, when sysyield happens (i.e. on computer.pullSignal), the whole stack of running coroutines is unwound, and the outermost one yields the computer. On the next tick, or whenever a signal comes, the computer is resumed, and the same stack of coroutines is rebuilt, and the innermost one continues its execution. The hook that is attached to each coroutine checks if computer has been running for too long, and throws an error if so, which terminates the currently running coroutine. It also extends the deadline by half a second exactly once, so that the parent coroutine has a chance to recover. So long as it does a sysyield in those half a second, or yields/returns and lets its parents do that, the deadline is reset and the computer can continue operating. If it does not, the remaining parent coroutines do not get a chance to recover, and the computer is halted with an error. And until the innermost coroutine times out, nothing can stop it unless it yields control. For example, if you type while true do end in the LUA repl, it will start that code in a coroutine and print an error message when it times out. If that same loop is explicitly started inside a coroutine, the error is caught and another infinite loop is started, the REPL will not get a chance to do anything, and the whole computer will crash. 3. The suggested implementation The basic problem is, the hook set by Lua code with debug.sethook() cannot yield a coroutine. It can only throw an error, terminating the coroutine, therefore the timeout has to be long enough to let the program do whatever it needs to without doing sysyields all the time. This is problematic, since all the computers share the same few executor threads, and the timeout also has to be short enough to allow other computers to run normally. However, the debug hooks actually can yield, under certain very restrictive conditions: https://www.lua.org/manual/5.3/manual.html#lua_Hook The catch is, it can only happen from the native code (C for normal Lua, probably Java for LuaJ), and no values can be returned. I've written a simple test library in C to allow setting yieldable Lua hooks from Lua code: https://github.com/evg-zhabotinsky/yieldhook I tried to implement it myself at first, but then realized that I'm reimplementing debug.sethook... So I just copied it, cut out the unneeded bits and added a loader. If possible, it's probably cleaner to modify the original Lua library (ldblib.c for C version, not sure about LuaJ). The final interface of the modified debug.sethook() is that if hook mask contains an 'y', event is either 'line' or 'count' and the hook function returns truth, the paused coroutine is yielded with no values, i.e. coroutine.resume() returns just true. The normal return from coroutine with no arguments can be differentiated from a hook yield by checking if coroutine is now dead, and the normal yields can be wrapped to prepend an extra true value. tl;dr: see the test program in my repo, it demonstrates a simple preemptive multitasking implementation. Its wrapper for coroutine.resume returns: true plus the values on normal yield or return false plus the error message on error nothing on a hook yield (that's what different from the standard behavior) It should be pretty easy to modify the OC's existing wrapper and hook functions to sysyield instead of throwing an error on timeout. That timeout can then be made much shorter, since coroutines are no longer terminated. Preferably, it should be adjusted dynamically by machine.lua, so that cycles are distributed fairly (incl. according to CPU and memory tiers) with no leftovers and each computer runs exactly once every tick. Preferably, something like computer.getSliceTime() and computer.getRemainingTime() should return how much time the computer has been assigned during the tick and how much of it is left. The units of those functions can be declared "abstract cycle amounts" for the sake of "realism", in which case the slice time will be CPU frequency (quite unstable, just like the tooltip suggests xD) and the remaining time will be cycle count until the next bus synchronization or whatever. Having done that, there basically will be preemptive multitasking between all the computers, and none of them will have to wait long for their turn to run. For compatibility, the current "die if hung for 5s" behavior can be implemented in OpenOS, and allowed to be disabled for the sake of "power users". To allow for user-controlled preemptive multitasking on a single computer, I propose adding computer.setTimeout(time, coroutine), with time being the same units as computer.remainingTime() and coroutine being the timeout handler coroutine. The debug hook will work all the same, except it will yield prematurely if the soft deadline happens to be earlier. The wrapped coroutine.resume() will see that a timeout has happened, but hard timeout hasn't expired yet, and instead of yielding any further will disable soft timeout and resume the specified coroutine. The coroutine.status() has to be wrapped too to mark the "yielded by hook" coroutine as "normal", as if it called resume() on the handler coroutine. While the handler coroutine is running, soft timeouts are ignored. When it yields, the paused coroutine is resumed and soft timeout is enablet, if it was set again by the handler. However, if there is a pending soft timeout, the handler coroutine is immediately resumed again. The setTimeout behavior suggested above matches closely how a timer interrupt would be handled in a real CPU, exactly what machine.lua should contain. The rest of multitasking implementation and protection is on the OS. Apart of implementing a scheduler, synchronization mechanisms have to be implemented. Count hook can trigger in the middle of any non-trivial expression, so normal assignments cannot be used for unconditionally reliable synchronization. However, a coroutine cannot be resumed unless it's suspended, and everything on a computer runs in a single Lua state, so any coroutine body is a natural critical region, which can easily be leveraged to implement any kind of synchronization. 4. Who is going to implement all that? Given some time, I can implement the Lua side of things. The native side, though... I'm afraid to break something there, and even though I've done the same modifications for the official Lua implementation, I don't know yet how to do the same for JNLua and LuaJ and in the context of OpenComputers specifically. Plus, I'm not keen on rebuilding OpenComputers from source. If someone confirms that there's nothing to learn or break and that it should just work, I'll probably do that too. Once the core functionality is implemented, I'm thinking more like implementing a more Unix-like OS, aiming for POSIX compatibility, and the ability to implement proper preemptive multitasking is a must for that. The ultimate goal is to be able to compile and run most normal C programs without modifications. I'm already working on a primitive C to Lua compiler, because I gave up porting a simplistic MP3 decoder to Lua by hand. (I want to have online radio in my bunker!) Aaanyway, comments and suggestions are welcome. I was more interested in the technical part, so I haven't really though much about API function names or how exactly to divide time among computers of different tiers, so there's that. (Also, is there a way to figure out tiers of arbitrary component from inside the computer?) I didn't think at all about how OpenOS would provide preemptive multitasking to its programs, too, and I have absolutely no idea if it would crash and burn when anything starts running "in parallel".
  21. 1 point
    Sweet. I just built a new reactor with all mods updated and it worked for me with the gate touching the reactor... i placed the gate after the reactor was already formed tho so placing it beforehand might be an issue. I also noticed that attaching a second energy injector has gotten kinda wonky once the reactor has formed so for now it might be a good idea to fully build the reactor first (and open the GUI) and then place everything else around it.
  22. 1 point
    @CocoVanChoco The reason the reactor is shutting down is because you enabled "failsafe" - this option doesn't do what you think it does and i advise against using it - it becomes useless after past 11% fuel conversion anyways. The reason your reactor is filling up is because energy can not be transferred away from the core fast enough (if at all)
  23. 1 point

    control door piston

    This should do what you want. I didn't test it so it may not work. Just reply with the error message if it doesn't work. local component = require("component") local r = component.redstone local term = require("term") local text = require("text") ---- config section local password = { pw_open = "openMe", pw_close = "closeMe" } local side = 5 --side of the door ----- local open = false local input_password local function checkPassword(i_password) if (i_password == password.pw_open & open == false) then return true elseif (i_password == password.pw_close & open == true) then return true else return false end end term.clear() while true do print("Please enter the password:") input_password = text.trim(term.read({pwchar = "*"}) or "") if (checkPassword(input_password)) then if (open == true) then -- Close the door if open. print("Closing the door.") r.setOutput(side, 15) else -- Open the door if closed. print("Opening the door.") r.setOutput(side, 0) end else print("Password was wrong, try again") end end
  24. 1 point
    This operating system is already one of the best OpenComputers operating systems I have seen. When will there be a text editor/file creation?
  25. 1 point
    Greetings Blood Mages and mortals, Are you like me? Trying to keep stock of your blood slates without fear of running out mid-operation? Or just simply don't have time while working on other forms of alchemy, thaumaturgy and technology? Then you are in luck! For I have managed to wrangle the beast of our Altar into a handy program! OK. I'll stop that now... While working on my altar setup, I wanted a way to automate slate creations, and the best my google-fu could do was finding a mod called Sanguimancy, left behind back in MC 1.10.2. I wanted a way to automate slates that did not require constant management, like a filtered pipe or conduit system would need. So I began to think... Of all the mods I had (in the FTB Revelations pack at least) OpenComputers seemed the most likely to work. So I got to work researching and experimenting with Blood Magic and OpenComputers, until now... I present to you BloodCtrl! (alpha...) Main Features Automated Blood Slate creation Active monitoring of Blood levels in Altar and reserve tank Possibly Many Bugs... wait... Minimum Requirements Please be aware that this program was written on all Tier 3 components and is optimized for them. Tier 2 Computer Case Tier 1 CPU or Tier 2 APU 1x Tier 1 Memory Tier 1 GPU (if using CPU) Tier 1 Hard Disk Drive Tier 1 Redstone Card Internet Card (temporarily) Lua BIOS EEPROM Tier 1 Screen Keyboard Transposer Installation Install OpenOS Run "pastebin get NpeViDMT BloodCtrl" Setup and Use Place Transposer behind your Blood Altar Place a Chest on top of the Transposer Place a Stone storage block to the Left of the Transposer Place your computer and screen to the Right of the Transposer, any configuration you would like (Optional) Place any type of fluid tank behind the Transposer Power and Turn on computer Edit and Run BloodCtrl Before BloodCtrl will work correctly, you will need to specify which sides everything is on. By default, I have included my setup but this may not work for everyone Take your time and find out which sides are connected to which blocks. For example: The Chest would be above the Transposer, so its side would be 1 as part of the Sides API Once you have all the sides configured, change any other Variables you may wish. Your desired slate counts, your altar tier level, etc. You will need to provide either a chest or some form of autocrafting of Stone for BloodCtrl to use. By Default and what I have used is a Refined Storage Interface with a crafting card and 3-8 Stone in the first Output Slot (See Pictures below) Please be aware that BloodCtrl does not produce or control Blood Creation, it only monitors and displays Blood levels and redstone at this time. You will need to provide blood by your own means. Bugs If any slate stack is empty or in the wrong slot, the program will crash (Workaround: make sure there is at least one of each slate at all times) If there is no stone available when crafting a Blank Slate, the program will crash (Workaround: make sure there is at least one stone at all times) There is no way to close the program without restarting the computer Planned Features Better UI Bar for blood levels Color (if supported by screen) More overall stability Media Pastebin Link: https://pastebin.com/NpeViDMT Images: https://imgur.com/a/CtIdUXY Video: Comming soon? Have Fun Blood Mages! Haybale100 Credits and License stuff Thanks to WayOfTime and everyone who works on Blood Magic Thanks to Sangar and everyone who works on OpenComputers I distribute this program with a CC BY 4.0 License. Feel free to edit it as you wish
  26. 1 point

    Big Reactors Grid Control

    Currently there are no plans to do that. Fun fact: the installer already downloads packets but it doesn't actually act as packet manager. The whole thing originally emerged from my "xypm" which was able to get packets from the internet tunneling everything over OC network and allowing computers without internet cards to ... install packets (as long as there is a computer on said network with an internet card). My plan is to revive that but...heh.. dunno when.
  27. 1 point

    Big Reactors Grid Control

    I'll make it official now. Big Reactors Grid Control Version 4.3.1 has been released! Changelog: - Now using the new ER API ( and higher). Old API is still supported. - Implemented further mitigations for the "too long without yielding" issues. - Included a hack/workaround for a bug with OpenOS 1.7.1 (and earlier) and Lua 5.3 mode. - Fixed a bug where attempting to format a number as an integer (illegal in Lua 5.3 mode). I'm sorry for abusing some of you as beta testers
  28. 1 point

    Big Reactors Grid Control

    yep, should always require("bit32"), it is not intended to be global (we aren't clearing it from _G in boot). I'll fix in dev. sorry
  29. 1 point
    Excuse me @XyFreak, The link to simulation program for both 32bit and 64bit are down. I've searched many forum posts and got no clue about what happened to those links. Any ideas?
  30. 1 point
    That makes sense. What you gave me are the localized names -> "label" but the program uses the internal liquid name -> "name". I tweaked the display in 1.8.5 to show that better because labels change depending on the selected language for minecraft. Update 1.8.6: -fixed Thermal Foundation liquids
  31. 1 point

    Big Reactors Grid Control

    It's been a WHILE - but it is finally time... Big Reactors Grid Control Version 4.2.6 has been released! Changelogs: - Greatly reduced the number of API calls for setting reactor fuel rod levels. - Fixed a bug where the reactor controller would miscalculate the fuel rod offsets with sub 1% precision. - Fixed a bug where the grid controller would not set the reactors output rate to the optimum but leave it as is when coming out of "HOLDING CHARGE" mode. - Partially rewrote calibration code for reactors to remove "magic values". - The Tabs for "Reactors" and "Turbines" will be omitted if there's not enough space for them (only calculated on GUI startup). - Fixed GUI resolution misbehaving on T2 screen setups. The colors are still off due to colorspace limitations on those screens. - Fixed grid UI for very slim screen setups. Try a sexy 3x1 T3 screen setup! - Added experimental support for mekanism induction matrix. J -> RF conversion ratios can be set in mekanism config. Conversion ratios other than 5:2 (J:RF) will confuse the controller. The ratio for the induction matrix can be changed in /usr/lib/brgc/energy_storage_component.lua - Added support for thermal expansion energy cells. In order to upgrade from previous versions, you just need to run the installer again. If you've used BRGC with any ER version between and you might want to upgrade to now and remove your brgc configuration afterwards to recalibrate your setups. I've changed some of the calibration code for reactors so those might calibrate a lot slower. If you feel calibration does not terminate, please send me a schematics of your reactor. Also... I can't stress enough how sexy this looks: It's pure coincidence the spacing works out so well too
  32. 1 point

    Big Reactors Grid Control

    Unfortunately, this is not correct. Running the controller in larger intervals would devastate its ability to keep the reactor output leveled. For smaller to medium sized passive reactors this wouldn't really be an issue. Active reactors however would constantly overproduce steam - then get their output cut and underproduce steam. Something similar would happen to larger passive reactors. My point was that in the past you could run BRGC litterally every tick with no additional lag introduced by outside factors whatsoever I've run my test program (last post) against turbines and they have the same issue, unfortunately. They require a lot less API calls to control though (BRGC sets each fuel rod individually to achieve finer grained control over the output capabilities). Recap: Reactors + Turbines are affected. ER is not the only mod with this behavior (-> computronics) There are mods without this behavior (-> draconic evolution, mekanism) We have a very small program to check on ... lets call it: API call latency The issue has been observed on 1.10.2 at least (I've not yet tested 1.12) This is pretty much everything we can do without diving into the mods code and comparing how the OC API is implemented here vs DE or mekanism to figure out what's going on. If this goes on for a bit longer I might end up doing that this weekend.
  33. 1 point

    Big Reactors Grid Control

    I suspect your turbine is built incorrectly in that case. It sounds like you have too many turbine blades to support the coils you're using. IIRC, the program will basically push the turbine to the floor and run it as fast as it can during the calibration. It only will decrease the steam flow rate once it has calibrated against the maximum energy production possible. If the calibration causes it to go overspeed, then the program stops and errors out, as you see. So you should either reduce the number of turbine blades to bring it more in line with the coil(s) you're using, or add more coils to slow down the rotation.
  34. 1 point

    Big Reactors Grid Control

    This normally happens when the file thats trying to be run is empty, happened to me a couple of times earlier with a different program as the files weren't downloading from pastebin. Try redownloading the installer as @XyFreak said.
  35. 1 point
    I guess you could start from L135 anzeigen(tankneu). tankneu is all the information about all liquids already added together and anzeigen is looping through the table and decides the position on the display and on L177-L185 it is giving it to zeigeHier([...stuff...]) label (visible liquid name), name (hidden liquid name, this will be used to check with the color table), menge (amount), maxmenge (max amount), prozent (percent, this is calculated and not in tankneu). zeigeHier combines the variables into the message for the screen, changes the color and then writes to the screen. You could probably start by making a table like this for anzeigen(tankneu) tankneu = { {name="water", label="water", menge=1000, maxmenge=2000, somethingnewhere=500}, {name="lava", label="lava", menge=4000, maxmenge=5000, somethingnewhere=1000}, } After that add somethingnewhere to L185 into zeigeHier and then change zeigeHier in L205 to include somethingnewhere and then change the table.inserts to have it too. There are two different messages shown if breite==40 (It means width==40) because there isn't enough space left and I decided to not show max amouint anymore on a width of 40 otherwise its too big and doesn't fit. You will have to add anything new to farben.lua to get the colors. https://github.com/Nex4rius/Nex4rius-Programme/blob/master/Tank/server/tank/farben.lua
  36. 1 point

    Big Reactors Grid Control

    @DemolitionDerby You can have the GUI run at startup by editing the /etc/profile file on the computer. This is the bottom of the default file: cd $HOME clear /etc/motd source $HOME/.shrc -q And here's how I've changed that to be now: cd $HOME brgc_gui clear source $HOME/.shrc -q (A clear comes after the brgc_gui because the GUI doesn't seem to perform its own clearing when it exits)
  37. 1 point

    Big Reactors Grid Control

    @NamesReed is it keeping your storage full? Also try using the command line to set the steam target to 2000.
  38. 1 point
    hold the CPU in your hand and R-click (I forget if you need to Shift)
  39. 1 point
    Is anyone doing anything with this in terms of translation and improvement? I'd like to know. Thanks.
  40. 1 point
    First off, this formatting is terrible. While I'm being nitpicky, this is standard thing rather than an advertising thing, so maybe don't describe why you think it's awesome, instead, focus on explanations of the protocol with neat graphics. Anyway, it is good that you have explained how your protocol works in a step by step way.
  41. 1 point

    Big Reactors Grid Control

    You can use braille Unicode characters to give the bars more resolution as with OC font they are exactly 1/4 vert and 1/2 horiz of a full character block(the characters are "⣀", "⣤", "⣶", "⣿", "⡇")
  42. 1 point

    Big Reactors Grid Control

    Ok, while I wasn't able to gather the exact reactor design from what you described, I managed to build a somewhat similar reactor that triggers something that I believe is the same issue. I can't believe I've overlooked that >_>. I dunno how long this is going to take me to fix but i'm working on it.
  43. 1 point

    My gui (Now with visual editor)

    And one more. As you see, i have nothing to do at the moment ;-) Insert radio buttons. Now it's enough. I have no idea what else is missing. If you have ideas let me know.
  44. 1 point
    Haha yeah the 1.9 MRF/t avg settings ARE scary. "Burn mode" is not the final stage but more like the initial stage where it burns through a lot of fuel to get more RF/t earlier. The reactor generates more and more energy, there more fuel it has converted to chaos. That's why you get higher average output at the cost of efficiency. You can set "burnRFt" to 0 to disable that. That'll also make things less scary . If you're using my settings It'll stay in burn mode until the reactor generates 2M RF/t (a few hours). -XyFreak
  45. 1 point

    What is OETF?

    For now I will quote Negi, I'll write something proper here later
  46. 1 point
    Doesnt work for me. I get a blue screen. "Boot/3_compunt.lua:51: No primary 'slot' avable" How do i fix this.
  47. 1 point


    There you go, made that screenshot just for you:
  48. 1 point

    OpenComputers v1.4.3

    OpenComputers 1.4.3 is now available. It brings drones and a tier two microcontroller, as well as some more mod integration. As always, remember to make a backup of your world before updating. For downloads see Curse. Added: Drones, less powerful but faster entity-based robots. Added: Access Points can act as plain access points now (i.e. you can disable them bouncing wireless messages they receive; they always acted more like repeaters before). Added: Tier 2 Microcontroller, most important differentiation is that it has a T2 card slot, so it can use bundled redstone, e.g. Added: World Sensor Card, integration for Galacticraft, allows reading atmospheric information. Added: Leash Upgrade, can only used by drones for now, allows drones to drag around animals. Added: API callback to allow the color of robots' power indicator (light strip). Added: Several blocks now have customized Redstone Comparator outputs, e.g. computers depending on whether they're running or not. Added: Several blocks now implement BuildCraft's IHasWork API, meaning similarly to how Redstone Comparators are powered you can now use gates' "Has Work" state in combination with these blocks. Changed: Faster GPU draw calls. Finally got around to do some proper testing and verified the old limits were a tad too conservative. It only took me a year! Fixed: Potential crash when starting a computer on older Windows systems. Fixed: Tier 2 redstone cards not being available if only a wireless redstone mod was present (but no bundled redstone mod). Fixed: Bugs discovered in the beta. Click here to view the article
  49. 1 point

    OpenComputers v1.4.0

    OpenComputers 1.4 is now available. Even more important than usual, remember to make a backup of your world before updating. Seriously. Do it. For downloads see Curse. VERY IMPORTANT You cannot downgrade to OC1.3, after loading your world in OC1.4, without losing converted blocks. To future-proof things, the way blocks are handled internally has been switched around a bit in 1.4. This means all of the old blocks have to be converted to the new format. For blocks that are in the world this happens automatically. For blocks in inventories, this also happens automatically if they are in a player's inventory. It's really not that big a deal, but I want to make sure you're aware of this, to avoid unnecessary confusion. Added: More NEI integration. When showing the usage information of an item (default is `U`, at least for me), for OC items there are now one or two new pages. One with a manual, describing the item, and one with API documentation (i.e. callbacks exposed by the component provided by the item). Added: `geolyzer.analyze` callback, allows reading more in-depth information on blocks directly adjacent to the geolyzer / robot / whatever the geolyzer is built into. Added: Database component; primarily used for AE2 export bus driver for now. Allows storing representations of item stacks to be referenced by other components. This was added to allow passing item stacks with NBT information to some callbacks without having to expose the actual NBT to scripts. Added: Password char support for `term.read` (e.g. `term.read(nil, nil, nil, "*")`). Added: Access lights to computer cases, disk drives and servers to indicate disk / floppy access. Added: Permission check when changing sign text via sign upgrade. Added: Better support for custom CPU architectures. In particular, when registered, OC's CPUs can be simply reconfigured to another architecture by shift-right-clicking them. Not that there are any released ones, yet, to my knowledge. Added: Logic to prevent putting components into devices where they could not be used anyway, e.g. redstone cards in tablets. Added: Wobbo's rc script system to OpenOS. Added: Loot disk with Magik6k's network stack. Changed: Integrated OpenComponents (interaction with other Mods). The OpenComponents addon is no longer required in OC 1.4 (on the contrary, it mustn't be present, because it uses the OC 1.3 API). Changed: Reworked power conversion. Different blocks now accept external power at different speeds. Check the tooltips! Changed: Reworked call limits. The speed with which certain operations can be performed in OC are controlled by "call limits", e.g. how many times per tick a computer may tell the graphics card to update. This is no longer per component but per computer now, and different CPUs have a different call budget - that means T3 CPUs are actually faster than T1 CPUs now. Changed: Improved and updated some third-party block drivers. Changed: The adapter now has an inventory with one slot, which can take certain upgrades such as the inventory controller, tank controller and sign upgrade. Some functionality previously provided out of the box is now only available via these upgrades when put in an adapter. Changed: Updated some mods' APIs. Changed: `robot.durability()` now returns a single number, 0 = broken, 1 = no damage. Internally this now uses handlers for specific mods' items. If you know of items from a mod that are not working as expected, let me know. Removed: MJ support. Fixed: Stuff. Probably. (Honestly, I can't remember if the recent fixes were fixes for changes introduced by 1.4, or something older...) Also, as the version bump implies, OC's API changed enough to break stuff using the OC 1.3 API. If you're a modder using the OC API and haven't updated already, please do so at your earliest convenience. If you're not a modder but know a mod uses the OC API and hasn't updated yet, please let the author know about the change. Most of the changes won't require a lot of adjustments; to make updating less frustrating, the things that have changed in the API are documented on the wiki.Click here to view the article
  50. -1 points
    Well i wanna make a program witch is a os that is more better than openos So... i wanna say that i don't really know how to program so i need your help... Questions of mine How can i make startup programs/alias. Can i use custom apis? Or just better ones? Could i change the edit program? (How?) How can i add buttons? (Guis, Desktops, etc.) How can i make a installer? -------------------------------------------------------------------------------- Please submit your answers in *Submit Here* I hope you will enjoy my os. still going on with the aternos server. I buyed a server a long time but people still not buying for my stock so i needed to shutdown untill i make enough money to pay to the server. Submit your vote! Help me with those questions please
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.