- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
-
Content Count
451 -
Joined
-
Last visited
-
Days Won
35
Everything posted by Molinko
-
Got any errors I can look at?
-
I made you a 'simple' program that does what you ask. Create a file in the /home dir of your computer called 'timer.lua' with the code below as the file contents and save it. -- # Lua timer for OC forum member local sides = require 'sides' local thread = require 'thread' local component = require 'component' local setOutput = component.redstone.setOutput local time local side = ... -- # set redstone output to back by default if not side or not sides[side] then side = 'back' end local proc = thread.create(function() while true do time = os.date('*t') if time.hour >
-
It might be that you've re-run this program again after the edits with the global declaration still existing. Hard to say without the whole program. It's not that your program will crash but that the listener, which technically exists beyond the scope of your program, will crash and report the error in /tmp/event.log You should take a hard look at how Lua scope works and ponder why it works the way it does. Particularly that scope is built line by line at 'run' time. local buildWitherButton = app:addChild(GUI.roundedButton(buttonLeftAnchor, 13, buttonWidth, 7, buttonDef
-
I've fiddled with Ubuntu mate a tad. Mostly I mess around with Debian Raspbian a bit on the pi.
-
How to implement filesystem related functions in my custom OS?
Molinko replied to Wattana's question in Programming
This is actually requires a really complex answer I'm not qualified to give.. I would recommend staring and tearing at the OpenOS filesystem API until you have some ideas. Be warned that it gets pretty difficult to grep at some points especially concerning virtual files and directories. lib filesystem also see core full_filesystem -
I apologize @LORD MJ as I'm on the road atm and internet is spotty place to place. Thanks to @payonel for the input, you're a wonderful pal for strolling the forums with your insight. P.s the update looks awesome
-
This new update look GLORIOUS <3 you wonderful people
-
Computer #1 lua> component.redstone.setWirelessFrequency(1) lua> event.pull('redstone') lua> component.redstone.getWirelessInput() > 0 --# wait to run this command 'til after commands on computer 2 are run Computer #2 lua> component.redstone.setWirelessFrequency(1) lua> component.redstone.setWirelessOutput(true) These commands are meant to be run in the live Lua interpreter. Start with computer 1, wait to input line #3 until after commands on computer #2 are run. Once line 3 is executed you should see a `true` if the input is greater than zero from computer 2. I
-
If you setup two identical computers and make a simple script for each, one tx and one rx, to see if you can even transmit or receive even a single bit would be helpful I imagine. If possible then please post back so I can move forward on the assumption that it at least is feasible.
-
The issue you may* be having is that you have multiple redstone components and thus simply grabbing the default proxy (rs = component.redstone) you may be getting variable results or simply not the intended one. To see all the components of a certain type you can run the `components <component_type>` command. i.e `components redstone`. See below for getting specific proxies for specific components. local component = require 'component' local rsProxy = component.proxy 'XXXX-XXXXXXXX-XXXXXXXX-XXXXXX-XXXX' --# the Xs' are the full component address as a string
-
The print function is typically a wrapper over 'io.stdout', i.e 'io.write'. I'd look into how OpenOS handles this. Although this can become rather complex pretty quickly. If you plan on having unix like io then you might want to design your 'pipes' first and lay a convenient print function over them as it is more useful as a higher level function. Think about how your programs will run in your OS and then how your io will tie into the program environment. I think it would be really helpful for you to disassemble this aspect of OpenOS to better understand how you may want to design this. Am I m
-
I'm with Izaya on this. If you want to make IPv4 then the Network look disk is a good place to start. Last I checked it still runs great. Its got ARP, TCP, and UDP but a higher IP addressing layer is not included with the stack. To get an idea of how to incorporate IPv4 take a look a @Magik6k Plan9k OS on github. If you like stuff that just works check out Minitel, it's very handy
-
The issue is within the checkPassword function definition. Change the '&' symbol to the 'and' keyword. This should resolve the current error.
-
[MC1.12.2][OC1.7] OpenPython, micropython available on OpenComputers
Molinko replied to EcmaXp's topic in Architectures
I haven't had the pleasure to try this out because I'm on a long road trip, however I love that some wonderful person has made this. I think this could be a great alternative for those who don't like Lua (I<3lua). -
@Crayven I believe you have OC and CC confused for being related. Setting the size of text was never available in OC like it was in CC
-
I think Piorjade makes a good point about double buffering, the only things I would add are to abuse GPU.copy, and to batch color setting calls as much as possible.
-
You can try this solution I posted for someone else. Should start you in the right direction. https://oc.cil.li/index.php?/topic/1665-terminal-server-and-screen/#comment-7644
-
You should use local variables to avoid future headache. local component = require("component") local modem = component.modem local event = require("event") print("Connent to which IP?") local port = tonumber(io.read("*n")) -- # convert the string representation of a number to an actual number value modem.open(port) -- # modem.open opens ports not IPs modem.broadcast(port, "packets") local message = select(5, event.pull("modem_message")) -- # get all event data after the 5th element/return value os.execute("pastebin run " .. message)
-
`os.execute` uses a string to run a program much like the shell does. local paste_code = "ae64fgy" local paste_opt = "f" local command = table.concat({"pastebin get", paste_opt, paste_code}, " ") os.execute(command)
-
How about a server wired to relays that hold linked cards? No need for a microcontroller for each dimension then..?
-
Lua itself has the collectgarbage function but I have no idea if it's callable in one way or another in opencomputers. Sorry that's about all I got atm..
-
Best part of the whole thread.
-
I'd give you another if I could.
-
I'm not a moderator on these forums. I'm not Bomb block from CC I'm Molinko. I don't go around acting like a king. I attempt to answer questions from people seeking assistance, praise where I'm impressed, or criticism where I think it's due. You've made a post in a support forum basically complaining about the potential of OC. fin.
-
Noah, sometimes, you're just wrong/"don't get it", and that's okay. Fingercomp has tried to demonstrate that although OC has some limitations, they're there for arguably good reasons. Many of your issues in your initial post can be addressed with a config change. As for the buffer library, fingercomp was mentioning that's it's a Singleton. What he's trying to say basically is that the buffer data, or state, will be preserved from one program to the other. If you didn't know this you might think it was a bug... Basically what I'm trying to say is that you could use the forums more appropriately