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

payonel

Developer
  • Content Count

    172
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by payonel

  1. Hi @lukeh990 saw your message in irc. you only stuck around in irc for 7 minutes after you pinged me I hope you give irc and troubleshooting this issue with me more again.
  2. is it a local game? can you zip up your entire minecraft instance of that pack and share a link for me to download? if you dont have a place from which you can share it, I can create a cloud folder. just private message me in irc (oc on esper)
  3. ideally it repros with OC only and all we need is a world tarball. ideally i don't have to use another launcher, but can just drop the world, config, and mods in an mmc instance try copying the world to a new pack that contains OC only, turn off power requirements for oc in the config then start it up and let fml drop all the blocks you've removed support for, test the machines and see if they still fail.
  4. if anyone is able to create a simple repro, with a TINY number of mods, and are able to pack that into a zip, then share that zip with me (here, or in our #oc irc channel) i WILL look into this the problem i have is that this does not repro for me
  5. functions have to have an `end` local event = require("timer") event.timer(2, function() print("do something") end,3)
  6. aye, the threading library is part of openos. without installing it, you've got not thread api My solution to your issue would be to put a timeout on computer.pullSignal. If it times, execute the next pending command (if there is one)
  7. First of all, if you pull off getting our machines to run without forced cooperative yields....that's just awesome. I'm pretty excited about the work you did with eris already. Secondly, a fixed user-defined __gc solution also sounds very nice, but raises new risks. I would like to suggest we look at these two features separately. Obviously, the gc work coming after. The problem with __gc code is that debug hooks are disabled during __gc code execution. So a user could rob the thread and we'd not be able to yield it. So unless you have found a way to execute gc code WHILE not disabling de
  8. it's a limitation of eris (edit: that is to say, eris is incompatible with hooks)
  9. components send signals, and the screens send touch events. for more signal info read here: https://ocdoc.cil.li/component:signals and you should run `dmesg` on the command line shell, which prints all signals the machine is getting. it can be quite helpful
  10. I appreciate the study you've put into this. You aren't alone; we also care deeply about these issues. The reason we don't do pre-emptive scheduling actually isn't due to yielding issues from the debug hook (as you've demonstrated) but because we can't persist the lua runtime state in a suspended debug hook. In other words, if the minecraft world chunk were to unload whilst we have a coroutine-in-a-suspended-debug-hook, then upon loading that lua state again (when the chunk loads again), we'd be forced to "stop" the machine. On the other hand, we definitely CAN persist when the root-level
  11. I'll try to explain what is happening in the perspective of the lua compiler In this code chunk, we are assigning buildWitherButton.onTouch to a function. powerButton is declared in the local scope previously, and is captured (linked) from the current scope throwWitherBuildError is not declared, and thus no variable is linked. When executing this code, access to this variable will be checked in the global scope, _G. If when this code is executed there is no _G.throwWitherBuildError then it will resolve as nil. clearAndInitProgressBar is declared in the local scope previousl
  12. btw, if the onTouch callback is made to an event.listern (inside the gui library you are using), which it likely is, then you would see the crash log in /tmp/event.log (it would be crashing because the assert of the 2nd argument is a function and NOT nil)
  13. Looks like your you've declared `progressUpdate` after your used it, thus passing nil to event.timer for its 2nd argument. Which, btw, isn't allowed, it should error (it requires you pass a function there)
  14. mounting is a kernel concept that puts a filesystem at a directory path, so you would implement that yourself you'll see signals pertaining to filesystem components as they become available (see computer.pullSignal) the (hardware) component library provides mechanisms to query available components, list methods, invoke methods, create proxies, etc so, assuming filesystem_address is your hardware address for your filesystem component: local fs = component.proxy(filesystem_address)
  15. firstly, always declare your identifiers as local unless you intend to create global variables for use and effect in other scripts. local component = require("component") local printer = component.printer3d secondly, you could iterate the component proxy, it is a table for k, v in pairs(printer) do print(k, type(v)) end or you can use the command line tool, components /home # components and you can list functions and doc details of component using the -l option, and you can filter the components listed specifying a name /home # components -l printer3d
  16. you could add this line to your .shrc /etc/motd
  17. btw, I made a typo (which I'll correct inline), I meant to say that (in regards to memory swapping) we cannot serialize all data types. So for a kernel to really swap memory, it would only be able to swap specific segments of data ... and could not force arbitrary user code to fully swap. It is sadly outside what Lua can do. We kill the the current coroutine that is long running. So you can catch it yourself, in your kernel, without the kernel crashing. This isn't a detail of machine.lua, but rather, how lua hooks work. And yes, I empathize with the challenge of that sw
  18. I appreciate the interest and enthusiasm. I disagree with a few of the points you've made if you would allow me to explain. "almost" as in it isn't. Killing a thread pre-emptively is the only thing you can do in this case and that is not multithread nor cooperative. You can't resume coroutines from the same Lua state either. It isn't lightening fast, debug hooks are actually extremely costly. Also, we cannot persist debug hooks, thus when a machine is unloaded and reloaded in chunks, any state and special hook magic you might make would be lost. We collect garbage
  19. 1. OpenOS doesn't add to nor remove from the debug library, what you see in OpenOS is available to all user space programs/custom operating systems 2. The debug library filtering/sandboxing occurs in the "hardware", before your eeprom code is executed, by our machine.lua (which builds the sandbox) 3. OpenOS has no kernel.lua and never has. OpenOS never calls debug.sethook anywhere. The machine.lua I mentioned (which again, runs OUTSIDE the sandbox, running unsandboxed, running lua code unavailable to OpenOS, unavailable to any user code), but this machine.lua used to be called kernel
  20. for k in pairs(debug) do print(k) end traceback getupvalue getlocal getinfo getlocal, btw, is limited, it only returns the first result (the name of the field, not its value)
  21. I've developed a remote shell client and rc daemon called psh (payo-sh, like ssh but without the "secure" part) It's still a work in progress, but at this point should be quite usable for basic operations. You can find it via oppm, just `oppm install psh` On your hosts that should accept psh connections, run the rc daemon: `rc pshd start`. To have pshd running every boot, make sure to enable it: `rc pshd enable` From the client, run `psh -l` or `psh --list` to scan/search for available pshd hosts `psh -f` or `psh --first` to connect to the first host to respond, or `psh -f
  22. I recommend you read our documentation on components https://ocdoc.cil.li/component:component_access
  23. thanks for testing so much but did you try the flatworld and `/oc_sc` ?
  24. sounds like a massively bad integration with some other mod. try creating a creative flat world, look at a block on the ground a space or two in front of you, and run `/oc_sc` to spawn a computer and start it up -- just to see if things work at all. you can troubleshoot from there
  25. local fs = component.proxy(component.list("filesystem")()) local handle = fs.open("init.lua") local buffer = {} repeat local data = fs.read(handle, math.huge) table.insert(buffer, data) until not data fs.close(handle) local entire_contents_of_file = table.concat(buffer) stream handles naturally don't returns ALL of what you ask for, it can take multiple reads. read returns nil when the stream has ended (e.g. eof)
×
×
  • Create New...

Important Information

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