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

tpzker

Members
  • Content Count

    14
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by tpzker

  1. Updated 3/29/2020 to note about signal consumption
  2. Updated 1/1/2020: Version 2 (checks for drives with /init.lua) Minor Update 4/21/2020: Move to my own domain rather than pastebin
  3. Updated 11/24/2019 to use signals instead of files as they can be more convenient and more portable
  4. Overview Hello there. Some of you may remember KLang. I decided that I should you know, actually work on it. Therefore, I present Triton/TritonLang. Triton is the continuation of KLang, a C++-styled programming language that compiles to Lua. I have no ETA on when it will be done as of the moment, but it is work in progress and I would possibly like to get feedback on my current project status. Hello, world! [Pseudocode] #include <io> int main() { io::info("Hello, world!"); return 0; } Advantages to Lua Headers/easily include libraries Statically and dynamically compiled libraries for programs C++-style syntax and easier OOP Helpful Links WIP Documentation GitHub Repository
  5. Hello there people. I created a program inspired by netcat. It works over wireless and wired networks. To get: -- To make sure /usr/bin exists mkdir /usr/bin/ pastebin get GrCPux9e /usr/bin/netcat.lua Basic usage: -- Sending side netcat [port] [file] -- Receiving side netcat -r [port] [file] The file parameter can be either a file on the system or a '-', which on the sending side will take in input from the console like OpenOS's cat. On the receiving side, '-' will print out received data to the console. -- Sending side netcat [port] - -- Entering text into the sending side will send it to the receiving side. You can end the transfer with Ctrl+D. -- Receiving side netcat -r [port] -
  6. This is a draft. Examples of software will be coded later. Concepts Socket: A file on the system which links two programs' communications. OC: Abbreviation for "OpenComputers" OS: Abbreviation for "Operating System" OpenOS: The stock OS for OC computers. Socket: a medium for communication between two or more programs Rationale To standardize any possible IPC implementations Basic Concepts Background programs (or daemons) can be started with a simple wrapper, such as this example code: thread.create(function() shell.execute(ENV, "/bin/daemon.lua") end) Programs can communicate with sockets through the signals defined in this document These signals can be created with "computer.pushSignal(name: string, [...])" They can be received with "event.pull([timeout: number], [name:string], ...)" or "event.listen(event: string, callback: function)", or on a low-level basis with "computer.pullSignal([timeout: number])" Signals oipc_sock_comms(socketID: string, <... (message)>) -- OIPC Socket Communications -- message must be of type nil, boolean, number, string, table (tables and other messages MUST NOT contain threads and functions due to the limitations of computer.pushSignal()) Notes Please note that OIPC will only work with OSes which pass signals to all subprocesses instead of simply consuming the signal on "computer.pullSignal", "event.pull", or similar functions to wait for/listen for signals.
  7. Hello there people! I created a BIOS-level bootloader that is based on the original Lua BIOS that implements a bootloader function. You simply press the number of the OS you would like to boot to from the list of recognized filesystems. The reason why I created this is that it is roughly 2,000 bytes shorter than OpenLoader's EEPROM. There are two versions: Source version (uncompressed, roughly 2.6k bytes): https://thepuzzlemaker.info/static/blbios2.source.lua Compressed version (compressed, roughly 1.3k bytes): https://thepuzzlemaker.info/static/blbios2.comp.lua To install (compressed version), insert the EEPROM you'd like to flash it to and run: wget https://thepuzzlemaker.info/static/blbios2.comp.lua bios.lua flash bios.lua rm bios.lua To install (uncompressed version), insert the EEPROM you'd like to flash it to and run: wget https://thepuzzlemaker.info/static/blbios2.source.lua bios.lua flash bios.lua rm bios.lua If you have any problems, just reply and I'll attempt to fix it. [INVALID] means that there is an error in the /init.lua file. If the drive doesn't show up, that means that /init.lua could not be found on it.
  8. The core libraries will just be KLang code compiled to a library, then put into some kind of library folder. For static libraries, the compiler will probably just put in that library into the beginning of the compiled Lua file (from KLang file). For dynamic libraries, I'm not quite sure yet. With that way, theoretically, you can link a dynamic library as a static library or a static library as a dynamic library I earlier drafted up this example of a compiled file with a dynamic library: lk = require("lk") lk.link("core") lk.link("test-library") lk.header("test-library/hello.h") test-library.hello()
  9. Hello. I recently started creating a C++-styled Lua programming language. Currently, it is not quite done yet, but you can feel free to contribute to the project as a whole. Site: https://thepuzzlemaker.github.io/KLang GitHub: https://github.com/ThePuzzlemaker/KLang Advantages Header Files Compilation to Lua Static and Dynamic Libraries Roadmap Actual parsing Compilation to Lua Headers Dynamic/Static Libraries Core libraries* Other stuff not planned yet EDIT: It turns out I was able to just pull the lexer out of Penlight, and change the 'file' and 'path' Penlight libraries to the 'filesystem' API. The branch "opencomputers" of the GitHub is the branch that deals with OC. Pretty self-explanatory * network library will have sockets (Entering personal opinion in 3...2...1...)!!!!!1111! sockets [open a socket to any client on port * and allow an object-oriented stream to send to client and receive from client] > normal [listen on port *]
  10. I'm currently working on a new version, so when that comes out, I will make a more detailed tutorial (maybe even a small video tutorial) EDIT: OpenNet 2.0 will be much more secure, and more versatile. P.S. Along with a complete change, OpenNet 2.0 will come with Lua scripting on pages (will ask for user permission first, for security) or possibly a whole different scripting language.
  11. This can be run on servers, as long as they have a network card. To set up webpages, add your code to a file in the same directory named index.onml, as this is the default page. Sorry for the late reply, I forgot about this post a little bit
  12. This project is no longer being maintained, and has not been for a while. I may eventually make a new version, but I would first like to make an addon for OpenComputers to allow long-range wireless signals so that you can connect globally to a server. The OpenNet: Internet like simulation in Minecraft REQUIRES WIRELESS NETWORK CARD Not tested with wired network card This is very WIP, but it still works well for what it does. The OpenNet requires one computer to be running at all times as DNS. This allows for DNS lookup and not having to type things like "af4c71b5-c3be-4da1-b595-4d0afd40359d" to go to a page. It also requires a computer to be running all the time for each web server. The client and web server need to know the DNS server's address, so if this is implemented on a server, it is best to have one central DNS server. Downloads: DNS Server pastebin get 1pp05ryR opennet-dns.lua OpenNet Web Server (configure dns network card address inside file) pastebin get PRTmhN1a opennet-server.lua OpenNet Web Browser (configure dns network card address inside file) pastebin get jMNz5Bej OpenNet.lua Screenshots: OpenNet DNS OpenNet Server: OpenNet Client: ONML: ONML (OpenNet Markup Language) is a simple web page language (not many features yet) that allows you to change the background and foreground color of the site. The colors are cleared after displaying them. To change the color of text, prefix the color with one of these colors (use three letter name): "RED", "ORA"(orange), "YEL"(yellow),"GRE"(green),"BLU"(blue),"PUR"(purple),"WHI"(white),"BLA"(black) To change the color of the background, type "BACK <COLOR NAME>". <COLOR NAME> is one of the colors shown above (use three letter name) Example ONML file: BACK RED WHI The OpenNet: Internet for OpenComputers YEL The OpenNet is an open source wireless communication system made with Lua for OpenComputers. WHI It includes a 8 color (red "RED", orange "ORA", yellow "YEL", green "GRE", blue "BLU", purple "PUR", white "WHI". black "BLA") foreground and background system, along with things similar to DNS Demonstration of the shown ONML file: Roadmap (in no order): Real Internet ONML ONML links/interaction More pages than just the main page
×
×
  • Create New...

Important Information

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