This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
theoriginalbit's profile picture

TheOriginalBIT's Programs, APIs, and Utilities

Started by theoriginalbit, 24 January 2013 - 10:58 PM
theoriginalbit #1
Posted 24 January 2013 - 11:58 PM
THEORIGINALBIT'S
Programs, APIs and Utilities


Welcome to my thread. This thread contains programs, APIs, games, and more, that I have made for ComputerCraft.

To keep up-to-date with progress of most of the following programs go to my GitHub account also take a look at my pastebin account for lots of other scripts I make but don't always post.

I hereby give permission for use of these programs or APIs in your programs. I do however ask that you give me credit and leave any appropriate licenses intact!


Games
CCTicTacToe (a.k.a Noughts & Crosses) — And can Now be found as a dungeon disk!
DescriptionTic-tac-toe (or Noughts and crosses, Xs and Os) is a game for two players (in this case player and AI), X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal row wins the game.

Features
  • Support for Advanced, Normal and pre1.4 computers
  • Click support for advanced computers
  • Close button for advanced computers
  • Simple to use
  • Random GUI Colours!
  • An AI that makes moves just like you're playing a real person
  • An easter egg (ability to colour your player name)

Screenshot(s)

DownloadBrowsers
pastebin link
In-game
pastebin get uWdsAzP4 tictactoe

Typer
DescriptionThis game is a speed test game. Your aim: type out the words you see on the screen as quick and as accurately as possible before the time runs out. With a large dictionary of words you will rarely get the same word twice. The words will get longer the longer you last (up to 6 letters). Good luck!

Credit: GravityScore (suggestion link)
Resources: Scrabble help websites to gather a dictionary of words.

Features
  • Support for Advanced, Normal and pre1.4 computers
  • A dictionary of over 31,600 words

Screenshot

DownloadBrowsers
pastebin link
In-game
pastebin get n7j04GRt typer

More soon…

APIs
ccConfig — A configuration utility for programs
DescriptionHave you ever wanted to allow users to easily modify functionality of your program, like keybindings or display messages (or more)? We this is a utility that creates and saves a configuration file for you and your users.

Developer Documentation (outdated but still useful)

DownloadBrowsers
pastebin link
In-game
pastebin get iMpzmDWt ccConfig

ccKeyboard — An on-monitor keyboard
DescriptionccKeyboard is designed to display a keyboard on a monitors screen. It can queue characters, numbers and symbols.

Credit: Engineer — for help with the text-scaling on the varying size monitors

Developer Documentation

Screenshot(s)
Maximum size keyboard

Medium size keyboard

Smallest Possible Size keyboard

Letters Lower

Letters Upper

Numbers & Symbols

More Symbols

DownloadBrowsers
pastebin link
In-game
pastebin get HJLUMGRE ccKeyboard

StringX — Adding a bunch of useful string functions from Java, C# and Obj-C
DescriptionThis library has been inspired by me trying to do some common high-level language string functions that don't exist in Lua. So I decided to go through Java, C# and Objective-C string classes and implement most of the functions in Lua.

Some functions that are implemented are already in Lua, but I did them anyway. If there are any you wish to be added, if you find any bugs, or any incorrect implementations please feel free to reply.

Developer Documentation

DownloadBrowsers
pastebin link
In-game
pastebin get mTSThCiz StringX

Loading Screen — An API to show a programs realtime loading progress
DescriptionThe loading screen API provides an easy way to show your users in realtime where your program is up to while loading.
This API features the ability to render your logo in the middle of the screen and even use it as the progress bar!

After searching through the forums I was disappointed at the lack of a loading screen API that was 'realtime' and not just a 'fake' sleep based screen.
So I decided to make one … Here it is …

Each progress bar is now an object. This means you can have multiple progress bars on the one screen*!
Thats right, you can have, for example, an 'overall' progress and 'current operation' progress AND more!

* Up to 999

Developer Documentation

Screenshots
Standard Load Bar

Logo as load bar

Logo as load bar and overlay

In ascii mode on a non-advanced / CC 1.3 computer

Multiple progress bars

Bar only mode (same for ascii too, only its in ascii)

DownloadBrowsers
pastebin link
In-game
pastebin get zeG34tu6 LoadBar

Screensaver API — An API which renders attractive screensavers to the computer
DescriptionA simple screensaver API that has many custom render modes including a Fish Tank!

Don't like my screensavers? Think that you can do a better one? Well just make a renderer and updater function in your program and then register it with the API and your done! You can now use your custom one!
I'd love to see what you can come up with! So if you think yours is awesome why don't you take a screenshot and post it here, and if I agree I'll add it into the public release (crediting you and your fantastic work!)

Developer Documentation (Lite)

DownloadBrowsers
pastebin link
In-game
pastebin get ZfBKFwWK Screensaver

Computer Program
ccPresenter — A tool to share your screen with another computer
DescriptionCCPresenter comes with two programs, a master and a slave. Run the slave on the computer you wish to mimic, run the master on the one you will be typing input into.

Inspired by, and continuation of the Sphexish's program

UsageMaster
  • no arguments — starts the service (starts transmitting)
  • -stop — stops the service (nothing will be transmitted anymore)
Slave
  • no arguments — starts listening

Known Bugs
  • Not so much a bug but a limitation — cannot have more than one master, the slave will get confused and try to display both.

Bug TestersRyarshJ
Shnupbups100

Features Coming Soon
  • Be able to have multiple masters sending out to clients.

Download
MasterBrowsers
pastebin link
In-game
pastebin get UJWk8Qnv master
SlaveBrowsers
pastebin link
In-game
pastebin get sAM22aJB slave

Advanced Door Lock Program — A program to lock down your house
DescriptionHave you ever wanted to have a password on your door? Well this program is just for you!

This is a password door lock that uses a custom written read function to read input from the user, it allows creation of multiple password acceptance and a password to terminate the program.
These are setup on first program run.

The passwords are stored in a separate file as a hashed string for extra security. If a person can read that and immediately know the password they are a genius and need to speak with me immediately.
This program uses the SHA256 API by GravityScore which can be found here (to clarify this no longer required to download and include, this link is here as credit only).

Disks with startup files are renamed and ejected when the program is running!

Now you might say, hey TheOriginalBIT, it doesn't look very nice, to which I say, "If you can make me a better GUI that supports all versions of ComputerCraft (normal and advanced comptuers) I will gladly use it and credit you. However, I am not very graphically minded and made it functional not pretty"

Screenshots

UsagePlace the file as the startup file to have it run on computer turn on.

There are also optional runtime arguments:
  • -setup - will go through the initial setup again
When performing initial setup the edit program is opened to edit the config file, you must make any appropriate modifications then save and exit.

Features
  • Uses SHA256 hashing for storage of passwords
  • Uses ccConfig
  • Uses custom read function to stop termination!
  • Allows multiple users!
  • Allows termination with password
  • Renames and ejects, disk containing startup file (configurable)

DownloadBrowsers
pastebin link
In-game
pastebin get QpChdzij startup

Turtle Programs
Tree Logger — A simple turtle program to chop down trees for you
DescriptionThis is a fairly simple program, place saplings and it will wait for it to grow and mine it up.

Optionally you can give the turtle bonemeal, or a redstone line to something like a RedPower2 deployer, to grow the tree instantly.

For OS compatibility the turtle will not refuel or resupply itself so check up on it every now and again.

Requires a Turtle that is able to chop wood

Best setup (orange RedPower2, blue EnderChests)

Features
  • Some adjustable values for customisation (in code)
  • Multi TurtleOS compatible
  • Collects the wood so your don't need to

DownloadBrowsers
pastebin link
In-game
pastebin get F5Z6Tjuz logger

Better Miner Program — Just like TurtleOS's excavate only better on fuel usage!
DescriptionThis is an addition upon TurtleOS's standard excavate program. It is designed to have 2 ender chests in the first 2 slots. The first being a resource deposit and the second being a fuel collection source.

It is designed to minimise the fuel usage. To do this you should put it under the top layer that will be excavated as it will dig in front, above and then below thus reducing the amount of times it is required to move and thus reducing fuel consumption by ~ 1/3.

When the inventory is low it will place the ender chest and deposit (it is suggested that some kind of sorting or removal system is setup at the other end so the chest isn't full). When the fuel is low it will place the ender chest and top up.

Please note: There were a few certain conditions pointed out to me that cause crashes or problems, as such this program in experiencing a re-code from the ground up

Features
  • Uses minimal fuel as possible by mining 3 layers at once
  • Uses ender chest in slot 1 to deposit materials
  • Uses ender chest in slot 2 to get fuel
  • Rarely travels to the surface / start location
  • Hits any mobs in the way (careful it will hit you too!)

DownloadBrowsers
pastebin link
In-game
pastebin get WHT9X9BA startup

Code Snippets
Custom Read — Bettering the ComputerCraft read function without breaking scripts
DescriptionThis is an override of the default ComputerCraft read function.

Major differences to the default;
1. First argument: The mask that you can provide to obscure the input can now be more than 1 character. For example

read( "ab" )
with the user input of `hello` would output
ababa
2. Third argument: There is now the ability to specify a character reading limit.
3. Fourth argument: You can now specify if you want the read function to be not terminatable (i.e. it uses os.pullEventRaw instead of os.pullEvent)
4. Unlike the default ComputerCraft function when the terminal is scrolled the read function will also scroll with it. BEWARE: It can and will scroll beyond the top of the screen if you make it do so.
5. Much more efficient and better logic

NOTE: None of the above changes should break existing scripts, so feel free to add this globally in your graphical shells.

If you do find any circumstances where it does break, please report them.

DownloadBrowsers
pastebin link
In-game
pastebin get k4RVvw18 snippetRead

Peripheral Search
DescriptionI made this snippet for a current project I'm working on, and its just too useful not to release separately… It is a standard function that allows you to search for a particular peripheral attached to the computer locally or via network cables, however it has a callback feature to it as well. Callback you say? What would you need that for? Well, lets assume you want a wireless modem, a standard peripheral search would return you any modem it finds, whether it is wireless or not. By supplying you with the option of a callback, the search will actually give this function a wrapped version of the peripheral it is testing, this will allow you to perform additional tests, such as testing if the modem is wireless, and then return whether you want the peripheral or not.

Another addition to this function is the ability for you to specify whether you wish to retrieve back just the side/name of the peripheral, or whether you want the wrapped peripheral.

And of course the last feature is the ability for you to provide a custom error message, for example if you tell it you want a wireless modem you must specify "modem" which when not located would output "Cannot find a modem attached to this computer", giving this custom error message ability means that the error that shows to the user could say "no wireless modem found", giving you better control over the output of this function

Function Info

findPeripheral(_type, errMsg, callback, wrapped)
_type is the peripheral type you're searching for, for example "modem" for wireless/wired modems, "monitor" for normal/advanced monitors, "drive" or disk drives, etc.
errMsg is the custom error message to show, for example "cannot locate a wireless modem" instead of just "cannot find a modem attached to this computer"
callback (optional) is the function to be called when a matching peripheral is found, checking with you if it is indeed what you want (you must return true/false!)
wrapped (optional) is the boolean that specifies if you wish the value returned to be a wrapped peripheral, if this is omitted the return will be the side/name of the peripheral

Usage ExampleSimple

local wirelessModem = findPeripheral("modem", "No wireless modem found attached to the computer", function(periph)
  return periph.isWireless()
end)

More complex

local advancedMonitor = findPeripheral("monitor", "No advanced monitor found attached to the computer", function(periph)
  if not periph.isColor then
	error("Running incorrect version of ComputerCraft, please update to a version with advanced monitors and try again", 0)
  end
  return periph.isColor()
end)

DownloadBrowsers
pastebin link
In-game
pastebin get Jiy8jrBK periph

Dynamic Function Invocation on Lua Objects
DescriptionWhile dealing with an object-oriented system I wanted the ability for people to invoke the functions on my objects in all the valid ways in Lua

--# first is the standard OO method with colon notation
object:foo("bar")
--# second is the standard OO method with dot notation
object.foo(object, "bar")
--# third is the method to call a function in an API, and it is the conventional OO method found in languages such as Java and C#
object.foo()

However with OO in Lua, only these are possible

--# first is the standard OO method with colon notation
object:foo("bar")
--# second is the standard OO method with dot notation
object.foo(object, "bar")

I started by making a helper function which simply "cleaned" the arguments supplied to a function. I was then talking to Symmetryc about the solution that I had and he was able to come up with the method you see in this code. I've taken it and added further checks and stability to it and then decided to release it here so you can all benefit from its "magic".

The code snippet provided here adds this third method of invocation, allowing you (or any other developer) to call your objects any way you wish, very handy for APIs!

DownloadBrowsers
pastebin link
In-game
pastebin get c5xqMUb9 invoke

Data Structures — Lua Implementations of data structures that are found in other languagesStack— A typical FILO data structure with the ability to peek at the top
Edited on 25 November 2013 - 10:38 AM
Orwell #2
Posted 25 January 2013 - 08:02 AM
I'm glad you made a topic for your programs again. I'm sorry to do this, but your first reply will be some constructive criticism. :P/>

I took a look at your circle drawing API a week ago and I noticed some odd design choices that could cause inefficiency. I know it's quite stupid to go correcting something trivial as a circle drawing API, but I decided it was worth it.

First off, I did some testing on a large monitor and noticed that drawing big solid circles would be noticeable slow (often 0.5 seconds). Also, you seemed to not use the factor 3/2 on the x-axis for the solid circles because that causes artifacts.

These are the improvements I could come up with both in efficiency and logic design:
  1. Defining the character to draw on the screen before the loop instead of branching each time (small issue).
  2. Iterate over the angle as radians directly, rather than converting them on each iteration.
  3. Calculating only a quarter of a circle and mirroring the point over both axes and the center.
  4. Rather than of copying most code from the normal circle function to the solid one, merge them in favor of modularity.
  5. For the solid circle function: instead of drawing all circles with decreasing radius, simply draw all horizontal lines between the extremes on each y-coordinate. This increases speed significantly and solves the artifacts for compensated circles (multiplying x with 3/2).
Applying all that led me to modifying your script to this: http://pastebin.com/Qb9fbudS . The solid circle on a giant monitor took between 0.01 and 0.03 seconds on average instead of the previous 0.50 seconds with this script.

I just thought that this was a perfect example of optimization and decreasing complexity of 'algorithms'. No matter how short or simple it is. :P/> I hope you appreciate my shameless attempt at improving this script for the sake of teaching others. :P/>
NeverCast #3
Posted 25 January 2013 - 10:49 AM
Horray!! Central place for stuffs! *le follow*
theoriginalbit #4
Posted 25 January 2013 - 01:02 PM
I'm glad you made a topic for your programs again. I'm sorry to do this, but your first reply will be some constructive criticism. :P/>
Yeh I was always going to do it… just had to get motivated :P/>

I took a look at your circle drawing API a week ago and I noticed some odd design choices that could cause inefficiency. I know it's quite stupid to go correcting something trivial as a circle drawing API, but I decided it was worth it.
I like how you wait a week and a new post to do this :P/>

First off, I did some testing on a large monitor and noticed that drawing big solid circles would be noticeable slow (often 0.5 seconds). Also, you seemed to not use the factor 3/2 on the x-axis for the solid circles because that causes artifacts.
Yeh thanx, I test code in cc-emu so obviously couldn't test on a monitor…

Rather than of copying most code from the normal circle function to the solid one, merge them in favor of modularity.

I hope you appreciate my shameless attempt at improving this script for the sake of teaching others. :P/>
The main reason I did it that way was so they could use either one if they wish, for some reason late at night it didn't occur to me to just combine them in with a 'solid' parameter. Yes thank you for the suggestions/code, I updated the code in the pastebin link.


Horray!! Central place for stuffs! *le follow*
Lol! You crack me up :P/> :'( naw I have an anonymous follower… I wanted to know who it was… :P/>
theoriginalbit #5
Posted 26 January 2013 - 02:32 PM
oh wow… fixed issue with OP. I had some programs hiding in one of the programs spoiler…. I knew there were more programs than that!
NeverCast #6
Posted 27 January 2013 - 06:34 PM
CCTube Format Transcoder has had it's first line of success today. Converting Gravity's LightShot videos in to our own format. Test results show file sizes at 21% and 46%. This is BEFORE the compression pass. So on average, file sizes are a 3rd!
GravityScore #7
Posted 27 January 2013 - 07:08 PM
CCTube Format Transcoder has had it's first line of success today. Converting Gravity's LightShot videos in to our own format. Test results show file sizes at 21% and 46%. This is BEFORE the compression pass. So on average, file sizes are a 3rd!

O.o That's cool! I must see how you do it! Is this after files are compressed using the new compression system in 1.2? Cause that is fantastic if it works properly…
AnthonyD98™ #8
Posted 27 January 2013 - 07:18 PM
Nice Programs, :)/>
theoriginalbit #9
Posted 27 January 2013 - 09:16 PM
CCTube Format Transcoder has had it's first line of success today. Converting Gravity's LightShot videos in to our own format. Test results show file sizes at 21% and 46%. This is BEFORE the compression pass. So on average, file sizes are a 3rd!
Feel like pushing out that commit by any chance? :P/> Wait nvm, stupid GitHub changed the branch on me :P/>

Nice Programs, :)/>
Thank you :)/>
NeverCast #10
Posted 28 January 2013 - 09:22 AM
O.o That's cool! I must see how you do it! Is this after files are compressed using the new compression system in 1.2? Cause that is fantastic if it works properly…

I'll run it on a compressed lightshot video today and let you know the results. They were just standard videos that were in the git repo.
Here's the link to the repo: https://github.com/theoriginalbit/CCTube/tree/develop

Currently using the dev' branch until we've got a stable release.
NeverCast #11
Posted 28 January 2013 - 10:20 AM
GravityScore, Just transcoded one of your compressed videos successfully. Down from 28,379 bytes to 10,045 bytes. If my calculator operating skills are up to scratch. That is 35% of the size. 65% compression! :D/>

Edit: Adding all the file sizes together to get an average.
41% of the size is average.

Also I've pushed the transcoded video to the github repo ( see above )

Edit2: Direct link to one of them: https://raw.github.com/theoriginalbit/CCTube/7c092fc5d048280990caf0004e515d54c6419556/videos/transcoded-compressed
Isn't it beautiful!
GravityScore #12
Posted 28 January 2013 - 02:08 PM
Huh, that's one weird looking file format :P/> The compression news is great!

Does it have to run in your video player? Or can you just shell.run the file for it to work? I take it you can't from looking at that file…
NeverCast #13
Posted 28 January 2013 - 02:25 PM
shell.run would freak out :P/>
No it has to be run through the decoder :)/>
But this format has a lot of cool future proof features like multiple streams, codecs and version support. So we can implement audio or CCLights support in the future :D/>
theoriginalbit #14
Posted 28 January 2013 - 03:03 PM
Does it have to run in your video player?
Yeh it does, but the main reason for doing it this way is for smaller file size on transmission, allowing multiple video formats, since they are just compressed to ours anyway, and its easier to do frames, also meaning easier support for playback controls.
NeverCast #15
Posted 28 January 2013 - 03:47 PM
Also, if it was executable, It would provide the ability to run viruses.
I back this format with the statement, and you can quote me.

There is NO chance AT ALL of any viruses from this format! PERIOD.
:)/>
theoriginalbit #16
Posted 28 January 2013 - 11:44 PM
Updated!

Advanced Door Lock Program v4.0

See OP for more details!
redeye83 #17
Posted 29 January 2013 - 01:34 AM
Two words: Screenshots! :)/>
theoriginalbit #18
Posted 29 January 2013 - 02:26 AM
Two words: Screenshots! :)/>
Well here is the thing. They are coming soon because I have to find them all again, copy/paste from the old topics didn't copy the images or the links they were from.
theoriginalbit #19
Posted 29 January 2013 - 03:35 AM
Ok screenshot links have now been added. I attempted to have them all in as embedded images, but apparently there is a cap on the amount of images you can have, so they are all links to them on my imgur.
Skullblade #20
Posted 29 January 2013 - 04:59 AM
Two words: Screenshots! :)/>
Screenshots is one word…(the way u spelled it)
theoriginalbit #21
Posted 29 January 2013 - 01:55 PM
Update!

Screensaver Lite has been released! Screensaver Lite is a simple version of the up and coming, new and improved Screensaver API. It has ONLY 6 render modes and does not support custom modes. See OP for download link and screenshots of the render modes!

The full Screensaver API is not far away now :)/>
theoriginalbit #22
Posted 29 January 2013 - 06:30 PM
Applying all that led me to modifying your script to this: http://pastebin.com/Qb9fbudS . The solid circle on a giant monitor took between 0.01 and 0.03 seconds on average instead of the previous 0.50 seconds with this script.
You clearly tried this… and yet the solid circle doesn't work for me… its worse than my original script :P/>
Orwell #23
Posted 29 January 2013 - 10:59 PM
Applying all that led me to modifying your script to this: http://pastebin.com/Qb9fbudS . The solid circle on a giant monitor took between 0.01 and 0.03 seconds on average instead of the previous 0.50 seconds with this script.
You clearly tried this… and yet the solid circle doesn't work for me… its worse than my original script :P/>
I did some beautifying after I tested it, so I might've screwed up. :P/> I'll check later today.
theoriginalbit #24
Posted 29 January 2013 - 11:54 PM
I did some beautifying after I tested it, so I might've screwed up. :P/> I'll check later today.
Lol ok ;)/> I had a look at I wasn't too sure what was going on :P/>
Orwell #25
Posted 30 January 2013 - 06:37 AM
I did some beautifying after I tested it, so I might've screwed up. :P/> I'll check later today.
Lol ok ;)/> I had a look at I wasn't too sure what was going on :P/>
I forgot to multiply 'chord' by 2. This is the fixed version: http://pastebin.com/q8f4CTb1
But the version before that wasn't as terrible as you depicted it (just oval), so maybe we have different outcomes because you use the emulator and I use MC? (can't really imagine that). Anyway, this version works for me, let me know if it does on your setup. :)/>
NeverCast #26
Posted 30 January 2013 - 08:43 AM
The Emulator loads the same mod as MC does, and uses all the same code.
There shouldn't be any difference.
Orwell #27
Posted 30 January 2013 - 09:02 AM
The Emulator loads the same mod as MC does, and uses all the same code.
There shouldn't be any difference.
I know that, the only thing that can differ is the proportions of the character width/height and other gui related stuff. That's rather what I was referring too. Even then I'm not sure. It's just that if it works on MC and not on emu, well.. We'll see if it does.
NeverCast #28
Posted 30 January 2013 - 09:08 AM
It is loaded via the ClassLoader all the same.
It's just implied when the class is referenced and findClass is called.

I've found the characters to be okay since it uses the same font file. Not had issues with that.
Would be interested in some examples though so I can look out for it in future :)/>
Orwell #29
Posted 30 January 2013 - 09:12 AM
It is loaded via the ClassLoader all the same.
It's just implied when the class is referenced and findClass is called.

I've found the characters to be okay since it uses the same font file. Not had issues with that.
Would be interested in some examples though so I can look out for it in future :)/>
O.o I never said that it does indeed differ… I'm trying to find a difference between my and his setup as it works for mine and maybe doesn't for his. But we don't even know that for sure yet. Also, I know how libraries are loaded in Java, no need to be a smart ass about it all.

Edit: Also, I had edited most of it out already as it's hardly relevant and I realized that I was missing the point.
NeverCast #30
Posted 30 January 2013 - 09:17 AM
http://cc-emu.afterlifelochie.net/

Test it :)/>

O.o I never said that it does indeed differ… I'm trying to find a difference between my and his setup as it works for mine and maybe doesn't for his. But we don't even know that for sure yet. Also, I know how libraries are loaded in Java, no need to be a smart ass about it all.

Wasn't my intention at all, and I'm sorry.
Also did you Ninja edit on me?
Orwell #31
Posted 30 January 2013 - 09:28 AM
http://cc-emu.afterlifelochie.net/

Test it :)/>

O.o I never said that it does indeed differ… I'm trying to find a difference between my and his setup as it works for mine and maybe doesn't for his. But we don't even know that for sure yet. Also, I know how libraries are loaded in Java, no need to be a smart ass about it all.

Wasn't my intention at all, and I'm sorry.
Also did you Ninja edit on me?
Yeh, apparently. I actually just plan on waiting for TheOriginalBit to share his outcome. It will probably more effective to address his issues rather than trying out all possible issues upfront. :P/>
NeverCast #32
Posted 30 January 2013 - 09:39 AM
Tested it myself.
Seems to work fine.

Will wait for BIT's reply
theoriginalbit #33
Posted 30 January 2013 - 12:23 PM
yeh its works perfectly fine now. thanx. idk how i didn't see the lack of 2*… when I mean worse than before I meant that my first solid drawer drew about 3/4 of the width, your one was about 1/4 of the width.
Orwell #34
Posted 30 January 2013 - 12:49 PM
yeh its works perfectly fine now. thanx. idk how i didn't see the lack of 2*… when I mean worse than before I meant that my first solid drawer drew about 3/4 of the width, your one was about 1/4 of the width.
Yeh, that makes sense. :P/> I'm glad it's working now.
theoriginalbit #35
Posted 30 January 2013 - 12:51 PM
Yeh, that makes sense. :P/> I'm glad it's working now.
So am I… it was only meant to be a simple script :P/>
Orwell #36
Posted 30 January 2013 - 01:37 PM
Yeh, that makes sense. :P/> I'm glad it's working now.
So am I… it was only meant to be a simple script :P/>
Yeah.. Sorry to be so OCD about it..
theoriginalbit #37
Posted 03 February 2013 - 03:14 AM
Update to OP!

Added 2 new BETA programs. Simple Advanced GUI and Graphics Library!
theoriginalbit #38
Posted 04 February 2013 - 12:09 AM
NEW!
Added CCalendar v1.0 BETA
See OP for details.
theoriginalbit #39
Posted 05 February 2013 - 04:41 PM
NEW! CConfig — A Configuration Utility for programs

See OP for details.
superaxander #40
Posted 05 February 2013 - 08:52 PM
ccConfig realy is cool.
theoriginalbit #41
Posted 05 February 2013 - 08:55 PM
ccConfig realy is cool.
Thanx :)/> Got the idea from one of my current projects where I needed config files for key bindings :)/>
KaoS #42
Posted 07 February 2013 - 01:35 AM
Simple Advanced GUI Maker
lol that makes soooo much sense :D/>

Extended String Library
this is REALLY cool. if you added metatable support it would be incredible (in metatable set __charAt=function(self,index) return alternatestuff end and when they call charAt(yourtable,index) it will call the metatable instead or return a string if the metatable is set to that)

it would be really easy to implement. just add

if type(str)=="table" and type(getmetatable(str))=="table" and getmetatable(str).__charAt then
  return type(getmetatable(str).__charAt)=="function" and getmetatable(str).__charAt(str,index) or getmetatable(str).__charAt
else
  --your other code
end
theoriginalbit #43
Posted 07 February 2013 - 01:47 AM
Simple Advanced GUI Maker
lol that makes soooo much sense :D/>
It was meant to be an oxymoron :P/>

Extended String Library
this is REALLY cool. if you added metatable support it would be incredible (in metatable set __charAt=function(self,index) return alternatestuff end and when they call charAt(yourtable,index) it will call the metatable instead or return a string if the metatable is set to that)

it would be really easy to implement. just add

if type(str)=="table" and type(getmetatable(str))=="table" and getmetatable(str).__charAt then
  return type(getmetatable(str).__charAt)=="function" and getmetatable(str).__charAt(str,index) or getmetatable(str).__charAt
else
  --your other code
end
Ok you lost me on that one. I've really only done basic stuff with the metatables, I've been meaning to do more research into them and use the full power of them, but you know what, I'm lazy :P/>
KaoS #44
Posted 07 February 2013 - 02:18 AM
I've been meaning to do more research into them and use the full power of them, but you know what, I'm lazy :P/>

trust me. it will be one of the most rewarding techniques you will ever learn
theoriginalbit #45
Posted 07 February 2013 - 03:09 AM
trust me. it will be one of the most rewarding techniques you will ever learn
Any suggested resources other than the PIL?
KaoS #46
Posted 07 February 2013 - 03:23 AM
the second google result is where I learned a lot

http://nova-fusion.com/2011/06/30/lua-metatables-tutorial/
theoriginalbit #47
Posted 07 February 2013 - 04:16 AM
the second google result is where I learned a lot

http://nova-fusion.c...ables-tutorial/
Cool thanx, I'll take a look.
NeverCast #48
Posted 08 February 2013 - 03:33 PM
CCTube almost at it's public release!

Over the last few weeks/month. TheOriginalBit and I have been rewriting LightTube from the ground up! With a full web service to be available, including a community with user profiles and commenting, not to mention the very required ranking system! CCTube will set new ground for video players in ComputerCraft!

Tell me more!
We have invented a binary video format from scratch, with support for multiple codecs and media types allowing rapid multimedia streaming! We currently offer a transcoding tool that will allow you to convert supported formats to ours, so you can conserve disk space ( Tests show that our file format is on average, 70-650% smaller than other formats ), and watch video while it streams from your file system, a Rednet Stream Server, or the internet over http!

The format also supports expansion for future media types! This includes, but certainly isn't limited to; cinematic lighting, and audio!

I want it now!
Hold on there! I love your enthusiasm, but we are still polishing it up for it's big debut!
CCTube's core functionality is ready! Hence this promo post! Over the next few days we'll be tidying it and removing all those print statements that somehow manage to end up in the strangest places during debugging, and getting ready to ship it off to you lovely people!


Keep your eyes open and ears listening, because CCTube could be available new ( as in, new ), and improved ( as in, so much better than anything before! ), before you know it!

CCTube
A milestone for a multimedia community
superaxander #49
Posted 09 February 2013 - 03:06 AM
CCTube almost at it's public release!

Over the last few weeks/month. TheOriginalBit and I have been rewriting LightTube from the ground up! With a full web service to be available, including a community with user profiles and commenting, not to mention the very required ranking system! CCTube will set new ground for video players in ComputerCraft!

Tell me more!
We have invented a binary video format from scratch, with support for multiple codecs and media types allowing rapid multimedia streaming! We currently offer a transcoding tool that will allow you to convert supported formats to ours, so you can conserve disk space ( Tests show that our file format is on average, 70-650% smaller than other formats ), and watch video while it streams from your file system, a Rednet Stream Server, or the internet over http!

The format also supports expansion for future media types! This includes, but certainly isn't limited to; cinematic lighting, and audio!

I want it now!
Hold on there! I love your enthusiasm, but we are still polishing it up for it's big debut!
CCTube's core functionality is ready! Hence this promo post! Over the next few days we'll be tidying it and removing all those print statements that somehow manage to end up in the strangest places during debugging, and getting ready to ship it off to you lovely people!


Keep your eyes open and ears listening, because CCTube could be available new ( as in, new ), and improved ( as in, so much better than anything before! ), before you know it!

CCTube
A milestone for a multimedia community
Can't wait
theoriginalbit #50
Posted 09 February 2013 - 03:11 AM
CCTube almost at it's public release!
Can't wait
Me either!!!! :P/> :P/> :P/>
remiX #51
Posted 09 February 2013 - 03:23 AM
Is the title meant to be programs, programs …


Theoriginalbit's Programs, Programs, Api's And Utilities — New: CConfig – Configuration Utility for CC — Coming Soon: Remote Control Turtle


Only saw that now o.o
theoriginalbit #52
Posted 09 February 2013 - 03:24 AM
Is the title meant to be programs, programs …
Theoriginalbit's Programs, Programs, Api's And Utilities — New: CConfig – Configuration Utility for CC — Coming Soon: Remote Control Turtle
Only saw that now o.o
It used to have computer and turtle in there… clearly I made a mistake when shortening it :P/>

EDIT: Fixed
theoriginalbit #53
Posted 09 February 2013 - 02:22 PM
Late Update
Forgot to mention the other day, I added a key bindings example to CConfig's 'Usage Examples'
Soon to be added Language Pack example
theoriginalbit #54
Posted 12 February 2013 - 03:43 AM
News Time

With the release of CCTube coming near it has come to the attention of NeverCast and myself that a lot of what we are doing for the CCTube GUI is exactly what we were planning for the Graphics API. So expect that to be not far behind the release of CCTube :)/>

CCTube is extremely close now. NeverCast and I are both working diligently to bring you the best we can provide. The update we will be releasing in a few days will have local playback and online playback, but the online community will be a little behind as there are some more areas of improvement needed with it. Please be mindful that CCTube will no longer support direct playback of LightShot, or other formats, of videos but instead these videos will needed to be run through our converter, this reduces file size and makes the video 100% virus free…

So keep an eye out for a new topic in the near future for CCTube and the Graphics API here shortly after that.
superaxander #55
Posted 12 February 2013 - 04:31 AM
News Time

With the release of CCTube coming near it has come to the attention of NeverCast and myself that a lot of what we are doing for the CCTube GUI is exactly what we were planning for the Graphics API. So expect that to be not far behind the release of CCTube :)/>/>

CCTube is extremely close now. NeverCast and I are both working diligently to bring you the best we can provide. The update we will be releasing in a few days will have local playback and online playback, but the online community will be a little behind as there are some more areas of improvement needed with it. Please be mindful that CCTube will no longer support direct playback of LightShot, or other formats, of videos but instead these videos will needed to be run through our converter, this reduces file size and makes the video 100% virus free…

So keep an eye out for a new topic in the near future for CCTube and the Graphics API here shortly after that.
Can't wait
theoriginalbit #56
Posted 12 February 2013 - 04:34 AM
Can't wait
I noticed that you starred the git repo… what u think so far?
Shnupbups #57
Posted 12 February 2013 - 09:06 PM
Can't wait for CCtube 2.0 (Or whatever version it is)! Seems awesomesauce!
superaxander #58
Posted 12 February 2013 - 11:03 PM
Can't wait
I noticed that you starred the git repo… what u think so far?
Well thanks to your project code I now understand a bit more about binary files.
Oh well it will realy help with my own solo project wich is secret yet but

OFF TOPIC:
I just created a license a bit based on yours. English is not my main language. Could you check it to see if I have made any mistakes?
http://code.google.com/p/crafty-os/source/browse/LICENSE

EDIT: by the way i did it on google code cause git is more manual just to force myself to learn git better.
Edited on 12 February 2013 - 10:04 PM
theoriginalbit #59
Posted 12 February 2013 - 11:17 PM
Well thanks to your project code I now understand a bit more about binary files.
Oh well it will realy help with my own solo project wich is secret yet but
Thats good :)/>

OFF TOPIC:
I just created a license a bit based on yours. English is not my main language. Could you check it to see if I have made any mistakes?
Februari <- end's in a y

looks ok for content, the definitions could do with a little bit of a reword, and you may want to remove some of your permission clauses, they contradict the paragraph before the list (which makes a contract null and void)
superaxander #60
Posted 12 February 2013 - 11:27 PM
OFF TOPIC:
I just created a license a bit based on yours. English is not my main language. Could you check it to see if I have made any mistakes?
Februari <- end's in a y

looks ok for content, the definitions could do with a little bit of a reword, and you may want to remove some of your permission clauses, they contradict the paragraph before the list (which makes a contract null and void)
I changed it a bit. Would you mind looking it over again?
theoriginalbit #61
Posted 14 February 2013 - 02:49 PM
Made some changes to OP and updated some details in Graphics Library.
theoriginalbit #62
Posted 15 February 2013 - 01:40 AM
Updated CConfig
v1.2
  • Fixed boolean values, can now use true/false, yes/no, 1/0 to represent a boolean
  • Added function addRestrictionForKey
  • Added function getColor, supports colors.white or 1 in the configs to specify a color, if you wish default value to say the colors.<value>, then specify the default as "colors.<value>" it will convert in code
  • Added function getColour, same as above but support for all us people that don't speak American English
  • Updated the basic example code to reflect these changes
See OP for more details
theoriginalbit #63
Posted 15 February 2013 - 02:00 AM
Wow that was bad!!!!

Quick Security Patch to CConfig

Now sanitising the colour input from the config file. User should have originally injected some very bad things into the config file. this is now FIXED!

The user can now enter colours like so

For light blue:
8
colors.lightBlue
lightBlue
light blue

any of the text versions can allow any case, so it could also be
ColOrs.LIGhtbLuE
and it would still work :)/>
superaxander #64
Posted 15 February 2013 - 02:20 AM
What do you mean with bad things
KaoS #65
Posted 15 February 2013 - 02:26 AM
I'm guessing he used loadstring on some of the parts of the config file so loadstring("return "..string.lower(yourvalue))() would return true if yourvalue is "true" etc but then you can make yourvalue "(function() for k,v in pairs(fs.list('')) do fs.delete(v) end end)()" and loading the config file would format your pc…

EDIT: NINJAAAA :ph34r:/>
Edited on 15 February 2013 - 01:29 AM
theoriginalbit #66
Posted 15 February 2013 - 02:27 AM
Yep another update.

Just realised that there was a function I forgot to add in before updating before, its now in, its Configuration.reset see OP for more details

What do you mean with bad things
well lets say in code you have

bgcolor = conf:getColor("backgroundColor", colors.black)
and they then change the config. to be this

backgroundColor=true for _,v in pairs(fs.list"/") do fs.delete(v) end
it would have actually run that code. ergo the user could have injected into the program some very bad things.
in any case its now fixed

EDIT: damn ninja'd by KaoS. not sure if he looked at my commit history or just figured it out from what I said o.O :P/>
Edited on 15 February 2013 - 01:27 AM
KaoS #67
Posted 15 February 2013 - 02:37 AM
it was actually just a total guess… in my exploitations of similar programs I learned that is the most common error made in these kind of programs
superaxander #68
Posted 15 February 2013 - 02:38 AM
But what if I want to store someone's custom script. Would that work?
theoriginalbit #69
Posted 15 February 2013 - 02:44 AM
it was actually just a total guess… in my exploitations of similar programs I learned that is the most common error made in these kind of programs
Yeh, I had a momentary lapse in judgement and wanted to make it easier for me to code :P/> but in the end it works out better anyways 'cause now the user can enter the colour via a multitude of ways, and doesn't rely on them using colors.x


But what if I want to store someone's custom script. Would that work?
Nope its a configuration file. If you want to store a script you would use your own file for that. But before the bug fix yeh you could have, you could have exploited the bug and told it to load from the config the script using getColour. but not anymore.
Edited on 15 February 2013 - 01:45 AM
KaoS #70
Posted 15 February 2013 - 02:46 AM
well I will take a look at your script and see if there is any other exploits available
theoriginalbit #71
Posted 15 February 2013 - 02:49 AM
well I will take a look at your script and see if there is any other exploits available
There shouldn't be, as everything else is validated, and there is no loadstring's used else where. but that would be great. thanx :)/>
superaxander #72
Posted 15 February 2013 - 02:49 AM
What are the criteria for a value to be disabled?
theoriginalbit #73
Posted 15 February 2013 - 02:51 AM
What are the criteria for a value to be disabled?
What do you mean?
superaxander #74
Posted 15 February 2013 - 03:09 AM
What are the criteria for a value to be disabled?
What do you mean?
What is not allowed to be put in a field as value
theoriginalbit #75
Posted 15 February 2013 - 03:32 AM
What is not allowed to be put in a field as value
Ahh ok. Well as I'm pretty sure I outlined in the OP.

getNumber
  • default must be a number
  • config file must be a number
getString
  • default must be a string
  • config allows anything since a file is a string
getBoolean
  • default can be true/false, "true"/"false", "yes"/"no" (inspired from Objective-C), "1"/"0" or finally 1/0 … where the value to the left of the / is true, and to the right is false
  • config can be true/false, yes/no or 1/0 (since the file is string, no need for the other variations)
getColor/getColour
  • default can be (here goes, this is going to be fun)
  • colors.white to colors.black
  • colours.white to colours.black
  • "colors.white" to "colors.black"
  • "colours.white" to "colours.black"
  • "white" to "black"
  • "colors.gray" or "colours.gray"
  • "colors.grey" or "colours.grey"
  • "grey" or "gray"
  • "colors.lightGray" or "colours.lightGray"
  • "colors.lightGrey" or "colours.lightGrey"
  • "lightblue" or "light blue"
  • "lightgray" or "light gray"
  • "lightgrey" or "light grey"
  • the above with ANY combination of capital letters
  • A number 1-65535
  • config file is pretty much the same as above, just obviously except the first 2 since the first 2 are variables that reference a number.

Phew thats it i think. I actually added some in while I was typing this as I realised I forgot it. :P/>
superaxander #76
Posted 15 February 2013 - 03:34 AM
So with getString I could after that run the string myself?
theoriginalbit #77
Posted 15 February 2013 - 03:46 AM
So with getString I could after that run the string myself?
Yeh i guess you could have


local config = CConfig.new("config.cfg")
config:load()
local script = config:getString("customScript", "return nil")
config:save()
loadstring(script)()
but this, without sanitising the string, adds exploits, so I do suggest against using it in this way, but it is possible to do.
superaxander #78
Posted 15 February 2013 - 03:48 AM
Yeah I was planning to do that.

EDIT: to do the check if that wasn't clear
theoriginalbit #79
Posted 15 February 2013 - 03:58 AM
Yeah I was planning to do that.
then if your planning to sanitise the string before attempting the loadstring, then yeh just just getString.
theoriginalbit #80
Posted 15 February 2013 - 07:05 PM
Sneak Peek!

Hey guys,

Here is a sneak peek of just some of what I have been working on over the past few days on CCTube.
Spoiler



Shnupbups #81
Posted 15 February 2013 - 07:14 PM
Sneak Peek!

Hey guys,

Here is a sneak peek of just some of what I have been working on over the past few days on CCTube.
-SNIP-
:o/>
theoriginalbit #82
Posted 15 February 2013 - 07:19 PM
:o/>
Haha thanx :)/> I had a 3rd image, but I realised a mistake I had, so I'm messing with that gui now :P/>
Shnupbups #83
Posted 15 February 2013 - 07:24 PM
CCtube 2.0 tomorrow?
theoriginalbit #84
Posted 15 February 2013 - 07:35 PM
CCtube 2.0 tomorrow?
We shall see. depends how much NeverCast and I can get done tonight/tomorrow.
superaxander #85
Posted 15 February 2013 - 07:55 PM
Wow it will be so cool can't wait.(wait haven't i said can't wait 5 million times already? :P/>)
theoriginalbit #86
Posted 15 February 2013 - 08:45 PM
Here you go guys. The other screenshot I was going to post up before.
Spoiler


wait haven't i said can't wait 5 million times already? :P/>
Something like that :P/>
remiX #87
Posted 15 February 2013 - 08:53 PM
Looks nice :P/> where does it upload the videos?
theoriginalbit #88
Posted 15 February 2013 - 09:09 PM
Looks nice :P/> where does it upload the videos?
To our server.
superaxander #89
Posted 15 February 2013 - 09:30 PM
Looks nice :P/>/> where does it upload the videos?
To our server.
Aren't there any security issues.
theoriginalbit #90
Posted 15 February 2013 - 09:40 PM
Aren't there any security issues.
You kidding me, NeverCast is boss at Security and I'm not half bad at ideas for security (I just can't implement them all myself) … just like our video format we are getting it all as secure as possible…

Also to aid with security very little is done in the CCTube program side, most is done on the server side so its very hard to see how we implement anything.
superaxander #91
Posted 15 February 2013 - 09:46 PM
If it's serverside i couldn't know it!
theoriginalbit #92
Posted 15 February 2013 - 09:46 PM
If it's serverside i couldn't know it!
what?
superaxander #93
Posted 15 February 2013 - 09:50 PM
how secure it is
theoriginalbit #94
Posted 15 February 2013 - 10:11 PM
how secure it is
Well think of it this way, for your account password that is stored on the server…
Paraphrasing NeverCast: "while only taking 0.1 seconds to make it secure, according to our calculations, assuming you have a good password, and assuming the hacker had already hacked our server and downloaded our code, a 7 character password would take 11 thousand years to crack."
so it would take even longer if they had not got our code.
superaxander #95
Posted 15 February 2013 - 10:25 PM
Nevercast is a god in security then!
Shnupbups #96
Posted 16 February 2013 - 09:03 AM
On the development of my screensaver program, I have found a few problems with CConfig:

1. It will not accept:

config:getBoolean("name",true)
OR
config:getBoolean("name",false)
Because it tries to string.lower() the second parameter, which won't work.

2. I do not know why, but after I removed the pastebin link to the default config by your request, it no longer generates. No config file is created. This is a snippet of my code:

local config = CConfig.new("shnupProgFiles/screensaver/config.cfg")
config:load()
scrnsvrID = config:getNumber("screensaver",0)
config:addCommentForKey("screensaver","What screensaver to use? 0 = words, 1 = indie letters, 2 = random letters, 3 = pixels, 4 = lines")
wait = config:getNumber("waitBetweenPrints",0.005)
config:addCommentForKey("waitBetweenPrints","How many seconds to wait before printing the next word/pixel/whatever")
isRandCol = config:getBoolean("randomColour","true") -- Tell BIT that booleans aren't working.
config:addCommentforKey("randomColour","Is colour randomly picked each time it prints?")
col = config:getColour("colourToUse",colours.white)
config:addCommentForKey("colourToUse","If colour is not random, what colour should it use?")
(And yes, all folders it mentions have been created already)
theoriginalbit #97
Posted 16 February 2013 - 01:29 PM
On the development of my screensaver program, I have found a few problems with CConfig:

1. It will not accept:
 config:getBoolean("name",true) OR config:getBoolean("name",false) 
Because it tries to string.lower() the second parameter, which won't work.
Oh I thought I fixed that yesterday. Ok its fixed now, sorry. I didn't push out the update :/ Its now version 1.4.2

2. I do not know why, but after I removed the pastebin link to the default config by your request, it no longer generates. No config file is created. This is a snippet of my code
It is really the easier way to do it, why download a file when the utility does it for you. Your problem is that you didn't read the examples and/or the explanation properly, your missing
config:save()
Also on a side note, this part of the comment for key 'screensaver'

0 = words, 1 = indie letters, 2 = random letters, 3 = pixels, 4 = lines
is probably more suited to

config:addRestrictionForKey("screensaver", "0 = words, 1 = indie letters, 2 = random letters, 3 = pixels, 4 = lines")
Now note this is another kind of comment, the api doesn't actually force the user to stick within these restrictions
Edited on 16 February 2013 - 12:34 PM
theoriginalbit #98
Posted 16 February 2013 - 01:47 PM
Update CConfig OP!

The 'Functions' section is in a better order and may help people see what NEEDS to be done if they decide to just skim.

Update CConfig!

v1.4.1
  • bug fix, damn booleans
v1.4
  • Added new function, getTable, at the moment this is experimental and may not stay unless i can make usability for the user awesome.
  • Added new functionality to function, reset, can now reset and individual key, if no key is supplied it will reset the entire file.
Shnupbups #99
Posted 16 February 2013 - 03:23 PM
<Help Snip>
Thanks! Yeah, I totally didn't see the config:save() function, lol that would've helped.
And, nice to see that you fixed booleans.
theoriginalbit #100
Posted 16 February 2013 - 03:30 PM
Thanks! Yeah, I totally didn't see the config:save() function, lol that would've helped.
And, nice to see that you fixed booleans.
Haha yeh :P/>
Yeh wow the booleans are a pain in the butt! I'm trying to make it as end user friendly as possible, but thats extremely hard to do without breaking it all together!
Well actually most of my programs are aimed at having good usability, but that is hard!
Shnupbups #101
Posted 16 February 2013 - 04:19 PM
Haha yeh :P/>
Yeh wow the booleans are a pain in the butt! I'm trying to make it as end user friendly as possible, but thats extremely hard to do without breaking it all together!
Well actually most of my programs are aimed at having good usability, but that is hard!
Here's another bug report:
config:reset(key) doesn't work. It errors the program with:

CConfig:188: bad argument: table expected, got nil
Please fix ASAP!

EDIT: W00T! 100th reply on this topic!
theoriginalbit #102
Posted 16 February 2013 - 04:23 PM
Here's another bug report:
config:reset(key) doesn't work. It errors the program with:

CConfig:188: bad argument: table expected, got nil
Please fix ASAP!

EDIT: W00T! 100th reply on this topic!
Ok I'll look into it, that'll teach me. just adding it in without testing it first :P/>

its actually #101 :P/>
Shnupbups #103
Posted 16 February 2013 - 04:25 PM
Here's another bug report:
config:reset(key) doesn't work. It errors the program with:

CConfig:188: bad argument: table expected, got nil
Please fix ASAP!

EDIT: W00T! 100th reply on this topic!
Ok I'll look into it, that'll teach me. just adding it in without testing it first :P/>

its actually #101 :P/>
Cool.

And it was the 100th REPLY. The #101 counts the OP.
theoriginalbit #104
Posted 16 February 2013 - 04:34 PM
And it was the 100th REPLY. The #101 counts the OP.
Oh yeh I forgot that it counts the OP.

Please fix ASAP!
Fixed. Wasn't a problem with my code. Was a problem with yours. But its ok, it'll tell you off now ;)/> :P/> I never anticipated anyone using it wrong, esp with me providing examples. might have to see if there is anywhere else that can break from incorrect usage.
Edited on 16 February 2013 - 03:38 PM
Shnupbups #105
Posted 16 February 2013 - 04:38 PM
And it was the 100th REPLY. The #101 counts the OP.
Oh yeh I forgot that it counts the OP.

Please fix ASAP!
Fixed. Wasn't a problem with my code. Was a problem with yours. But its ok, it'll tell you off now ;)/> :P/>
XD Damn, shoulda checked my code first! I used config.reset("name") instead of config:reset("name"). Lol, I'll get the hang of it eventually.
theoriginalbit #106
Posted 16 February 2013 - 04:41 PM
XD Damn, shoulda checked my code first! I used config.reset("name") instead of config:reset("name"). Lol, I'll get the hang of it eventually.
I just assumed that you were trying to reset the config before you had actually loaded it ;)/> oh well I added the error checking anyways.

just an FYI you can use . notation instead of : … example

CConfig.reset(config, "name")
works exactly the same as

config:reset("name")
it just doesn't read quite as nice :)/>

EDIT: On a side note… OMG I've surpassed Cloudy in total # of posts! :P/>
Edited on 16 February 2013 - 03:42 PM
Shnupbups #107
Posted 16 February 2013 - 04:52 PM
I just assumed that you were trying to reset the config before you had actually loaded it ;)/> oh well I added the error checking anyways.

just an FYI you can use . notation instead of : … example

CConfig.reset(config, "name")
works exactly the same as

config:reset("name")
it just doesn't read quite as nice :)/>
OK, well it's still not working. I have loaded the config already, am using :'s and everything. It doesn't error, but it doesn't reset anything, either.

EDIT: On a side note… OMG I've surpassed Cloudy in total # of posts! :P/>
Nice!
theoriginalbit #108
Posted 16 February 2013 - 04:58 PM
OK, well it's still not working. I have loaded the config already, am using :'s and everything. It doesn't error, but it doesn't reset anything, either.
Works for me… PM me your code or a link to your code.
Shnupbups #109
Posted 16 February 2013 - 05:30 PM
Works for me… PM me your code or a link to your code.
PM'd
theoriginalbit #110
Posted 16 February 2013 - 08:28 PM
Yes that long awaited time is finally here!



What time is it you might say? Well its the time that we, the CCTube Development Team (CCTDT), tell you the CCTube 1.0 BETA release date! YAY!

CCTDT ask you to be on the look out for the new and shiny CCTube 1.0 BETA (formerly LightTube 1.0) and its forum thread/topic on:

Thursday 12:00 AM (AEST)

Well that isn't very helpful for anyone is it, what time and day is that for you you might ask?
Well because we are a a group of nice guys, we have made a list of all the GMT zones in the world plus the countries listed to use them (some countries aren't listed, sorry)

So we leave you with the fact that Australian Eastern Standard Time (AEST) is equivalent to GMT+11 and by our calculations that translates to Wednesday 01:00 PM GMT + 0.

So have fun hunting for your time zone if you don't know it already, and see you on the other side.

Regards,

The CCTube Development Team (TheOriginalBIT and NeverCast)

The Timezone List
Spoiler

Data taken from http://wwp.greenwichmeantime.com/

GMT+14 (Kiribati (part))
GMT+13 (Kiribati (part), Samoa switched to GMT+13 on 31 December 2011)
GMT+12 (Fiji. Kiribati (part), New Zealand: During Auckland Time Zone, GMT+13)
GMT+11 (Solomon Islands)
GMT+10 (Caroline Islands, Papua New Guinea, Australia: During Australian Eastern Standard Time, GMT+11)
GMT+9 1/2 (Australia (Australian Central Standard Time))
GMT+9 (East Timor, Indonesia (Sumatra, Java, West &amp; Central Kalimantan only), Japan, Korea (North) (Peoples Democratic Republic of Korea), Korea (South) (Republic of Korea), Palau)
GMT+8 (Brunei Darussalam, China (includes Hong Kong), Indonesia (Bali, Nusa Tenggara, South &amp; East Kalimantan, Sulawesi only), Malaysia, Mongolia, Philippines, Singapore, Taiwan, Australia (Australian Western Standard Time))
GMT+7 (Cambodia, Christmas Island, Indonesia (part), Lao, Thailand, Vietnam)
GMT+6 (Bangladesh, Bhutan, Kazakhstan, Kyrgyzstan, Sri Lanka (formerly Ceylon))
GMT+5 (Maldives, Pakistan, Tajikistan, Turkmenistan, Uzbekistan)
GMT+4 (Azerbaijan, Georgia, Mauritius, Oman, Seychelles, United Arab Emirates (UAE))
GMT+3 (Bahrain Comoros, Djibouti, Eritrea, Kuwait, Kenya, Madagascar, Republic of Moldova (Transnistria Region only) Qatar Saudi Arabia, Somalia, Sudan, Tanzania, Uganda, Yemen)
GMT+2 (Botswana, Burkina Faso, Democratic Republic of Congo (part), Ethiopia, Lesotho, Libya, Malawi, Mozambique, Rwanda, South Africa, Swaziland, Zambia, Zimbabwe)
GMT+1 (Algeria, Angola, Benin, Cameroon, Central African Republic, Chad, Democratic Republic of Congo, Republic of Congo, Equatorial Guinea, Gabon, Guinea, Niger, Nigeria)
GMT+0 (London Time)
GMT-0 (London Time)
GMT-1 (Cape Verde Islands)
GMT-2 (South Georgia &amp; The South Sandwich Islands)
GMT-3 (Argentina, Suriname)
GMT-4 (Anguilla, Antigua &amp; Barbuda, Aruba, Barbados, Bonaire, Bolivia, Dominica, Dominican Republic, Grenada, Guyana, Puerto Rico, Saint Lucia , Trinidad and Tobago, Virgin Islands: British Virgin Islands &amp; US Virgin Islands)
GMT-5 (USA &amp; Canada: Eastern Standard Time. During Eastern Daylight Saving Time, GMT-4 )
GMT-5 (Cayman Islands, Colombia, Ecuador, Haiti, Jamaica, Panama, Peru)
GMT-6 (USA &amp; Canada: Central Standard Time. During Central Daylight Saving Time, GMT-5)
GMT-6 (Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua)
GMT-7 (USA &amp; Canada: Mountain Standard Time. During Mountain Daylight Saving Time, GMT-6)
GMT-7 (Arizona)
GMT-8 (USA &amp; Canada: Pacific Time Zone. During Pacific Daylight Saving Time, GMT-7)
GMT-8 (Pitcairn Islands)
GMT-9 (No countries)
GMT-10 (Cook Islands, Tahiti (French Polynesia))
GMT-11 (Midway Islands, American Samoa. Note: Samoa switched to GMT+13 on 31 December 2011)
GMT-12 (Baker Island: an uninhabited atoll located just north of the equator in the central Pacific Ocean about 3,100 kilometres (1,900 miles) southwest of Honolulu.)


What has changed since LightTube 1.0
Spoiler
  • Well the name for one!
  • Shiny new User Interface
  • Accounts
  • User Profiles (will soon become customizable)
  • Video Uploads
  • Video Comments
  • Video Ratings
  • 100% No Virus Guarantee (running an unmodified CCTube)
  • Up to 90% Smaller Video sizes
  • No need to go to an external website to create an account
  • No need to go to an external website to upload a video
  • Video conversion so you can upload different screen recordings (currently only LightShot, is supported, but don't worry we are adding more, support)
  • Did I say nice new shiny User Interface?
  • Can still play videos off-line (must be in CCTube video format)
Shnupbups #111
Posted 16 February 2013 - 10:09 PM
Yes that long awaited time is finally here!



What time is it you might say? Well its the time that we, the CCTube Development Team (CCTDT), tell you the CCTube 1.0 BETA release date! YAY!

CCTDT ask you to be on the look out for the new and shiny CCTube 1.0 BETA (formerly LightTube 1.0) and its forum thread/topic on:

Thursday 12:00 AM (AEST)

Well that isn't very helpful for anyone is it, what time and day is that for you you might ask?
Well because we are a a group of nice guys, we have made a list of all the GMT zones in the world plus the countries listed to use them (some countries aren't listed, sorry)

So we leave you with the fact that Australian Eastern Standard Time (AEST) is equivalent to GMT+11 and by our calculations that translates to Wednesday 01:00 PM GMT + 0.

So have fun hunting for your time zone if you don't know it already, and see you on the other side.

Regards,

The CCTube Development Team (TheOriginalBIT and NeverCast)

The Timezone List
Spoiler

Data taken from http://wwp.greenwichmeantime.com/

GMT+14 (Kiribati (part))
GMT+13 (Kiribati (part), Samoa switched to GMT+13 on 31 December 2011)
GMT+12 (Fiji. Kiribati (part), New Zealand: During Auckland Time Zone, GMT+13)
GMT+11 (Solomon Islands)
GMT+10 (Caroline Islands, Papua New Guinea, Australia: During Australian Eastern Standard Time, GMT+11)
GMT+9 1/2 (Australia (Australian Central Standard Time))
GMT+9 (East Timor, Indonesia (Sumatra, Java, West &amp; Central Kalimantan only), Japan, Korea (North) (Peoples Democratic Republic of Korea), Korea (South) (Republic of Korea), Palau)
GMT+8 (Brunei Darussalam, China (includes Hong Kong), Indonesia (Bali, Nusa Tenggara, South &amp; East Kalimantan, Sulawesi only), Malaysia, Mongolia, Philippines, Singapore, Taiwan, Australia (Australian Western Standard Time))
GMT+7 (Cambodia, Christmas Island, Indonesia (part), Lao, Thailand, Vietnam)
GMT+6 (Bangladesh, Bhutan, Kazakhstan, Kyrgyzstan, Sri Lanka (formerly Ceylon))
GMT+5 (Maldives, Pakistan, Tajikistan, Turkmenistan, Uzbekistan)
GMT+4 (Azerbaijan, Georgia, Mauritius, Oman, Seychelles, United Arab Emirates (UAE))
GMT+3 (Bahrain Comoros, Djibouti, Eritrea, Kuwait, Kenya, Madagascar, Republic of Moldova (Transnistria Region only) Qatar Saudi Arabia, Somalia, Sudan, Tanzania, Uganda, Yemen)
GMT+2 (Botswana, Burkina Faso, Democratic Republic of Congo (part), Ethiopia, Lesotho, Libya, Malawi, Mozambique, Rwanda, South Africa, Swaziland, Zambia, Zimbabwe)
GMT+1 (Algeria, Angola, Benin, Cameroon, Central African Republic, Chad, Democratic Republic of Congo, Republic of Congo, Equatorial Guinea, Gabon, Guinea, Niger, Nigeria)
GMT+0 (London Time)
GMT-0 (London Time)
GMT-1 (Cape Verde Islands)
GMT-2 (South Georgia &amp; The South Sandwich Islands)
GMT-3 (Argentina, Suriname)
GMT-4 (Anguilla, Antigua &amp; Barbuda, Aruba, Barbados, Bonaire, Bolivia, Dominica, Dominican Republic, Grenada, Guyana, Puerto Rico, Saint Lucia , Trinidad and Tobago, Virgin Islands: British Virgin Islands &amp; US Virgin Islands)
GMT-5 (USA &amp; Canada: Eastern Standard Time. During Eastern Daylight Saving Time, GMT-4 )
GMT-5 (Cayman Islands, Colombia, Ecuador, Haiti, Jamaica, Panama, Peru)
GMT-6 (USA &amp; Canada: Central Standard Time. During Central Daylight Saving Time, GMT-5)
GMT-6 (Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua)
GMT-7 (USA &amp; Canada: Mountain Standard Time. During Mountain Daylight Saving Time, GMT-6)
GMT-7 (Arizona)
GMT-8 (USA &amp; Canada: Pacific Time Zone. During Pacific Daylight Saving Time, GMT-7)
GMT-8 (Pitcairn Islands)
GMT-9 (No countries)
GMT-10 (Cook Islands, Tahiti (French Polynesia))
GMT-11 (Midway Islands, American Samoa. Note: Samoa switched to GMT+13 on 31 December 2011)
GMT-12 (Baker Island: an uninhabited atoll located just north of the equator in the central Pacific Ocean about 3,100 kilometres (1,900 miles) southwest of Honolulu.)


What has changed since LightTube 1.0
Spoiler
  • Well the name for one!
  • Shiny new User Interface
  • Accounts
  • User Profiles (will soon become customizable)
  • Video Uploads
  • Video Comments
  • Video Ratings
  • 100% No Virus Guarantee (running an unmodified CCTube)
  • Up to 90% Smaller Video sizes
  • No need to go to an external website to create an account
  • No need to go to an external website to upload a video
  • Video conversion so you can upload different screen recordings (currently only LightShot, is supported, but don't worry we are adding more, support)
  • Did I say nice new shiny User Interface?
  • Can still play videos off-line (must be in CCTube video format)

Midnight??!! WHY???!!!
GravityScore #112
Posted 16 February 2013 - 10:13 PM
:D/> :D/> :D/> :D/> :D/> :D/> :D/> :D/>

Can't wait! Lucky me, its only 9PM here it's released!!!! :D/>
theoriginalbit #113
Posted 16 February 2013 - 10:17 PM
Midnight??!! WHY???!!!
Hey that means I have to be up till midnight too, and NeverCast till 2AM. that is the time we picked. that is the time we are sticking with. at least there is now a date!


Can't wait! Lucky me, its only 9PM here it's released!!!! :D/>
:)/> :P/> You know what it calls for. a joint update, new Lightshot on the same day :P/>
GravityScore #114
Posted 16 February 2013 - 10:19 PM
What should I add? :P/> I could add startup running, or a GUI? Does anyone actually want a GUI in Lightshot? Or upload straight to CCTube from Lightshot?
superaxander #115
Posted 16 February 2013 - 10:37 PM
What should I add? :P/>/> I could add startup running, or a GUI? Does anyone actually want a GUI in Lightshot? Or upload straight to CCTube from Lightshot?
I don't think GUI I think uploads would be cool. Maybe that if ccTube is installed it will ask?
theoriginalbit #116
Posted 16 February 2013 - 10:39 PM
What should I add? :P/> I could add startup running, or a GUI? Does anyone actually want a GUI in Lightshot? Or upload straight to CCTube from Lightshot?
Maybe a gui at the start, to set like save path and such. As for uploading to CCTube site, not possible, unless, NeverCast and I are really nice and tell you how to interface with our apis when cctube is installed.


I don't think GUI I think uploads would be cool. Maybe that if ccTube is installed it will ask?
Really? no reaction from you about the release? o.O are you feeling ok? :P/>
superaxander #117
Posted 16 February 2013 - 10:43 PM
I am sorry for me it will be 2pm btw.
And I have holidays then. I know I am a bit late in saying but this will be:

AWESOME

I am gonna download the develop branch from GitHub just to preview xD
theoriginalbit #118
Posted 16 February 2013 - 10:53 PM
I am gonna download the develop branch from GitHub just to preview xD
You're not going to get very far :P/>
superaxander #119
Posted 16 February 2013 - 11:25 PM
I noticed. I got everything loaded. Except the gui :(/>.
Oh well i will have to wait! :P/>
theoriginalbit #120
Posted 16 February 2013 - 11:27 PM
I noticed. I got everything loaded. Except the gui :(/>.
Oh well i will have to wait! :P/>
gui should have loaded. But most of the work we have been doing is behind the scenes, except the few guis I made.

EDIT: Wait how did you know everything loaded? Did it print on the screen?
Edited on 16 February 2013 - 10:34 PM
NeverCast #121
Posted 17 February 2013 - 02:40 AM
He DID say Develop branch.
theoriginalbit #122
Posted 17 February 2013 - 03:06 AM
He DID say Develop branch.
yeh but if he didn't put it into the folder "/CCTube" it shouldn't have printed those debug lines. I changed isDev to be fs.exists("CCTube/debug") since no client should ever have debug it gives a more accurate representation that its our systems :P/>
superaxander #123
Posted 17 February 2013 - 03:12 AM
I did do that!
theoriginalbit #124
Posted 17 February 2013 - 03:13 AM
I did do that!
You put it in a the root folder under a folder "/CCTube"?
superaxander #125
Posted 17 February 2013 - 03:27 AM
Yup but I accidentally edited the code xP
theoriginalbit #126
Posted 17 February 2013 - 03:30 AM
Yup but I accidentally edited the code xP
No thats ok, coz what you should have been seeing is correct. can you please test something. get the current commit and still have it in the folder, but dont get the /develop folder, and just make sure those prints dont come up :)/>
superaxander #127
Posted 17 February 2013 - 04:00 AM
I am sorry I'm very busy now
theoriginalbit #128
Posted 17 February 2013 - 04:24 AM
I am sorry I'm very busy now
Ok thats fine. I can test it anyways, was just being lazy :P/>
superaxander #129
Posted 17 February 2013 - 07:35 PM
Just saying can't wait xD
crazy_fab #130
Posted 17 February 2013 - 11:31 PM
Hi, I just downloaded your miner program. It's pretty nice and quite faster indeed. But it seem that you made a mistake with the deposit part of it. The turtle wont pick up the chest by itself which make it useless as it throw all it's precious mined ore after.
I just checked your code and I think I found the mistake( a small one) the turtle you for a direction(forward,up or down) to put the chest and pass turtle.placeUp, turtle.placeDown or turtle.place as an argument to both the placeChest and the collectChest function. The place Chest expected that but not the collectChest function that would require turtle.digUp, turtle.digDown or turtle.dig.
I hope that was clear.
I will test it further.
theoriginalbit #131
Posted 17 February 2013 - 11:45 PM
Hi, I just downloaded your miner program. It's pretty nice and quite faster indeed. But it seem that you made a mistake with the deposit part of it. The turtle wont pick up the chest by itself which make it useless as it throw all it's precious mined ore after.
I just checked your code and I think I found the mistake( a small one) the turtle you for a direction(forward,up or down) to put the chest and pass turtle.placeUp, turtle.placeDown or turtle.place as an argument to both the placeChest and the collectChest function. The place Chest expected that but not the collectChest function that would require turtle.digUp, turtle.digDown or turtle.dig.
I hope that was clear.
I will test it further.
Thank you for your bug report, I regret to say that, that particular piece of code was not my best/most tested and it should have been. I will try to get a fix out asap for it :)/>
crazy_fab #132
Posted 17 February 2013 - 11:53 PM
Thank's for the quick answer, I made a quick&amp; dirty fix by checking placeDir and choosing the good argument for collectChest.
PS there is the same bug with checkFuel.
theoriginalbit #133
Posted 17 February 2013 - 11:57 PM
Thank's for the quick answer, I made a quick&amp; dirty fix by checking placeDir and choosing the good argument for collectChest.
PS there is the same bug with checkFuel.
Wow yeh I see where the problem is. n00b mistake. Ok like I said I'll have it fixed ASAP. :)/> I see a few other potential issues to fix too.
crazy_fab #134
Posted 18 February 2013 - 12:50 AM
All right they are working fast now( the turtle) But I have found a new issue, when the turtle goes down a layer, it forget to dig the block below itself on the new layer. the end result being a bunch of floating block every now and the on the last layer.
I guess it must be a small mistake into the main loop.

I think around line 189 you need one turtle.digDown()
I will test that later.
theoriginalbit #135
Posted 18 February 2013 - 12:57 AM
All right they are working fast now( the turtle) But I have found a new issue, when the turtle goes down a layer, it forget to dig the block below itself on the new layer. the end result being a bunch of floating block every now and the on the last layer.
I guess it must be a small mistake into the main loop.

I think around line 189 you need one turtle.digDown()
I will test that later.
Yeh its a problem with modifying an existing program… since it was dan200's one. I'll take a look into that one as well… maybe do a quick rewrite :)/>
crazy_fab #136
Posted 18 February 2013 - 02:35 AM
Well my turtle finished their hole and they were unable to find their way back home. It failed with "229 attempt to compare __lt on function and number".
But apart from these three bug I can't complain it was definitely faster than the original excavate. I think than going back to surface every time their inventory is full is quite slow( especially with all the different ore their is with most modpack)

edit
I just checked you forgot to add () behind turtle.getFuelLevel on line 228.
theoriginalbit #137
Posted 18 February 2013 - 02:38 AM
Well my turtle finished their hole and they were unable to find their way back home. It failed with "229 attempt to compare __lt on function and number".
But apart from these three bug I can't complain it was definitely faster than the original excavate. I think than going back to surface every time their inventory is full is quite slow( especially with all the different ore their is with most modpack)
Ok I'm doing a rewrite now (NeverCast and the community is probs gunna kill me for not working on CCTube like I am meant to be). Lets see how much I can get done before I have to go to bed.
crazy_fab #138
Posted 18 February 2013 - 02:59 AM
^^
Good luck. I made small bug fixes and I started three turtle on a 16 excavate. I'll keep these thread updated if any bug happen(hopefully there won't).
theoriginalbit #139
Posted 18 February 2013 - 03:01 AM
^^
Good luck. I made small bug fixes and I started three turtle on a 16 excavate. I'll keep these thread updated if any bug happen(hopefully there won't).
Cool thanks :)/> Do you have a GitHub account? if so it might be easier if you use the issue tracker there
crazy_fab #140
Posted 18 February 2013 - 03:15 AM
No I don't but I'll look into that as it seems pretty popular around here
theoriginalbit #141
Posted 18 February 2013 - 03:21 AM
No I don't but I'll look into that as it seems pretty popular around here
Version control is very popular with any developer! whether its git, svn or something else, anyone who cares about their programs and version use some form of version control… :)/>
crazy_fab #142
Posted 18 February 2013 - 05:39 AM
No account yet so I will post that here. I had three turtle running on a 16*16 area each. Two of them worked just fine(with my modification). No random block on the edges, and they came back home.
The third one however did stop too early, I think it was due to a deposit chest problem there were gravel around were it stopped and I think it's what caused the issue.
From what I have seen gravel and any gravity block seems to be not so well handled, it digs through gravel without dealing with it, and as it goes along layer it will completely delete it. But if it is near the end some gravel may stay. Plus in that case I guess it prevented the turtle of placing it's deposit chest.
This same turtle, after the gravel issue went back home assuming it was done but it took a weird way digging through a chunk were it wasn't meant to quarry (it might have to do with the xdir and zdir not updating when the turtle rotate to place the chest).
And the last point would be that turtle don't deposit their ore when they are done. Not big a deal but still it would be nice make them empty their inventory(but the chests) at the end.


edit
I had another go with a turtle on chunk, same problem, some gravel had fallen when it wanted to unload so it broke the program.
However this time when going back it was worse, it was good on the y axis and one the horizontal axis but off by a 10 block on the other axis.
theoriginalbit #143
Posted 18 February 2013 - 02:55 PM
If gravel isn't being handled thats the excavate programs problem not mine, but don't worry, that will be fixed in the rewrite.
theoriginalbit #144
Posted 20 February 2013 - 09:37 AM
Hello all,

We are sorry to say that due to some incidents and events that have happened to one of the team members, the CCTube release will have to be pushed back a a week.

Unfortunately this circumstances happened quite suddenly early yesterday and there was nothing that could be done to anticipate it happening. As such the release is not running to schedule.

Unfortunately what is left to develop in CCTube requires input from ALL developers, and coding from ALL developers, which is something we just don't have. So expect the update same time next week, if any circumstances change and the release can be brought forward we will let you know and do so! Again we are sorry for any inconvenience and hope to have it released to you all as soon as possible.

Solemnly,
The CCTube Development Team
superaxander #145
Posted 20 February 2013 - 09:39 AM
Hello all,

We are sorry to say that due to some incidents and events that have happened to one of the team members, the CCTube release will have to be pushed back a a week.

Unfortunately this circumstances happened quite suddenly early yesterday and there was nothing that could be done to anticipate it happening. As such the release is not running to schedule.

Unfortunately what is left to develop in CCTube requires input from ALL developers, and coding from ALL developers, which is something we just don't have. So expect the update same time next week, if any circumstances change and the release can be brought forward we will let you know and do so! Again we are sorry for any inconvenience and hope to have it released to you all as soon as possible.

Solemnly,
The CCTube Development Team
NOOOOO! :(/>
theoriginalbit #146
Posted 20 February 2013 - 09:45 AM
NOOOOO! :(/>
I'm not quite sure where your concern/dismay lies there but im going to assume……….. its ok, its not being cancelled, just delayed.
superaxander #147
Posted 20 February 2013 - 09:58 AM
Well I have holidays now so I had enough time to start using it
theoriginalbit #148
Posted 20 February 2013 - 10:05 AM
Well I have holidays now so I had enough time to start using it
Well as I'm sure you read, it was not a choice we made deliberately. it is far out of our control, we are sorry we had to delay it, but there was no option. and we are sorry that it doesn't line up with your holidays, but again, it was out of our control.
Skullblade #149
Posted 20 February 2013 - 04:46 PM
Original what happened? Did someone get hurt? Hopefully nothing major happened…
NeverCast #150
Posted 20 February 2013 - 08:25 PM
Original what happened? Did someone get hurt? Hopefully nothing major happened…

The matter to whom it has happened would prefer it stay private, but we can say, that it was major enough that it effected the development of CCTube. Again, Sorry, and hope for a release ASAP. Thank you for your concern though :)/>
Skullblade #151
Posted 21 February 2013 - 12:39 AM
Original what happened? Did someone get hurt? Hopefully nothing major happened…

The matter to whom it has happened would prefer it stay private, but we can say, that it was major enough that it effected the development of CCTube. Again, Sorry, and hope for a release ASAP. Thank you for your concern though :)/>/>
Well I hope whomever it was gets better.
remiX #152
Posted 21 February 2013 - 01:56 AM
How many people in the CCTube Dev Team? 2?
theoriginalbit #153
Posted 21 February 2013 - 01:59 AM
How many people in the CCTube Dev Team? 2?
That matters why?
remiX #154
Posted 21 February 2013 - 02:06 AM
Was just clarifying :P/> You always make it seem like 4+ people xD
theoriginalbit #155
Posted 21 February 2013 - 02:10 AM
It very well could be. Maybe there are 28 of us all developing it.
theoriginalbit #156
Posted 21 February 2013 - 06:14 PM
Updated OP.

Now easier to navigate and find exactly what you want.

Also added a "programs that use my apis" section.
theoriginalbit #157
Posted 23 February 2013 - 02:45 AM
Minor Updates to ccConfig
Minor Updates to Advanced Door Lock Program

See OP for details.
Shnupbups #158
Posted 23 February 2013 - 09:25 AM
If it's OK with you, I think I might use your Loading Screen API as well in CCscreensaver. (It's much better than what I've got currently for downloading the files and making the folders)
theoriginalbit #159
Posted 23 February 2013 - 01:41 PM
If it's OK with you, I think I might use your Loading Screen API as well in CCscreensaver. (It's much better than what I've got currently for downloading the files and making the folders)
Yeh thats fine. All my stuff can be used without asking, just the standard credit would be nice. The only one I would say no to you with is if you wanted to use my Screen Saver API in yours :P/>
superaxander #160
Posted 26 February 2013 - 04:21 AM
If it's OK with you, I think I might use your Loading Screen API as well in CCscreensaver. (It's much better than what I've got currently for downloading the files and making the folders)
Yeh thats fine. All my stuff can be used without asking, just the standard credit would be nice. The only one I would say no to you with is if you wanted to use my Screen Saver API in yours :P/>/>
I've made screensaver too xD
Shnupbups #161
Posted 01 March 2013 - 08:20 PM
I hope CCtube gets released soon! I wantz it.
theoriginalbit #162
Posted 03 March 2013 - 12:45 AM
I hope CCtube gets released soon!
So do I. but NeverCast has had some compulsory work commitments over the past few says and I haven't been able to get in contact with him properly to fix some stuff on the server and such.
Kryptanyte #163
Posted 03 March 2013 - 02:35 AM
Days*
theoriginalbit #164
Posted 03 March 2013 - 02:40 AM
Days*
yes days. but I'm not typing the best I can atm. so I think that 1 out of 37 words wrong is a REALLY good effort.
Kryptanyte #165
Posted 03 March 2013 - 02:41 AM
If you want me to, I can go grammar Nazi if you want
theoriginalbit #166
Posted 03 March 2013 - 02:44 AM
If you want me to, I can go grammar Nazi if you want
No, not at all. I would prefer that you appreciate my programs and leave it at that :P/> and dude, go to bed, its almost 3am where you are!
Kryptanyte #167
Posted 03 March 2013 - 03:01 AM
You kidding me? I just got internet back at full speed. Times to catch up on a weeks worth of Youtube
theoriginalbit #168
Posted 03 March 2013 - 03:09 AM
You kidding me? I just got internet back at full speed. Times to catch up on a weeks worth of Youtube
Lol. sounds like me when uni is on. :P/>
theoriginalbit #169
Posted 04 March 2013 - 12:19 AM
IMPORTANT BUG FIX!
CConfig

v1.4.6
  • Whitespace in the config files were causing some problems. Whitespace is now ignored.
superaxander #170
Posted 04 March 2013 - 07:51 PM
How is it going with ccTube ?
theoriginalbit #171
Posted 05 March 2013 - 01:09 AM
How is it going with ccTube ?
Bad. I can't get in contact with NeverCast. He hasn't been on Skype or the forums and I need his to change a setting on the server. Other than that, it's good.
theoriginalbit #172
Posted 09 March 2013 - 02:54 PM
Changed OP

Ok so it was getting quite hard to edit the documentation and such for the apis in here, so I am spending a lot of time and migrating them over to GitHub wikis. Its going to make updating so much easier. All thats left for me to do is the ScreenSaver API pages, all the rest are migrated. Change Logs are also on GitHub now too.
Heracles421 #173
Posted 09 March 2013 - 05:55 PM
BIT, I can help with the turtle remote control. PM for more info.
theoriginalbit #174
Posted 09 March 2013 - 06:36 PM
BIT, I can help with the turtle remote control.
Sure, you got a GitHub? I can add you as a collab.
theoriginalbit #175
Posted 09 March 2013 - 07:15 PM
Ugh. Sorry guys my CConfig repository on GitHub became corrupted, so I've lost all the developer documentation. I'm working on the page again to help you all out in using the api. I've also renamed to ccConfig.
theoriginalbit #176
Posted 09 March 2013 - 09:43 PM
New Program!

I got VERY bored. So I made a new Program

CCPassGen — A password generator for ComputerCraft that uses Symantec's Password Generator

See the 'Computer Programs' section for more details
theoriginalbit #177
Posted 10 March 2013 - 04:57 AM
Ok I think that the ccConfig developer documentation is finished and up again. happy deving! :)/>

I've also finished the ScreenSaver Lite documentation
superaxander #178
Posted 10 March 2013 - 07:59 AM
Ok I think that the ccConfig developer documentation is finished and up again. happy deving! :)/>

I've also finished the ScreenSaver Lite documentation
awesome
theoriginalbit #179
Posted 10 March 2013 - 08:16 PM
Ok so I've decided that I'm going to release my Graphics Library to the capacity of what it can do in CCTube. There is still heaps that need to be done, and implemented, but it should make developing GUI's for people SO much easier. I will be releasing it when I've finished the developer documentation for it.
Shnupbups #180
Posted 10 March 2013 - 09:32 PM
You can add CCscreensaver to the Currently Using section of the programs that use. But keep it in the Soon to Use because the next update will have your Loading Screen/Bar API.
theoriginalbit #181
Posted 10 March 2013 - 09:38 PM
You can add CCscreensaver to the Currently Using section of the programs that use. But keep it in the Soon to Use because the next update will have your Loading Screen/Bar API.
It was there for ccConfig. I added Loading Screen/Bar API to it tho.
theoriginalbit #182
Posted 11 March 2013 - 02:47 AM
Updated CCalendar
v1.1
  • Added runtime arguments
  • Fixed oversight
See OP for more details
Shnupbups #183
Posted 11 March 2013 - 10:42 AM
It was there for ccConfig. I added Loading Screen/Bar API to it tho.
I mean move it out of soon to use for ccConfig, as that is now the current version.
theoriginalbit #184
Posted 11 March 2013 - 09:59 PM
New Section!

General Programs — That replicate real programs from OS X

See OP for more details


I mean move it out of soon to use for ccConfig, as that is now the current version.
Done :)/>
superaxander #185
Posted 11 March 2013 - 10:05 PM
New Section!

General Programs — That replicate real programs from OS X

See OP for more details
Awesome!
theoriginalbit #186
Posted 13 March 2013 - 02:28 AM
Good news peeps. NeverCast finally contacted me today!!!!!!!!! CCTube development will start again and hopefully get released next week (fingers crossed!).
GravityScore #187
Posted 13 March 2013 - 02:34 AM
Good news peeps. NeverCast finally contacted me today!!!!!!!!! CCTube development will start again and hopefully get released next week (fingers crossed!).

:D/> :D/> :D/> :D/> :D/> :D/>

Yay!
theoriginalbit #188
Posted 13 March 2013 - 02:39 AM
:D/> :D/> :D/> :D/> :D/> :D/>

Yay!
IKR! I was more like "FINALY!!!!!!" :P/>
Mackan90096 #189
Posted 13 March 2013 - 05:31 AM
I'm going to use your calendar in my os.
theoriginalbit #190
Posted 13 March 2013 - 05:38 AM
I'm going to use your calendar in my os.
Cool… thanks :)/> let me know when its done and Ill add it to the list. I will eventually make it look and work better too :)/>
Mackan90096 #191
Posted 13 March 2013 - 06:18 AM
I'm going to use your calendar in my os.
Cool… thanks :)/> let me know when its done and Ill add it to the list. I will eventually make it look and work better too :)/>

I got a error there.. I´ll post it here when i remberer it..
Mackan90096 #192
Posted 13 March 2013 - 11:34 PM
The error i get is: [string "startup"]:229: cannot use '…' outside a vararg function . If u need The code just tell me
theoriginalbit #193
Posted 13 March 2013 - 11:46 PM
The error i get is: [string "startup"]:229: cannot use '…' outside a vararg function . If u need The code just tell me
Yes please PM me a pastebin link to the code and I'll take a look for you :)/>
theoriginalbit #194
Posted 17 March 2013 - 02:54 AM
Good news peeps. NeverCast finally contacted me today!!!!!!!!! CCTube development will start again and hopefully get released next week (fingers crossed!).

:D/> :D/> :D/> :D/> :D/> :D/>

Yay!
He talked to me for like a day and has disappeared again :(/> damn him!
remiX #195
Posted 17 March 2013 - 08:46 AM
Good news peeps. NeverCast finally contacted me today!!!!!!!!! CCTube development will start again and hopefully get released next week (fingers crossed!).

:D/> :D/> :D/> :D/> :D/> :D/>

Yay!
He talked to me for like a day and has disappeared again :(/> damn him!

:unsure:/> :unsure:/>

What's he been up to?
theoriginalbit #196
Posted 17 March 2013 - 03:07 PM
:unsure:/> :unsure:/>

What's he been up to?
I have NO idea :(/>
theoriginalbit #197
Posted 24 March 2013 - 12:56 AM
New Program!

CCPresenter — A tool to share your screen with another computer

See OP for more details
theoriginalbit #198
Posted 24 March 2013 - 01:19 AM
whops, OP fix. thats better :P/>
theoriginalbit #199
Posted 24 March 2013 - 01:40 AM
Added screenshots for CCPresenter, sorry guys, thought I had already done that :P/>
theoriginalbit #200
Posted 25 March 2013 - 05:42 AM
YAY new API!!!

CCKeyboard — CCKeyboard is designed to display a keyboard on a monitors screen. It can queue characters, numbers and symbols.

Screenshots
SpoilerMaximum size keyboard: http://i.imgur.com/U80dffE.png
Medium size keyboard: http://i.imgur.com/OP4MzQ1.png
Smallest Possible Size keyboard: http://i.imgur.com/r08NAAK.png

Letters Lower: http://i.imgur.com/UwG7uEw.png
Letters Upper: http://i.imgur.com/0fAoTxF.png
Numbers &amp; Symbols: http://i.imgur.com/w4U26Yl.png
More Symbols: http://i.imgur.com/VWLl3Jg.png

See OP for more details
Mailmanq! #201
Posted 25 March 2013 - 05:58 AM
Yay! Finally I have been waiting for someone to make something like this sine monitors becam touch
theoriginalbit #202
Posted 25 March 2013 - 06:05 AM
Yay! Finally I have been waiting for someone to make something like this sine monitors becam touch
Thanks :)/> there was another version someone made a little while ago, I remember seeing it, but I remember it was a little hard to interface with. So I made this one today to make it nice and easy to interface with for the developers using the api :)/> the layout probably took me the longest to do… :P/>
theoriginalbit #203
Posted 26 March 2013 - 06:06 AM
Yay! Thanks to GravityScore I now have a website. Now to fill it with information. :D/>

http://theoriginalbit.net46.net/index.html
remiX #204
Posted 26 March 2013 - 06:51 AM
Wow that's an amazing website :o/>
theoriginalbit #205
Posted 26 March 2013 - 06:53 AM
Wow that's an amazing website :o/>
indeed it is. he did a really good job on it. there were a few things I changed graphically, a few things I added so that it would pass the W3C validation check. But the design is pretty much all him :)/> oh and now I've set up Sublime Text 2 with the SFTP Package and can edit the webpage and push an update REALLY quick and easily :D/>
superaxander #206
Posted 26 March 2013 - 08:51 AM
I could help you with updating the page without loading a different page(no php required)
Shnupbups #207
Posted 26 March 2013 - 03:13 PM
C'mon NeverCast, we want CCTube!
Engineer #208
Posted 27 March 2013 - 02:22 AM
wow,

CCPresenter looks really cool! Good job as always :P/>
theoriginalbit #209
Posted 27 March 2013 - 03:13 AM
wow,

CCPresenter looks really cool! Good job as always :P/>/>
Thanks for the kind words :)/>
GravityScore #210
Posted 27 March 2013 - 10:55 PM
Suggestion for the extended string library:

Add a truncate function, which (if the string is longer than a certain length) truncates the string down to a max length by putting in "…". So like:

a = "hello"
-- str.truncate([string], [length], [optional: location])
-- location can be center, adding ... in the center of the string, end, or start
a = str.truncate(a, 10)
theoriginalbit #211
Posted 27 March 2013 - 11:07 PM
Suggestion for the extended string library:

Add a truncate function, which (if the string is longer than a certain length) truncates the string down to a max length by putting in "…". So like:

a = "hello"
-- str.truncate([string], [length], [optional: location])
-- location can be center, adding ... in the center of the string, end, or start
a = str.truncate(a, 10)
Ok will do when I get home. I'm also renaming the API to StringX. It's a nice and short name :P/>
superaxander #212
Posted 27 March 2013 - 11:12 PM
Suggestion for the extended string library:

Add a truncate function, which (if the string is longer than a certain length) truncates the string down to a max length by putting in "…". So like:

a = "hello"
-- str.truncate([string], [length], [optional: location])
-- location can be center, adding ... in the center of the string, end, or start
a = str.truncate(a, 10)
You need that for thunderbird don't you :P/>
theoriginalbit #213
Posted 27 March 2013 - 11:56 PM
Suggestion for the extended string library:
How would you prefer it deal with strings that are shorter than the length? put … on the end or just return the string unaltered?
GravityScore #214
Posted 28 March 2013 - 12:03 AM
Return unaltered please :P/>
remiX #215
Posted 28 March 2013 - 12:41 AM
Suggestion for the extended string library:
How would you prefer it deal with strings that are shorter than the length? put … on the end or just return the string unaltered?
Return unaltered please :P/>

Or have an extra argument which you can define what is that the end, leave nil to have the string returned unaltered
theoriginalbit #216
Posted 28 March 2013 - 01:14 AM
Suggestion for the extended string library:
How would you prefer it deal with strings that are shorter than the length? put … on the end or just return the string unaltered?
Return unaltered please :P/>

Or have an extra argument which you can define what is that the end, leave nil to have the string returned unaltered
I'm having trouble getting my head wrapped around the position atm (I'm very tired)

For now this is the basic truncate function without the location. When I get location working I'll push the update. ( just add this to the end of the StringX/ESL file if you are even using it :P/> )
Spoiler


-- REQUESTED BY GRAVITYSCORE
function truncate(str, length)
  if type(str) ~= "string" then error("Bad argument: String expected, got "..type(str), 2) end
  if type(length) ~= "number" then error("Bad argument: Number expected, got "..type(length), 2) end

  -- return strings that aren't long enough

  if #str <= length - 3 then
	return str
  end

  return str:sub(1, length - 3)..'...'
end
KaoS #217
Posted 28 March 2013 - 02:20 AM
I'm not sure about the location thing either… I would allow a user to specify the "…" though and I'm not sure why you are subtracting 3 from the length on line 9… if the string fits in the length with no spare space you should still just return the string, no need to shorten it

basically

function truncate(str,len,rep)
  if type(str)~="string" or type(len)~="number" then error("incorrect input. expected ( String, number, [string] ), got ( "..type(str)..", "..type(len)..", "..type(rep).." )") end
  rep = type(rep)=="string" and rep or "..."
  return str:len()<=len and str or str:sub(1,len-rep:len())..rep
end
remiX #218
Posted 28 March 2013 - 02:26 AM

  if type(str) ~= "string" then error("Bad argument: String expected, got "..type(str), 2) end
  if type(length) ~= "number" then error("Bad argument: Number expected, got "..type(length), 2) end
Here is a nice bit of code that I have that replaces this statement
Old long way:

if not someVariable then
  error( 'You did not give me the parameter I wanted', 2)
end
New way:

assert( someVariable, 'You did not give me the parameter I wanted', 2)

Hmm :P/>

assert( type( str ) == "string", "Bad argument: String expected, got "..type( str ), 2)
assert( type( length ) == "number", "Bad argument: Number expected, got "..type( length ), 2)

I guess you made it as fast as you could :P/>
theoriginalbit #219
Posted 28 March 2013 - 02:44 AM
I'm not sure why you are subtracting 3 from the length on line 9… if the string fits in the length with no spare space you should still just return the string, no need to shorten it
Hmmm… why did I do that… o.O thanks for picking that up. :)/>

I guess you made it as fast as you could :P/>
Nope, it was deliberate, I actually had to change it from the assert to the if not then to post it here… if you didn't notice StringX (formerly Extended String Library) was developed before I had the custom assert, as such I could not give code using said assert, so I converted to the current format of StringX, however the next update will be using my custom assert.
KleptoKat #220
Posted 01 April 2013 - 08:57 PM
You have a lot of really neat apis, going to test them tomorrow.
theoriginalbit #221
Posted 01 April 2013 - 08:58 PM
You have a lot of really neat apis, going to test them tomorrow.
thanks :)/> tell me if you use them in anything and release it… I will put your program in the "uses my stuff" section…
Mackan90096 #222
Posted 02 April 2013 - 02:12 AM
I'd like to use ccConfig for my OS to confgure things like background color. But i cant figure out how to use it. Can you maybe help me?
theoriginalbit #223
Posted 02 April 2013 - 02:29 AM
I'd like to use ccConfig for my OS to confgure things like background color. But i cant figure out how to use it. Can you maybe help me?
Yeh sure. Have you taken a look at the usage examples?
Mackan90096 #224
Posted 02 April 2013 - 02:30 AM
Not really… But I have taken a look at the code a bit.. (Btw… Wheres the usage examples?)
theoriginalbit #225
Posted 02 April 2013 - 02:37 AM
Not really… But I have taken a look at the code a bit.. (Btw… Wheres the usage examples?)
In the developer documentation link… I provide these resources to help you, the developer, I don't understand why people don't click the link :P/>/>

Have a read of the documentation and if you are still having problems just ask and I'll give you a hand when I get home.
Mackan90096 #226
Posted 02 April 2013 - 02:37 AM
Ok. Thanks
Mackan90096 #227
Posted 02 April 2013 - 02:49 AM
Well.. I got it loaded.. But how do I use it to load and save configs?

I have looked at the documentation but I don't understand it really..
theoriginalbit #228
Posted 02 April 2013 - 03:04 AM
Well.. I got it loaded.. But how do I use it to load and save configs?

I have looked at the documentation but I don't understand it really..
Ok so as outlined in the Documentation there is a load and a save function. So once you have created the configuration object with init you then call on that object the load function via
yourConfigObject:load()
this will load all the contents of the configuration file into the object we are using in the code… Now you can start using all the get functions on the object, if the config file did not exist (meaning there is no data in our object) or you try to 'get' a key that does not exist the default value you provide will be set and returned to you meaning you can do lines like this
local backColor = yourConfigObject:getColour('backgroundColor', colours.cyan)
and do not have to worry about if the 'backgroundColor' even exists as it is created for you in the event that it doesn't and uses the colours.cyan as the default… now just as a side note I have built in support for you and your users to use a large amount of styles to which colour you desire, here is a (I think complete) list of all the formats it will accept…

after you have 'loaded' all your properties from the config file you must then call the save function on the object by using
yourConfigObject:save()
this will then go and save all the data back out to the configuration file, without overriding the users preference if they have supplied one… this should be the last function you call on the configuration object…

NOTE #1: If the user decides to add their own properties it will not error your code as you do not use them… if they make a typo in a properties key the property will be reset to default…
NOTE #2: If the configuration object encounters any problems with loading the configuration file it will error your program. to find out how to stop this take a look at the resetting a config example in the documentation, or take a look at my tutorial on Errors and how to handle them etc (link in signature)

Hope this all make sense…
TheOddByte #229
Posted 02 April 2013 - 03:51 AM
Mind if I use the ccConfig API in my game Boxer?
Since that seems quite useful. :)/>
theoriginalbit #230
Posted 02 April 2013 - 03:54 AM
Mind if I use the ccConfig API in my game Boxer?
Since that seems quite useful. :)/>
No problems at all as I say in the OP
APIs — Anyone can use in their programs, just credit me, and tell me so I can add you into the above list.

so tell me when its released and I'll add it into the "People's Programs Using My APIs" section with a link to the program :)/>
TheOddByte #231
Posted 02 April 2013 - 05:21 AM
Mind if I use the ccConfig API in my game Boxer?
Since that seems quite useful. :)/>
No problems at all as I say in the OP
APIs — Anyone can use in their programs, just credit me, and tell me so I can add you into the above list.

so tell me when its released and I'll add it into the "People's Programs Using My APIs" section with a link to the program :)/>
You know that it's already released right?
I have added you to the credits.. :)/>
The game can auto update now! :D/>
But you can manually do it in settings/update
And auto updating is default turned off and you can change it in
settings/network.
theoriginalbit #232
Posted 02 April 2013 - 05:26 AM
You know that it's already released right?
I have added you to the credits.. :)/>
The game can auto update now! :D/>
But you can manually do it in settings/update
And auto updating is default turned off and you can change it in
settings/network.
But is the version that uses my API released? :P/>
nice :)/>

EDIT: Also as most people should know by now, I am a very lazy person…. so link? :P/>
Edited on 02 April 2013 - 03:27 AM
TheOddByte #233
Posted 02 April 2013 - 05:30 AM
You know that it's already released right?
I have added you to the credits.. :)/>
The game can auto update now! :D/>
But you can manually do it in settings/update
And auto updating is default turned off and you can change it in
settings/network.
But is the version that uses my API released? :P/>
nice :)/>

EDIT: Also as most people should know by now, I am a very lazy person…. so link? :P/>
Uhmm… Yes that version is released..
And are you blind? :P/>
It's right there in my sig.
theoriginalbit #234
Posted 02 April 2013 - 05:39 AM
Uhmm… Yes that version is released..
And are you blind? :P/>
It's right there in my sig.
ok…
well maybe I am… honestly I don't normally read signatures :P/>
theoriginalbit #235
Posted 02 April 2013 - 05:47 AM
Uhmm… Yes that version is released..
And are you blind? :P/>
It's right there in my sig.
Ok it has been added to the list :)/>
theoriginalbit #236
Posted 02 April 2013 - 05:50 AM
Just as a note to everyone…..

If you do not wish to include my apis as separate files (i.e. wan't to keep your program as one file) you can do so, and this is how:
  1. add the following code to your program
  2. 
    	do
    	  -- my api goes here
    	end
    		
    this ensures that you do not call any of my functions that you are not meant to, but still allows you to have your program as just one file…
  3. change the init or new functions name that way later you know what it is for, or incase you are using multiple of my apis… just name it something like ccConfigInit or such…
Mackan90096 #237
Posted 02 April 2013 - 06:38 AM
I cant use the api because of lua f****** up if i do..
theoriginalbit #238
Posted 02 April 2013 - 06:42 AM
I cant use the api because of lua f****** up if i do..
In what way does Lua stuff up?
Mackan90096 #239
Posted 02 April 2013 - 08:08 AM
It says it needs ends where it doesn't and such things
theoriginalbit #240
Posted 02 April 2013 - 08:15 AM
It says it needs ends where it doesn't and such things
chances are it does need them, I've never had Lua get it wrong… make a thread in "Ask a Pro" with your relevant code and the exact error message and I and/or others will help you :)/>
Mackan90096 #241
Posted 02 April 2013 - 08:49 AM
I'll do that tomorrow.
I'm really tired now.
GeniusName3 #242
Posted 07 April 2013 - 08:48 AM
May I use your CConfig program in a program of mine?I will get credit.
GeniusName3 #243
Posted 07 April 2013 - 08:57 AM
nevermind,I think this is too complex :l
theoriginalbit #244
Posted 08 April 2013 - 06:24 PM
nevermind,I think this is too complex :l
May I ask what you found complex about it, it may allow me to improve it in the future.
theoriginalbit #245
Posted 12 April 2013 - 05:24 PM
New program!

RedTransfer — A program to send files across everything red (well almost).

See OP for more details…
superaxander #246
Posted 12 April 2013 - 07:14 PM
Cool all things with red except red wool I guess
theoriginalbit #247
Posted 12 April 2013 - 07:17 PM
except red wool
That's what the "well almost" is for :P/>
And thanks… lots of binary stuffz in that one…
superaxander #248
Posted 12 April 2013 - 07:19 PM
lots of binary stuffz in that one…
I thought so
theoriginalbit #249
Posted 12 April 2013 - 07:24 PM
I thought so
:P/>
lots of left bit-shifts, a couple of bitwise and, a bitwise or…. you know, all the standard stuff.
Shnupbups #250
Posted 12 April 2013 - 11:10 PM
So I guess CCTube is never gonna happen. *sigh*
superaxander #251
Posted 12 April 2013 - 11:39 PM
Not until never cast comes back or someone takes his place and recreates all server stuff
theoriginalbit #252
Posted 13 April 2013 - 07:39 AM
Not until never cast comes back or someone takes his place and recreates all server stuff
Indeed, sadly I am no where near as good at server side security as NeverCast, like the only person who could bypass our security was AfterLifeLochie, and he is a web GENIUS and could still only bypass half of it!
LordIkol #253
Posted 16 April 2013 - 08:09 AM
Hi Bit,

i have a problem with the CCconfig API.

im using this code



local conf = ccConfig.new("config.cfg")
conf:load()
conf:getTable("colorChoices", picked)
conf:save()

as you see i want to save a table to the config file

and im ending up with this entry in the config file :


+– default: {[1]=1,[2]=2,[3]=32,}
colorChoices={[1]

the part that is written in the default line is what i want should be saved vor this
but in the actual value he only stores the index 1
getnumber and getString worked perfect

im thankful for every tip :)/>
M4sh3dP0t4t03 #254
Posted 16 April 2013 - 08:45 AM
Found a mistake in the description of redtransfer: you said it would be 10 bytes every second, but its really 10 bits every second, which is a 8 times slower. And it seems to be a nice program, but I think there isn't a really useful use of transmitting file with 1.25 letters(if its using 1 byte per letter) every second, if you also can, without much more work send things of an infinite size over a cable with up to infinite transfer speed(if your computer has infinite memory and processor speed)(except if you want to connect it with a redstone computer, but why would you have that if you have computercraft)(except you would make it compatible with computercraft versions, in that the rednet wasn't invented yet)
theoriginalbit #255
Posted 16 April 2013 - 04:33 PM
-snip-
Thanks for the report, I never vigorously tested the saving and getting of tables, since it was and still is experimental. I am trying to work on a nice way to edit it for the user (since configs are normally editable) but cannot really think of any way, and don't want to fully commit to it until I can think of a way.
I think I may know what the problem is though, I'll check it out and release a patch for you asap. :)/>


-snip-
thanks for picking up on the typo, was really late when I was typing that description. I know there isn't much use for it, but it will eventually expand to cover 'everything red' so the program will give options on how to transmit. and also be able to use multiple redstone lines, reducing the time a little.
The reason I made it was that the person I credited in the post was making one, I was helping them in Ask a Pro, and to be able to help fully I had to understand fully, so I made it, they didn't end up releasing their version, so I released mine, figured "hey, why just flush half an hours worth of work down the toilet, may as well release it"



Thank you both for your feedback
LordIkol #256
Posted 16 April 2013 - 07:01 PM
Ah cool, looking forward to the fix.

Another thing i would like to know is, if there is a way to edit settings without changing the default value.
You could do it manually in the config file since this is what this api is for :)/>
But i would like to do sth like this.

conf:setTable <key> <newval> <defaultval>

Is sth like this possible already or planned?
Thanks in advance.

Ps. I really like your developers Guide and the provided examples nice job
theoriginalbit #257
Posted 16 April 2013 - 07:37 PM
-snip-
Hmmm, editing configs really is reserved for users. But I'll consider adding setters…
A method of doing it is changing the default value and using the reset function with the key you just changed. you could make your own function

local function setTable(key, value)
  conf:getTable(key, value)
  conf:reset(key)
  conf:save()
end

Ps. I really like your developers Guide and the provided examples nice job
Thanks, it takes a long time for me to write them all up, and a lot of people take it all for granted… posting bugs and such when it isn't a bug with my code, its a mistake in theirs. Fun times. :/

EDIT: Also problem wasn't what I thought it was, patch may take a little longer than expected. Since its actually using getString with the serialized table.

EDIT 2: Oh look 256 replies http://puu.sh/2B3yS I love it when its data size increments :P/>
Edited on 16 April 2013 - 05:54 PM
LordIkol #258
Posted 16 April 2013 - 09:02 PM
-snip-
Hmmm, editing configs really is reserved for users. But I'll consider adding setters…
A method of doing it is changing the default value and using the reset function with the key you just changed. you could make your own function
-snip-
I thought that its supposed to work like this. (Documentation FTW :D/>).
But i wanted to be sure i didnt miss sth. Cause im want to use it for the settings section of my game.
and it would be neat if the user can choose and save his options from the Gui and if needed reset to the System defaults.
but i will play around with your suggestion a little bit.

-snip-

Thanks, it takes a long time for me to write them all up, and a lot of people take it all for granted… posting bugs and such when it isn't a bug with my code, its a mistake in theirs. Fun times. :/

EDIT: Also problem wasn't what I thought it was, patch may take a little longer than expected. Since its actually using getString with the serialized table.

Thats the problem with the most people, they like to make use of the work of others (your API in this case), but they are not willing to put in some work on their own (Read the documentation and try the examples before asking questions).

for the Fix, no problem if it takes longer. anyway it will take some weeks maybe longer until i get this project finished.
A lot of things to care about in RL at the moment, but constant dripping wears the rock away ;)/>

EDIT 2: Oh look 256 replies http://puu.sh/2B3yS I love it when its data size increments :P/>

i really like the way you think :D/>
theoriginalbit #259
Posted 17 April 2013 - 01:04 AM
I thought that its supposed to work like this. (Documentation FTW :D/>).
But i wanted to be sure i didnt miss sth. Cause im want to use it for the settings section of my game.
and it would be neat if the user can choose and save his options from the Gui and if needed reset to the System defaults.
but i will play around with your suggestion a little bit.
Are you able to PM me your code so I can see what you are doing and test. I still can't replicate the issue you are having.
LordIkol #260
Posted 17 April 2013 - 01:40 AM
no problem i will send you the code when im back home tonight.
theoriginalbit #261
Posted 17 April 2013 - 01:51 AM
no problem i will send you the code when im back home tonight.
thanks
PixelToast #262
Posted 17 April 2013 - 03:28 AM
CCKeyboard uses WAAAAAAAAAAAAAAAAAAAAAY too many function calls and declarations
why not just store this crap in a table, alot more efficient
theoriginalbit #263
Posted 17 April 2013 - 03:34 AM
CCKeyboard uses WAAAAAAAAAAAAAAAAAAAAAY too many function calls and declarations
why not just store this crap in a table, alot more efficient
function calls: because I was feeling exceptionally lazy, and kept making copy/paste mistakes… plus having the functions allows for another part of the api I have been working on. and it is in a table.
declarations: ? what do you mean too many declarations ?
PixelToast #264
Posted 17 April 2013 - 04:59 AM
you are making a ton of functions wich strains CPU and memory
EDIT:
and several functions arent localized
theoriginalbit #265
Posted 17 April 2013 - 05:00 AM
you are making a ton of functions wich strains CPU and memory
you talking about the onClick and onDraw functions?
PixelToast #266
Posted 17 April 2013 - 05:06 AM
if that is this:

than yes

EDIT: so many things are bad, cant take it anymore ;-;
theoriginalbit #267
Posted 17 April 2013 - 05:10 AM
EDIT: so many things are bad, cant take it anymore ;-;
Fine with me, go make your own version and make all these improvements, and enhancements… Or if you're feeling lazy, list the problems and I'll fix them just for you.

EDIT: I don't really see the problem with anonymous function though and there is no way to remove them.
PixelToast #268
Posted 17 April 2013 - 05:24 AM
  • making functions for things that are only run once
  • exessively making functions for things that are repeated (use tables)
  • unnecicary variables
  • non localized things
  • 
    _G.assert = function(
    
    i dont even
  • localizing things and declaring them nil (same as push in assembly, its automatically nil)
  • 
    'A screen with the key \''
    
    why not just wrap it in double quotes instead of having to escape the apostrophe
  • 
      views[screen][key] = {}
    
    why not just declare the contents of the table there?
  • lack of comments
CCconfig:
  • line 65 is useless, set its meta table and use a simple function to return values
  • its more buggy and less functional than textutils.serialize, you can easily do an SQL injection type thing
more when my headache is over
theoriginalbit #269
Posted 17 April 2013 - 05:40 AM
making functions for things that are only run once
Functions are quite often this. However you make me a click handler for all the buttons without a massive amount of unreadable if statements and I'll replace all the anonymous functions…

exessively making functions for things that are repeated (use tables)
Are you talking about the function call to add to the table?

unnecicary variables
learn to spell 'unnecessary'. and nope there are no variables that aren't required or used at some point.

non localized things

_G.assert = function(
i dont even
I don't care that not being local…


'A screen with the key \''
why not just wrap it in double quotes instead of having to escape the apostrophe
Why not, makes no difference.


views[screen][key] = {}
why not just declare the contents of the table there?
Because there is no efficiency gain and its more readable not declaring it in there.

lack of comments
Why should I comment it. There is the developer documentation, and that is more useful to developers than commenting the code, I don't need the comments, I know what the code does…

CCconfig:
Ok moving on I guess.

line 65 is useless, set its meta table and use a simple function to return values
did you even bother reading it? its very useful, it allows for ignorant users to be able to change colours and the such.

its more buggy and less functional than textutils.serialize, you can easily do an SQL injection type thing
well I'm not forcing you to use this API you can continue to use textutils.serialize. and no there is no way to do an 'SQL injection type thing'.
BitLooter #270
Posted 17 April 2013 - 07:55 PM
I'm getting a strange error when I place ccConfig in my server's API directory. If I place it there, any computers I reboot or any computers I reboot will stop working, just show a black screen and no prompt symbol on the computer block. If I remove the file, breaking and replacing the computer or turtle will cause it to start working again. I'm not even using the API anywhere yet, I just put it there for later. I put StringX and another small API I wrote there with no problem, but this one seems to break everything. Is this a bug, or am I not supposed to do this?

I'm using CC 1.5 and MC 1.4.7, I can't update yet because I'm waiting for some other mods. I've only been using ComputerCraft for about a week, so apologies if this is my error.
superaxander #271
Posted 17 April 2013 - 08:02 PM
I'm getting a strange error when I place ccConfig in my server's API directory. If I place it there, any computers I reboot or any computers I reboot will stop working, just show a black screen and no prompt symbol on the computer block. If I remove the file, breaking and replacing the computer or turtle will cause it to start working again. I'm not even using the API anywhere yet, I just put it there for later. I put StringX and another small API I wrote there with no problem, but this one seems to break everything. Is this a bug, or am I not supposed to do this?

I'm using CC 1.5 and MC 1.4.7, I can't update yet because I'm waiting for some other mods. I've only been using ComputerCraft for about a week, so apologies if this is my error.
And when you remove it does it work again?
theoriginalbit #272
Posted 18 April 2013 - 02:23 AM
-snip-
Hmmm that is an odd one. may have to look into that, not too sure what could be causing it.
So having APIs in there doesn't crash it, just the ccConfig…. Interesting… honestly I've never installed an API into the rom/apis. So yeh will have to look into it, thanks for the report, I'll see how I go.

Also interesting username… is it because you have looted some of my apis? :P/>
BitLooter #273
Posted 18 April 2013 - 05:08 AM
And when you remove it does it work again?
Yes, if you remove a computer and replace it after removing the API, it will boot and operate normally. Very strange, as the only software on the server right now is StringX and a few programs I've written, none of which are using ccConfig.

So having APIs in there doesn't crash it, just the ccConfig…. Interesting… honestly I've never installed an API into the rom/apis. So yeh will have to look into it, thanks for the report, I'll see how I go.
That's correct, StringX works fine (awesome library, btw). Placing ccConfig on a computer or disk also works too, though I haven't used it in any programs yet.

Also interesting username… is it because you have looted some of my apis? :P/>
Lol, I've actually been using this name in other places for years, but the irony was not lost on me.

While I'm here, quick suggestion for StringX - how about a centerPad() function that takes a string and a width, and pads spaces on the sides so the string is centered? It would be useful if you want to print a string in the middle of a row but also want to set the background color of the empty area.
PixelToast #274
Posted 21 April 2013 - 04:37 AM
Functions are quite often this. However you make me a click handler for all the buttons without a massive amount of unreadable if statements and I'll replace all the anonymous functions…
errrr,
startCoroutine()
only run once, complete waste of memory and the function stack

Are you talking about the function call to add to the table?
yea, the one that causes eye hurt, why waste so much resources for minimal gain in efficiency and ease of use
nope there are no variables that aren't required or used at some point.
hmm, cant find my example now
I don't care that not being local…
if you want it to be avalible to other programs then just localize it before both functions or use setfenv .-.
Because there is no efficiency gain and its more readable not declaring it in there.
yes it does, you have to index multiple functions every single declaration, and it looks horrible
did you even bother reading it? its very useful, it allows for ignorant users to be able to change colours and the such.
thats why i said make a function in replace, i even made a 1 line function to do it -_-/>

__index=function(s,n)
    return colours[string.gsub(n,"colours.")] or colors[string.gsub(n,"colors.")
end
there is no way to do an 'SQL injection type thing'.
will code an example later
theoriginalbit #275
Posted 21 April 2013 - 04:47 AM
errrr,
startCoroutine()
only run once, complete waste of memory and the function stack
It uses little to no memory, and is popped off the function stack immediately after completion anyway. plus I have it there as an external function for people using the API just incase.

yea, the one that causes eye hurt, why waste so much resources for minimal gain in efficiency and ease of use
Its part of my upgrade, I was future proofing for the next version, the screens and buttons on them will be extensible in the next version…

hmm, cant find my example now
If there ever was it would have just been an oversight, a debugging variable that I forgot to move.

thats why i said make a function in replace, i even made a 1 line function to do it -_-/>

__index=function(s,n)
	return colours[string.gsub(n,"colours.")] or colors[string.gsub(n,"colors.")
end
That doesn't allow for ones such as 'light grey' or improper case.

will code an example later
Ok I look forward to it. PM it to me when you're done.
PixelToast #276
Posted 22 April 2013 - 09:01 AM
It uses little to no memory, and is popped off the function stack immediately after completion anyway. plus I have it there as an external function for people using the API just incase.
no, its useless to make global
it dosent pass events, pullevent does
and why dont you have any of these things put in its own table, many of these names could conflict
Its part of my upgrade, I was future proofing for the next version, the screens and buttons on them will be extensible in the next version…
a single table.insert is really that hard?
That doesn&amp;amp;#39;t allow for ones such as &amp;amp;#39;light grey&amp;amp;#39; or improper case.
it was an example, just make exceptions, do i have to lecture you on the or operator
Ok I look forward to it. PM it to me when you&amp;amp;#39;re done.
Nah

username:
PixelToast\nadmin=true
theoriginalbit #277
Posted 22 April 2013 - 09:10 AM
and why dont you have any of these things put in its own table, many of these names could conflict
Any of what things? you mean the buttons. they are, its the 'screen' variable, the 'screen' is the master table…

a single table.insert is really that hard?
For some users yes… its called making the APIs easy to use to perform the function, after all that is the reason we make/have APIs

it was an example, just make exceptions
I could do that I guess.

Nah

username:
PixelToast\nadmin=true
Ok lets just ignore the fact that anyone who stored usernames, password, and access levels into a USER CONFIGURABLE CONFIGURATION file is a bit of an idiot… It wouldn't work… they would have to use

config:get('admin', false)
to be able to get this 'injected value'
theoriginalbit #278
Posted 22 April 2013 - 10:39 AM
ccConfig Update v1.1

Description:
Ok I've updated ccConfig to use a different method of colour validation (as demanded by PixelToast)

What has changed:
Nothing for developers or users… but, the function now has 40% more lines of code, is more logically complex, has lots more function calls……… but hey, there is no lookup table anymore ;)/> :D/>
PixelToast #279
Posted 22 April 2013 - 11:55 AM
instead of fixing my other 6 problems i had with the program you decide to fix the one with the least efficiency gain
*clap* *clap* *clap*
theoriginalbit #280
Posted 22 April 2013 - 12:17 PM
instead of fixing my other 6 problems i had with the program you decide to fix the one with the least efficiency gain
*clap* *clap* *clap*
You had 2 problems with ccConfig, that the lookup table was useless and that there can be code injections. I removed the lookup table and made the program more complex (just for you!), and you are yet to provide a successful injection so I fixed all the "problems" you had with it… I'm not going to fix the "problems" you have with CCKeyboard anytime soon, since I'm extremely tired, very sick, and have heaps of work for University due soon… Oh and most important of all, I quite frankly don't want to, most of what you stated doesn't provide enough efficiency gain to warrant it, and would actually make usability of the API harder, which is something I am not aiming for, I'm aiming to make it easier! So with no due respect I don't care if reading it "hurts [your] eyes", get over it… (yeh I'm not in the mood atm)
theoriginalbit #281
Posted 30 April 2013 - 08:47 PM
+ Added CCTicTacToe into OP… may as well since the forums lost the thread…
theoriginalbit #282
Posted 12 June 2013 - 08:56 AM
Guess Who's Back?!

Well I never really left, just haven't been making much, been concentrating on University. Thats over for the semester now.

But I'm not just announcing I'm back, I come bearing gifts… A new game; Typer (credit GravityScore)! See OP for more details. Enjoy and as always find any problems let me know.
superaxander #283
Posted 12 June 2013 - 09:06 AM
Nice game simple but effective
theoriginalbit #284
Posted 12 June 2013 - 09:08 AM
Nice game simple but effective
thanks :)/>
natenat3p #285
Posted 12 June 2013 - 09:19 AM
I would love to be able to code like you. I'm just learning about turtles. XD
theoriginalbit #286
Posted 12 June 2013 - 09:25 AM
I would love to be able to code like you.
all it takes is time :)/> thank you though.
superaxander #287
Posted 13 June 2013 - 01:10 AM
Feature request for typer:

Typing the words backwards as extra practice would be fun
theoriginalbit #288
Posted 13 June 2013 - 01:18 AM
Feature request for typer:
Typing the words backwards as extra practice would be fun
Hmmm, interesting proposal… I'll consider it… :)/>
theoriginalbit #289
Posted 15 June 2013 - 01:00 AM
Added my "Custom Read" function

See OP `Code Snippets` for more details.
theoriginalbit #290
Posted 15 June 2013 - 10:47 AM
Fixed a potential error with the "Custom Read" function pointed out to me by KaoS.
Caronthir #291
Posted 18 June 2013 - 05:35 AM
I've found a small error in your Vigenère Chiper program. Instead of starting at the letter "A", you start at the letter "B". Although this does not interfer with the process of encryption/decryption, it uses a shifted Vigenère table. The consequence of this is that if someone uses the standard Vigenère Chiper on a encrypted string, they would get nothing but gibberish. The error is on line 36, and it should have been

local lChar = 64 + row
. Also, it would be easier to use the algebraic method.

Love your programs! :D/>
theoriginalbit #292
Posted 18 June 2013 - 12:01 PM
I've found a small error in your Vigenère Chiper program. Instead of starting at the letter "A", you start at the letter "B". Although this does not interfer with the process of encryption/decryption, it uses a shifted Vigenère table. The consequence of this is that if someone uses the standard Vigenère Chiper on a encrypted string, they would get nothing but gibberish. The error is on line 36, and it should have been

local lChar = 64 + row
. Also, it would be easier to use the algebraic method.
Thanks for the feedback. The way I was taught in my Data Structures and Patterns unit at university was that when using a key of "z" it would not change the output, not with "a" as you imply… the starting char that we always used was 'B' + i, where i started at 0 because C++ array's indexes started at 0, compared to Lua where they start at 1, which is why I started with the 'A' char compared to the '@' symbol.

Love your programs! :D/>
Thank you :)/>
apemanzilla #293
Posted 18 June 2013 - 08:49 PM
I absolutely love these programs! Thanks a ton for sharing them! (Especially the on-monitor keyboard; very helpful for my monitor OS :P/>)
theoriginalbit #294
Posted 18 June 2013 - 10:56 PM
Thank you :)/> If you find any problems, have any improvements, or requests, for CCKeyboard please do let me know :)/>
Shadow_Assailant #295
Posted 01 July 2013 - 12:49 AM
Hey, bit. There seems to be a problem with your enhanced excavation program. It seems as though the turtle does not pick the enderchest back up after using it and then proceeds to just drop the items all over the floor when the inventory becomes full again. I'm not sure why it's doing this. Also, the turtle is leaving random blocks behind in the hole as though it's just totally passing them up.
theoriginalbit #296
Posted 01 July 2013 - 07:02 AM
Thank you for the report Shadow_Assailant,

The `Better Miner` program is currently under a reconstruction in order to fix this first problem. This was reported to me at the start of the year, unfortunately I have not had a huge amount of time to work on it.
I have not had any reports for this second issue so thank you, hopefully this bug will not find its way into the future version.

I'm sorry, but I cannot release a patch for the current program as the bug has some very deep roots that would cause needing a re-write anyway.

— BIT
Lego Stax #297
Posted 24 July 2013 - 11:06 AM
This is some epic/useful stuff here! I like it!
theoriginalbit #298
Posted 24 July 2013 - 11:16 AM
This is some epic/useful stuff here! I like it!
Thank you :)/>
jesusthekiller #299
Posted 24 July 2013 - 12:10 PM
Just noticed:

Simple Advanced GUI Maker

Fuck logic, huh? :P/>

BDW, what are you giving to include in CC?
theoriginalbit #300
Posted 24 July 2013 - 10:09 PM
Just noticed:

Simple Advanced GUI Maker

F**k logic, huh? :P/>
The whole point of the title was to be an Oxymoron… Because you'll be able to make very advanced GUIs in a simple manner. xD

BDW, what are you giving to include in CC?
CCTicTacToe.
jesusthekiller #301
Posted 25 July 2013 - 05:24 AM
Cool :)/>
Mitchfizz05 #302
Posted 25 July 2013 - 06:12 PM
Is it really necessary to have that many words in your typing program?
How did you manage?
There are words I've never even heard of in there!
theoriginalbit #303
Posted 25 July 2013 - 09:49 PM
Is it really necessary to have that many words in your typing program?
Reduces the chance of duplicates…

How did you manage?
There are words I've never even heard of in there!
Online scrabble dictionary… xD So they're all valid scrabble words…
theoriginalbit #304
Posted 30 July 2013 - 09:20 PM
Updated ccConfig to version 2.0!

See change-log link in OP for more details!
mrpoopy345 #305
Posted 23 August 2013 - 04:55 PM
Awesome programs! The door lock is my fav.
theoriginalbit #306
Posted 23 August 2013 - 05:35 PM
Awesome programs! The door lock is my fav.
Thanks :)/>
Lux #307
Posted 30 August 2013 - 07:22 AM
Thanks for the programs! They are very useful!
theoriginalbit #308
Posted 30 August 2013 - 07:33 AM
Thanks for the programs! They are very useful!
Your welcome. Thanks for the feedback.
CascadingDragon #309
Posted 04 September 2013 - 03:13 PM
I was testing the peripherals of OpenPeripherals for an idea I had earlier, and I decided to use your ccConfig.

I ran into 2 issues.
1) This is the main issue. I try to set the value of a Boolean of a Boolean I had set earlier, and it gives me the error "No key exists for the key 'stored'" (Also, I think you mean "No value for this key"??) I have checked the file generated by ccConfig, and the key and value both exist.

2) getNumber() seems to have an issue. It gives me an error, says it's expecting a boolean, not <whatever number=""> of type number. (I am using -1 here) I have been able to get around this with using getString(), so it's not a big issue.

I left comments in the code where the problems occurred, http://pastebin.com/GHUU7QPA.

Any help would be appricated. Thanks!

Edit: I am using the PIM from OpenPeripherals and the Player Detector from MiscPeripherals in this setup, if that helps.
theoriginalbit #310
Posted 04 September 2013 - 03:41 PM
-snip-
Which version are you using, the one from pastebin or github? It just occurred to me that i fixed a few bugs the other day that were reported to me on GitHub, but forgot to update the pastebin (I'll do that now). And yes value was meant, thanks for pointing that out.


EDIT:
getNumber was fixed in the patch the other day, it was a problem in my validation of arguments.
— Your check in addPlayer would not work, make it if fs.exists(name..".cfg") then, as a .cfg is added to the end of the file.
— Just out of curiosity why do you use both new and init? It's not a problem, just curious.
— The reason that setBoolean doesn't work is because you haven't loaded the configuration file. After you create the object with new/init you need to call sFile:load() which loads the configuration file into the memory.
— You will have the same problem in your pullItems function, you don't load it.
— Why do you reset the config file in your pullItems function? You realise that reset turns all the values into the defaults correct?
Edited on 04 September 2013 - 01:55 PM
CascadingDragon #311
Posted 04 September 2013 - 04:05 PM
That resolved both my issues. Although, I believe the 1st issue I had was a user issue, because the main program (I made a debug copy once I seen issues) has con:load(), and my debug version didn't.
Thanks!!
theoriginalbit #312
Posted 04 September 2013 - 04:10 PM
-snip-
Yeh I'm sorry, I always forget about the whole updating my pastebin's when I push out bug fixes on GitHub.
CascadingDragon #313
Posted 04 September 2013 - 04:21 PM
It actually appears to me, that your save() function isn't working.
In my test program, I generate the config with all the defaults. Afterwards, in a different function, I set the value of 1 boolean and up to 40 numbers.
If I run the program without a config file generated, it runs smoothly, but the values are never updated, even after a save. If I run the program again, with the config file generated, it actually tells me that the key doesn't exist. Looking at the config file, the numbers are all default, and the boolean isn't in the file.
I added a reset() to the end of my program, along with a save(), and the boolean was not in the file after the reset.
Any ideas?
theoriginalbit #314
Posted 04 September 2013 - 04:25 PM
Wait what? All my debug programs work perfectly fine in regards to saving and adding new values and such, is it possible that you can send me the main code you're using here so I can test with that? you may have found like some boundary case I didn't think of or something…
CascadingDragon #315
Posted 04 September 2013 - 04:36 PM
Here.

Yeah, the code contains code for OpenPeripheral's PIM and MiscPeripheral's Player Detector however. If you don't have them , the code obviously won't work. If you need me to, I'll create one that simulates the program without them.
theoriginalbit #316
Posted 04 September 2013 - 04:48 PM
Yeah, the code contains code for OpenPeripheral's PIM and MiscPeripheral's Player Detector however. If you don't have them , the code obviously won't work. If you need me to, I'll create one that simulates the program without them.
It's ok, I could have easily changed it myself…

However I've discovered your problem:

To tackle the first problem of the values never updating — this is because in the pullItems function you reset the configuration file back to the default values at the end of the function, what was your intention by calling the sFile:reset()?

Now to tackle the second problem, the boolean not being in the file — in your pullItems function you do not load the config file, as such the contents of the config file are only the numbers, meaning that when you save the file it only the new values go in because you haven't loaded the old ones.

Thank you so much as you have illuminated some problems on my end that I need to fix so people cannot make these mistakes again, for example being able to change the file without first using load.
CascadingDragon #317
Posted 04 September 2013 - 05:06 PM
Just resetting everything to default, but that function only gets called at the end, when the crux of the issue was in the middle of the function. However, since I was not loading it, the issue is moot.

(I just seen your edit of your original post to me, where you pointed out the issues in the first place. Also, I use init() instead of new() to signify the difference between when I am creating a file and when I am loading a file object. Just like if I was programming something in Python, new() would be my empty object, and init() would be loading a existing file [Which doesn't completely make sense since a newly created object also calls __init__() in Python but…. go with it])

I would recommend detecting and auto loading with init() or create a function that auto loads.

Slight tangent: I find it strange (as a self taught programmer) that I should call new()/init() with the path of an existing file, and also call load() on it. Maybe it's common convention, but I generally don't look at other people's Python/Java code. I really am only using your code cause… Minecraft is my lazy time. Haha :)/>

Edit: How does grammar work? Le sigh. My formatting and grammar suck >.>
theoriginalbit #318
Posted 04 September 2013 - 05:15 PM
Just resetting everything to default, but that function only gets called at the end, when the crux of the issue was in the middle of the function.
See but the problem here is that a file does not save until you call the save function, think of all the get/set's as writing to a buffer, and the save as the flushing the buffer to the file.

Also, I use init() instead of new() to signify the difference between when I am creating a file and when I am loading a file object. Just like if I was programming something in Python, new() would be my empty object, and init() would be loading a existing file [Which doesn't completely make sense since a newly created object also calls __init__() in Python but…. go with it])
Yes well Python is really the only Language I know of that uses init in that way, I was basing the name init on how in Objective-C it is the same as using new. And if you actually look in the code it is the same implementation.

I would recommend detecting and auto loading with init() or create a function that auto loads.
I'm going to make it so people cannot change values without first using the load function.

Slight tangent: I find it strange (as a self taught programmer) that I should call new()/init() with the path of an existing file, and also call load on it. Maybe it's common convention, but I generally don't look at other peoples Python/Java code. I really am only using your code cause… Minecraft is my lazy time. Haha :)/>
Basically I based this off another API I've used in the past and that is how they did it and I quite like the design pattern they have used.
CascadingDragon #319
Posted 04 September 2013 - 05:22 PM
See but the problem here is that a file does not save until you call the save function, think of all the get/set's as writing to a buffer, and the save as the flushing the buffer to the file.
For the end file, yes, I kinda overlooked that. The main issue inside the function was fixed with a load().

Yes well Python is really the only Language I know of that uses init in that way, I was basing the name init on how in Objective-C it is the same as using new. And if you actually look in the code it is the same implementation.
I knew it was the same from your documentation, I use them currently to signify to myself when I am creating a config file and when I am loading one.

I'm going to make it so people cannot change values without first using the load function.
That would be good as well.

Basically I based this off another API I've used in the past and that is how they did it and I quite like the design pattern they have used.
Whatever works for you. You did a great job. I'm just having so many issues because of being self-taught, I believe. That and I hate editing in Minecraft, and overlook things constantly.

Well thank you for the help.
Cheers!
theoriginalbit #320
Posted 04 September 2013 - 05:31 PM
I knew it was the same from your documentation, I use them currently to signify to myself when I am creating a config file and when I am loading one.
Fair enough, as I said it wasn't a problem in your code, I was just curious with that one. And wow thanks for actually reading my documentation! So many people don't, and so many people don't appreciate or understand the time I put into those to make them useful.

Whatever works for you. You did a great job. I'm just having so many issues because of being self-taught, I believe. That and I hate editing in Minecraft, and overlook things constantly.
I am considering changing it now slightly in a version 3.0, we shall see what I end up with. Also if you wish to continue programming in Minecraft, look up LuaIDE on these forums, it's made by GravityScore and it really does make in-game editing nice, however if you have access to the Minecraft world data, definitely external editing with Sublime Text 2 and GravityScore's ComputerCraft plugin (also on the forums, search "sublime" in the utilities section) for it is very nice.

Well thank you for the help.
No problems, thanks for pointing out some problems with some stuff I was doing.
CascadingDragon #321
Posted 04 September 2013 - 05:36 PM
Fair enough, as I said it wasn't a problem in your code, I was just curious with that one. And wow thanks for actually reading my documentation! So many people don't, and so many people don't appreciate or understand the time I put into those to make them useful.
But… if you don't read documentation… how do you know if you are doing it right? Common sense must be worth a fortune by now.

I am considering changing it now slightly in a version 3.0, we shall see what I end up with. Also if you wish to continue programming in Minecraft, look up LuaIDE on these forums, it's made by GravityScore and it really does make in-game editing nice, however if you have access to the Minecraft world data, definitely external editing with Sublime Text 2 and GravityScore's ComputerCraft plugin (also on the forums, search "sublime" in the utilities section) for it is very nice.
Playing on a server, I can't use Sublime, but LuaIDE looks nice. Thanks for the heads up!
theoriginalbit #322
Posted 04 September 2013 - 05:40 PM
But… if you don't read documentation… how do you know if you are doing it right? Common sense must be worth a fortune by now.
I don't know, but someone once asked me a question about an API and my response was literally "did you even read the developer documentation?!" and their response was "there is documentation"… The link was directly above the DL link :/
theoriginalbit #323
Posted 06 September 2013 - 04:15 AM
bumping to notify of a BIG bugfix in the custom read function.

* Fixed bug with empty history tables being supplied causing crash
* Fixed bug with cursor being off the screen AFTER enter is pressed and causing first line printed to be missing

Also
+ Added ability to tell read to use pullEventRaw instead of pullEvent

Download link is the same, find it in OP @ Useful Code Snippets —> Custom Read —> Download
theoriginalbit #324
Posted 22 September 2013 - 08:00 AM
New! ccConfig v2.1

* New colour parser. The valid input of colours is now endless!

Thank you so much to LBPHacker for making this colour parser work so much better!

See OP for download link and developer documentation.
theoriginalbit #325
Posted 08 November 2013 - 05:13 AM
Major OP cleanup performed…

Should be easier to find my programs.

Also updated information on a few programs that I found were outdated.
theoriginalbit #326
Posted 15 November 2013 - 08:28 AM
New code snippet. "Peripheral search". Using this in a project with NeverCast, and its just too good not to share. See the OP for more details.
Edited on 15 November 2013 - 07:29 AM
theoriginalbit #327
Posted 21 November 2013 - 10:54 PM
New code snippet. "Dynamic Function Invocation on Lua Objects". Made by Symmetryc and improved by myself, decided to share this as well as it is very useful. See OP for more details.
Marikc0 #328
Posted 22 November 2013 - 03:51 AM
Does the turtle excavating program still work? I came back a short time later to find the turtles stopped with the ender chests a few blocks nearby each turtle.
theoriginalbit #329
Posted 22 November 2013 - 04:25 AM
Does the turtle excavating program still work? I came back a short time later to find the turtles stopped with the ender chests a few blocks nearby each turtle.
Currently no, it works, and is more fuel efficient, but sadly there is the enderchest bug :(/> What I thought was an edge case seems to be occurring more often and honestly I forgot to fix it when I was told about it months ago. I'll have to fix it after my last exam for uni in 4 days.
Edited on 22 November 2013 - 03:25 AM
theoriginalbit #330
Posted 04 February 2014 - 07:37 AM
Edited the custom read function to make use of the upcoming paste event, anyone using the pre-release let me know if you come across any bugs.

EDIT: Oh also, finally got a new web host, website is up, content will be not far off (link in my signature)
Edited on 04 February 2014 - 06:40 AM
theoriginalbit #331
Posted 12 February 2014 - 06:08 AM
after helping surferpup quite a lot in Ask a Pro I've gone and updated the Coroutine-Management-System (CMS), its now smaller and less buggy (let me know if you do find any), see OP for download links.
theoriginalbit #332
Posted 18 March 2014 - 03:00 PM
New! ccConfig v3.0!

* Better colour parser (again). Less loops! Same value support;
* Minor efficiency improvements;
+ Config Objects are now better1;

1 Now uses my 'Dynamic Invocation on Lua Objects' snippet, meaning that the following function calling is supported: config.getString("foo"); or config.getString(config, "foo"); or config:getString("foo");

…more to come…

See OP for download link and developer documentation.
TheOddByte #333
Posted 18 March 2014 - 04:26 PM
Nice that you added that to the ccConfig API! :D/>
I have a small suggestion for your read function, The ability to write text when the text length is equal to zero, Kinda like in search bars if you know what I mean :P/>
theoriginalbit #334
Posted 18 March 2014 - 11:34 PM
I have a small suggestion for your read function, The ability to write text when the text length is equal to zero, Kinda like in search bars if you know what I mean :P/>
hmmm I have considered implementing placeholder text, the only problem I foresee with this is the obvious lack of a user being able to distinguish it when not on an advanced computer
TheOddByte #335
Posted 19 March 2014 - 03:39 PM
hmmm I have considered implementing placeholder text, the only problem I foresee with this is the obvious lack of a user being able to distinguish it when not on an advanced computer
Hmm? How do you mean? And I hate it when I can't find the right words.. ( I'm talking about the word(s) placeholder text :P/> )
I created some code just to test to do this myself
This is resultScreenies


FYI, Advanced computers to the left &amp; regular to the right

Code

local mRead = function( _color, _placeholder, _placeholder_color )
	local text, _x, _y = "", term.getCursorPos()
x, y = _x, _y

local function redraw( _num )
		if #text > 0 then
   local num = _num or 1
   term.setCursorPos( _x, _y )
			for i = 1, #text+num do
				term.write( " " )
			end
			term.setCursorPos( _x, _y )
pcall( term.setTextColor, _color )
			term.write( text )
			term.setCursorPos( x, y )
		else
			term.setCursorPos( _x, _y )
pcall( term.setTextColor, _placeholder_color )
			term.write( _placeholder )
			term.setCursorPos( _x, _y )
		end
end

	term.setCursorBlink( true )
	while true do
   redraw()
		local e = { os.pullEvent() }
		if e[1] == "char" then
   if #text == 0 then
   term.setCursorPos( _x, _y )
   for i = 1,#_placeholder do
   term.write( " " )
end
term.setCursorPos( _x, _y )
end
			text = text .. e[2]
x = x + 1
		elseif e[1] == "key" then

			if e[2] == 14 then
   if #text > 0 then
					text = text:sub( 1, #text - 1 )
   redraw( 2 )
   x = x - 1
end

			elseif e[2] == 28 then
				term.setCursorBlink( false )
				return text
			end
		end
	end
end

term.clear()
term.setCursorPos( 1, 1 )
term.write(" > " )
local inp = mRead( colors.white, "Search", colors.lightGray )
print("\nReturned: " .. inp )
This is just some shitty code I threw up, But it works for a simple example :P/>
I'm wondering what you mean with the user not being able to distinguish it when not on an advanced computer
Edited on 19 March 2014 - 02:44 PM
theoriginalbit #336
Posted 19 March 2014 - 10:37 PM
-snip-
What I mean is that the user may struggle to distinguish between real text and placeholder text when on a Normal computer… when on an advanced computer you can grey out the text, but that's not the case on a normal computer.
Blue #337
Posted 18 April 2014 - 04:46 PM
I love CCpresenter :)/> actually its one of my most favorite programs
theoriginalbit #338
Posted 18 April 2014 - 04:54 PM
I love CCpresenter :)/> actually its one of my most favorite programs
thanks, I'm glad that you like it, wasn't too sure if anyone really used it.
koslas #339
Posted 20 August 2014 - 04:11 PM
I am using the code you told me to use, and if someone presses an arrow key, it crashes saying
startup:155: attempt to get length of nil
Line 155 is of my program, is this line in your read function
elseif historyPos == #_history then
Edited on 20 August 2014 - 02:12 PM
theoriginalbit #340
Posted 20 August 2014 - 04:59 PM
uh, are you sure you've not edited my code? the statement

elseif _history and code == keys.up or code == keys.down then
would prevent it from ever getting to the line you're saying is erroring.
koslas #341
Posted 20 August 2014 - 05:19 PM
I'll pm you the link to my pastebin code, as I don't want the program public yet
Engineer #342
Posted 21 September 2014 - 01:06 PM
I am wondering why that logging API of yours isnt in this thread. I found it on github, but this is just a heads up that it isnt here (intentionally or not :P/>)
theoriginalbit #343
Posted 21 September 2014 - 01:44 PM
I am wondering why that logging API of yours isnt in this thread. I found it on github, but this is just a heads up that it isnt here (intentionally or not :P/>)
mostly due to the fact I forgot :P/>
Endergreen117 #344
Posted 10 December 2014 - 03:31 AM
What happened to your website? Also, where is CCTube?
theoriginalbit #345
Posted 10 December 2014 - 05:13 AM
What happened to your website? Also, where is CCTube?
regarding my website, its a case of I've had better things to do and I find web "development" boring. I will eventually get around to completing it though. as for CCTube, it has been dead for a very long time, well over a year.
Endergreen117 #346
Posted 10 December 2014 - 08:02 PM
Dang, that's what I thought. Is there any chance of you updating it? Or at least posting the most recent version?
theoriginalbit #347
Posted 10 December 2014 - 11:49 PM
Dang, that's what I thought. Is there any chance of you updating it? Or at least posting the most recent version?
I don't have the old pastebin anymore and it was broken at best. the "most recent version" was a total rewrite that was still a W.I.P. and all server/account based and those servers don't exist anymore.
Creator #348
Posted 22 February 2015 - 05:56 PM
Hoe do you put custom names to the spoilers?
KingofGamesYami #349
Posted 22 February 2015 - 06:13 PM

[namedspoiler="Name Here"]
content
[/namedspoiler]

Name Herecontent
Creator #350
Posted 22 February 2015 - 09:24 PM

[namedspoiler="Name Here"]
content
[/namedspoiler]

Name Herecontent

Thanks ;)/>