Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Forum Connectivity Upgrade Read more... ×

payonel

Developer
  • Content Count

    106
  • Joined

  • Last visited

  • Days Won

    9

payonel last won the day on December 3

payonel had the most liked content!

About payonel

  • Rank
    Leading Member

Contact Methods

  • Minecraft
    payonel
  • GitHub
    https://github.com/payonel
  • IRC
    payonel on esper.net

Profile Information

  • Gender
    Male
  • Location
    Portland, Oregon
  • Interests
    Coding and Gaming

Recent Profile Visitors

934 profile views
  1. payonel

    More authority over the 'harware'. (OC Developer Request)

    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 switch. Strangely I found have found that I enjoy the two contrasting worlds (lua <--> c++).
  2. payonel

    More authority over the 'harware'. (OC Developer Request)

    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 when you've yielded 10 times. Also, lua state will collect garbage dynamically You can already do that, see pcall. Or, run untrusted code in a sandboxed coroutine. The coroutine will die if they OOM. We looked into this, unfortunately you cannot arbitrarily serialize all value types in lua. Kernel Security: There is nothing MORE secure about unboxing any part of the sandbox. In fact, you could just run the machine.lua code, again, inside minecraft, and run an OS inside that sandbox. Sandbox inception! You wouldn't have debug hook, but hooks do not increase security, we only use them for stopping long running processes. And you don't need to do that, we do it for you. We are not in favor of making it this easy for uninformed server owners to expose their private server environments to users. Users have brought this up before and we (developers) are in strong agreement about this. Hopefully you're still reading this far, and not just mad at me for shooting down your sincere request, inspired by your obvious passion. I wanted to encourage you to ignore the constraints of the sandbox, and rather, look at what you really can do with developing a custom kernel. There is a lot more power than you might give credit to the system as it is. I whole heartedly agree that the virtual world in OC can be restricting, and at times extremely frustrating. I sympathize. Look at OpenOS. I have spent thousands of hours of my life developing OpenOS. WIthout a question, the single hardest part has been memory optimization and refinement. I'm a C++ developer (irl); I live in a world where I have complete and precise control over memory management (allocation, monitoring, profiling...). The way Lua allocates memory in chunks for its stack makes knowing the true cost of operations and new code actually very difficult to measure. I built an OC emulator primarily to provide a way for me to profile and measure memory usage. But none of this would have been "easier" outside the sandbox.
  3. payonel

    Can I use these in an init script?

    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.lua -- renamed December 7th 2014. Yes, it uses debug.sethook, but users (and openos) are inside the sandbox.
  4. payonel

    Can I use these in an init script?

    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)
  5. payonel

    remote shell by payonel, psh

    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 <address_prefix>` to connect to the first pshd host whose modem address string starts with the address_prefix you specify (this gives a quick short hand mechanism for connecting to remote hosts by just a prefix). No, I don't (yet) have hostname-like support `psh <full_remote_adddress>` saves you from any broadcast/scan calls, and connects directly to the specified host. At this time, psh only works stricly with standard io only, it does not intercept nor fake gpu calls.Most programs will assume you can read and write via the gpu, and psh tells the remote shell that a natural tty (and gpu) is available, thus fooling some programs (such as edit). psh also takes an optional additional argument to run as a command on the remote host (just like ssh does). So `psh -f "" ls` is a fast way to run ls on the remote machine without starting an interactive shell (and close the connection immediately) In the future I'll be adding `pcp` to the same `psh` oppm package, which will support cp calls (inspired by scp), but for now `psh ... "cat file" > file` works reasonably well. Note though at this time stderr is being communicated to psh as stdout, and thus trying to copy a file in this manner may produce a file with a shell error message (such as if a file doesn't exist). Again, in the future, pcp will be the reliable solution for copying files and folders.
  6. payonel

    request is not primary component

    I recommend you read our documentation on components https://ocdoc.cil.li/component:component_access
  7. payonel

    OC causing severe lag

    thanks for testing so much but did you try the flatworld and `/oc_sc` ?
  8. payonel

    OC causing severe lag

    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
  9. payonel

    filesystem.read is returning 2048 character strings

    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)
  10. payonel

    Help with wireless redstone

    https://github.com/MightyPirates/OpenComputers/issues/2987
  11. payonel

    Help with wireless redstone

    `setWirelessFrequency` was a method for rednet wireless redstone, which integration was removed in and after 1.11. in 1.12 we only have redstone and bundled redstone also, updating is a great idea a whole lot was fixed, This is a patch release intended to fix a lot of issues
  12. payonel

    What to I need for a custom OS to run?

    @Molinkois correct that these things become complex quickly, but I think it is a LOT of fun things like term.write, print, and io.write call io.stdout:write. (by default) io.stdout is the tty stream, and io.stdout:write is https://github.com/MightyPirates/OpenComputers/blob/master-MC1.7.10/src/main/resources/assets/opencomputers/loot/openos/lib/tty.lua#L76
  13. payonel

    No Bootable Medium Found

    @SpaceBeeGaming thanks for helping a fellow user I also believe 2 of us already pointed that out and the user acknowledged the mistake already (i.e. read the whole comment thread)
  14. payonel

    No Bootable Medium Found

    that is a ComputerCraft disk drive, not the OpenComputers disk drive
  15. payonel

    No Bootable Medium Found

    I need to see how your disk drive is "connected" to this computer
×

Important Information

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