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

[Programming Language] Kalbex V1.0

Started by NeptunasLT, 12 May 2013 - 03:35 AM
NeptunasLT #1
Posted 12 May 2013 - 05:35 AM
Kalbex V1.0

How to Start?
1)Download kalbex
2)Install Kalbex
3)Done :P/>

How to use Kalbex?
1)create new file
2)Type this code to use kalbex:
os.loadAPI("/krom/kalbex")
3)You are done and file loaded kalbex Programming Language.

Kalbex Command List:

kalbex.writeln("TEXT") – prints text
kalbex.wrt("TEXT") – writes text
kalbex.textcolor(colorcode) – sets text color
kalbex.textbackcolor(colorcode) – Sets text background color
kalbex.clrscr() – Clears screen
kalbex.getosv() Gets CraftOS version and prints on screen
kalbex.shutdown() – Shutdowns Machine
kalbex.reboot() – Reboots machine
kalbex.getkv() – Gets Kalbex Version

Kalbex Included:
KOS [Comming]

You are free to use it on your own OS but you can't change any thing in /krom/kalbex or /krom

Download:
pastebin get PvjgMj57 /skalbex

Credits:
UNIXUSER400 krom

In new version:
Kpromt
Drivers (For Example Keyboard)
diegodan1893 #2
Posted 12 May 2013 - 09:07 AM
And what is the difference between this and lua?
NeptunasLT #3
Posted 13 May 2013 - 03:12 AM
And what is the difference between this and lua?
1) Commands
2) What to do (with kalbex you can use wait for user input etc.)
briman0094 #4
Posted 13 May 2013 - 03:29 AM
Commands…as in the things you can already do in Lua? Stop trying to pull this off as some "programming language." It's aliases for other functions. I vote to lock.
theoriginalbit #5
Posted 13 May 2013 - 03:32 AM
Download:
pastebin get PvjgMj57 /skalbex
Why a link, that just downloads another link…………….. :(/>

1) Commands
2) What to do (with kalbex you can use wait for user input etc.)
1) What exactly do you mean by "commands"?
2) What? So much confusion with that statement o.O
3) Its just a wrapper around existing functions, so it just adds more overhead to programs, maybe if more was being done, but you're doing just a simple one line call in each function.
Frederikam #6
Posted 13 May 2013 - 03:56 AM
  1. This is an API, not a programming language.
  2. You got 31 lines of code. Lua got roughly 20000.
  3. Most of these functions does nothing else than to refer to a function from cc/Lua.
  4. It's easier to just call a function from cc/Lua directly.
  5. It's completely useless.
  6. It's called functions; not commands.
diegodan1893 #7
Posted 13 May 2013 - 11:13 AM
And what is the difference between this and lua?
1) Commands
2) What to do (with kalbex you can use wait for user input etc.)
I meant, why should I use kalbex.writeln("TEXT") instead of print("text")? It's faster to write and more efficient. This API is completely useless, but you can expand this API and it will be more useful. For example, you can create a write function like kalbex.write("text", x, y, textColor, backgroundColor) instead of wrapping Lua functions.
Dave-ee Jones #8
Posted 16 May 2013 - 02:18 AM
I am just wondering…but what is the difference between this and the term and OS API?
There is none, it is just copied.

EDIT: I wonder what will happen with the KOS? Why not just use the term and textutils APIs instead? That way we don't need to install this…API.
svdragster #9
Posted 18 May 2013 - 04:38 AM
This is really no Programming language :(/> It's an API, which only uses different names for same stuff.
But of course, here is a thing you could improve.

At the top of your program you have in line 2

-- Kalbex Version: V1.0
and at the bottom

function getkv()
  print("Kalbex Version: V1.0")
  print("Coded by UNIXUSER400")
end

Here you could make it easier:

version = "V1.0"
author = "UNIXUSER400"
function getkv()
  print("Kalbex Version: "..version)
  print("Coded by "..author)
end

Of course this isn't really necessary in a short code, but in longer programs this is useful so you don't have to write everything over and over again.
TheGamerOfAction #10
Posted 19 May 2013 - 03:59 AM
Like many people, I believe these 'Commands' are just aliases for actual Lua functions. You could, however, make them more sophisticated than the Lua functions, as diegodan1893 has already suggested.
jesusthekiller #11
Posted 21 May 2013 - 04:02 AM
For example, you can create a write function like kalbex.write("text", x, y, textColor, backgroundColor) instead of wrapping Lua functions.

Look at my cPrint API :3