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

mpmxyz

Members
  • Content Count

    56
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by mpmxyz

  1. mpmxyz

    Lua minifier

    I've just written a lua parser in lua for that purpose. The first part - to cut the code into 'tokens' like numbers, strings etc. - is lightweight enough to be executed from within OpenComputers. The second part - to generate a tree representing the structure of the code - currently needs > 50 MiB during initialization. (It should be possible to move the resource intensive parts out of OpenComputers via a file with a precomputed table.) Obviously this is only reading the code. But I already have ideas for the next step: -remove comments and unnecessary whitespace (only needs the first
  2. I suppose that you want to edit a file via the ingame program 'edit' and it's opening only in 'readonly' mode, right? (hint: Take your time when writing your question; others - like me - might need to read it twice to find out where your sentences end and what exactly your problem is. ;-) ) Back to the problem: If your filesystem is readonly it is most likely because you booted from an OpenOS floppy disk. To be able to modify files you need to install OpenOS on a hard disk drive. (shell command: install) Then remove the floppy disk and reboot. Now you can edit all libraries, programs etc
  3. mpmxyz

    OpenMatrix

    I had some fun playing around with this. Here some hints for improvement: Did you know you could rewrite the following line {["state"]=3, ["posX"]=2, ["posY"]=2, ["pitch"]=25}, to {state=3, posX=2, posY=2, pitch=25}, ? It does exactly the same and isn't cluttered with brackets and quotes. And you should definitely try two for loops to create your buttons: --iterate through posY = 2,3,4 ... 16 for posY = 2,16 do local row = {} --add table row to the list buttons table.insert(buttons, row) --iterate through posX = 2,5,8 ... 44 (notice how the third parameter = 3 defines
  4. You mean this one? https://github.com/OpenPrograms/Magik6k-Programs/blob/master/libdeflate/deflate.lua That would at least enable extracting tar.gz files. (no compressing though...) I could add this with an optional dependency. If it isn't too complex I might even write another program + library to do both compressing and uncompressing. (The file format doesn't look as complicated as *.tar; I just need to find a good reference for all the algorithms involved.) In either case I'd let you know. ;-) PS: If I decide to create such a library I'd also split the *.tar program into a program a
  5. Introduction If you already know 'tar' and tar archives: Yes, this is a tar implementation for OpenComputers. It supports viewing, extracting and even creating archives on tape and file. It supports most of the original tar format and the long name part of the ustar extension. You can now skip the introduction. Now for everyone else: 'tar' is a very old archive file format originating from early UNIX days. It is an uncompressed archive format with the built in ability to store everything from files and directories to symbolic links or even
  6. Introduction We all know the problem: Users - including me - can be quite impatient. This is especially true if a busy program does not give a clue if it is actually doing something. That's where a progress bar is useful. This library - I named it 'auto_progress' - makes it easy to include a nice progress bar into your program. Apart from the progress bar itself you also get a numeric indication and a time to finish estimate. To avoid cluttering the limited screen space it is only activated if your program didn't finish the first 50% within a second. Redrawing is limited to 4 red
×
×
  • Create New...

Important Information

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