Re: Progamming language for hackers?



On Mon, 10 Oct 2005 17:33:13 +0200, "[Jongware]" <sorry@xxxxxxxxxxx>
wrote:

>> We have a huge (dictionary kind of) sorted list of
>> all the functions and function alias names.

That was describing / showing how the compiling process is done so
that all unwanted headers are quickly eliminated. That list can
contain an viruslly unlimited amount of uniformally structured
functions.

The strengt of that function protoype structure is that is very
expressive and easy to learn - AND if a punch of coders use that, they
all would know how the fellow coder would name the functions if that
existed. Thus t3d allows you to use fucntions made be others and you
instanly also know what that function would do. t3d function
prototype leraves very few alternatives(room for error); a helpful
(function name) spell checing IDE and given alias names alloy you to
quicly "guess" the real name of the function.

Well think about alternatives with other languages. e.g C standard
committee has given you a hundred or so named functions which they
promise always do the thing which you expect them to do.

t3d can gives you a virtually unlimited number of easy to use
functions.

>Taken from the web site:
>If( t3d_environment_IS_TOYOTA_n_LEXUS)
>{
> t3d_open_ROOF_WINDOW();
>}
>else
>{
> t3d_write_CONSOLE("Not a Toyota LEXUS");
>}
>
>... this gonna be in your standard library?
>But I think I understand this programming language! If I want to create a
>game, I'd write:

Almost but not quite. That Toyota example was for demonstrating a
principle of t3d not being limited overly simple tasks, or
environments. But if one has written a function which would open a car
roof window, that function would be called like that.

There are a few hundred much more realistic (doable) functions listed
in: http://www.tele3d.com/t3d/more_funcs.txt

for example:

t3d_convert_file_Rfile_OGG2WAV
and
t3d_convert_file_Rfile_WAV2OGG_BITRATEXXX
and
t3d_convert_byte_barray_Rbarray_2BASE
and
t3d_convert_file_Rfile_COMPRESS_n_ZLIB
and
t3d_measure_dirpath_SIZE
and
t3d_measure_file_IS_ACCESS_n_READ
and
t3d_remove_Rbarray_FIRST_n_WORD

You probably understand directly what thos functions do- don't you?
and you could probably code each of those functions but making some of
those would take a lot of time.

What if I'd say that I have those functions and like to share those
with you. Of cause you would not need those now, but who knows once
you need to convert music files, perhaps you'd like to to the
conversion by just adding a single command to your C / C++ code.

>do
>{
>t3d_start_game_DOOM4 (ENVIRONMENT_USE_1600X1280);
>t3d_show_score();
>} while (t3d_environment_IS_NOT_PRESSED_YET(QUIT_BUTTON));
>
>with the added bonus that the last line can also read:
>... }while (t3d_environment_???_???_????????_?????(QUIT_BUTTON));

No, no, no: t3d function naming in nutshell:

1) think what you want to do - formulate an easy sentence about it
e.g. I like to "(main-verb)aaa the (datatype) bbb and I'd like to have
the result written in to (object)Rccc, in addition I want the aaa to
be performed (adverb1)THIS_WAY1 and (adverb2)THIS_WAY2


For example if you want to add a number 5 to the end of a file, your
sentence would be

I would like to "add_int_Rfile_APPEND"
or
I would like to "add_int_Rfile_2END"
or
I would like to "write_int_Rfile_ADD"
or
I would like to "write_int_Rfile_APPEND"
or
I would like to "write_int_Rfile_2END"

Easy and that only lacking the lang sign t3d e.g. prototype.

long long t3d_add_int_Rfile_APPEND(int num);
***********************************************************
The ONLY t3d main-verbs (in english) are:
add, ai, calculate, close, convert, create, crypto, environment, find,
measure, move, open, read, remove and write
***********************************************************
so you can't use show or start, but would need to logically thing the
nearest alternative e.g. for "show" it is likely "write" and for
"start" it is likely "open" OR "environment" in combination with a
world START or BEGIN or PLAY. e.g.

t3d_environment_DOOM4_n_START
(+some alias names as shown above)

to show the score (in some fui window you write
t3d_write_long_Rgobject_Rgtable
***********************************************************
The ONLY t3d datatypes are:
byte,wbyte,int,long,double,bignum,barray,warray,iarray,larray,darray,bigarray,time,table,url,file,dirpath,gtable,gobject,process
***********************************************************
so the word game must be replaced with something which is closest to
it, how about "file" or "process"

For changing the screen resolution
You will likely be able to use commands
function prototypes first measuring:
long long t3d_measure_Rint_SCREEN_RESOLUTION_n_VERTICAL( int
vertical);
for horizontal:
long long t3d_measure_Rint_SCREEN_RESOLUTION_n_HORIZONTAL( int
horizontal);


Then changing the rezolution:

if ((vertical != 1280) && (horizontal != 1600)

t3d_environment_SCREEN_RESOLUTION_VERTICALXXX_HORIZONTALXXX("1280,1600");


last example uses X parameter for inputting the data, use of X
parameters is show at the end of that (2 pages) of t3d primary
documentation. Ok I attach it to the end of this post so it can be
used as a unchangeable reference material.

>
>[jongware]
>--Not counting myself as a hacker, BTW. Just a programmer.
>Barely.
>

Thank you for trying Jongware. I know it is hard to accept radical new
things. I am sure that you can now understand the principle
construction of the t3d function right. If you still dont believe the
t3d is the easiest most powerful language ask me how a certain thing
would be doable using t3d & according to lang ref below

Regards
Juuso Hukkanen
(to reply by e-mail set addresses month and year to correct)
"t3d programming language" and the structure of t3d function prototype
are trademarks of Juuso Hukkanen.

--
The t3d programming language (rererence for browserless):

1. t3d programming language includes C programming language (C99),
except its famous "avoid-using-this-functions".
2. t3d programming language adds to C modernization in terms of;
(a) support for environmental things,(b) use of libraries and external
utilities, (c) its evolutive development by the community, (d) safe
strings, (e) garbage collection, (f) networking, (g) improved datatype
definitions, (h) GUI, (i) multi-threading, (j) support for handling
standardized file types, (k) the use of t3d function prototype, (l)
t3d can be used in applications, (m) scripts and (n) web-programming.
But anyway most C is also t3d and most of t3d is also C.
3. At the beginning GCC can be used as t3d compiler.Portability is
to be achieved with the #ifdef - #elseif preprocessor defines. C++
support is to be obtained with the use of "extern C" definitions.

The structure of t3d function prototype

***********************************************************
langsign_mainverb_aaaaaa_bbbbbb_cccccc_dddddd_Reeeeee_
ADJECTIVE_PART1_n_ADJECTIVE_PART2_ARG1XXX_ARG2XXX_ARG3XXX
***********************************************************

1. Almost all t3d - functions are expected to have many alias names
(even hundreds). The user is expected and required to find one of
suitable aliases, using logic and the help of IDE editor, personal
memory / routine or a function /internet search engine or native
language.
2. t3d is not a rigid language. Any legal formulation of a function
name, which does helps the user to do tasks, is ok.
3. t3d programming can be performed using most of the worlds
written languages. Stable translations are to be used for reserved
datatype words and main verbs within each language. t3d function names
can be written using Unicode.
4. When t3d-structurated function prototypes are to be used within
other languages than t3d, the use of t3d function prototypes may
require using some additional input parameters.
5. t3d programming language and the structure of t3d function
prototype are trademarks of Juuso Hukkanen. Fair use of both
trademarks is allowed within all programs which are licensed using
Charity Open Source License.


Training examples 1

What does:

1. t3d_measure_barray_LENGTH
2. t3d_convert_file_Rfile_GSM2WAV
3. t3d_convert_Rfile_READ_ONLY
4. t3d_calculate_iarray_Rdouble_STD_DEVIATION
5. t3d_add_byte_Rbarray_RANDOM_n_END
6. t3d_environment_barray_SET_KEYBOARD_n_LANGUAGE


Training examples 2

How to:

1. Change the text contents of a text file to uppercase (English
text)
2. Compress a file using RLE compression algorithm and put the
compressed content to an another file
3. Change a file format from JPG to GIF
4. Check if a number 234524 is a prime number
5. Calculate how many times a word "hello" occurs in a file
independently of the case of letters
6. Check whether a given text string contains a valid internet
domain name


Return value:

All t3d functions only return a 64bit signed integer number. All
negative return values indicate errors each with respective error
numbers. A returned zero means zero, all returned positive values do
mean a meaningful correctly calculated numeric answer. In function
which answers to yes/no kind of questions returned 0 = NO and 1 = YES.


Language identifier (langsign):

It is possible to implement t3d programming within programs written
using many other programming languages; such as C , C++, PHP, Pascal,
Python, Lisp, Cobol, Perl etc. The language identifier (langsign) is
used in identifying the host programming language used inside the t3d
structured function. The function contents must naturally be written
using a particular host language, but one t3d structured function
written with Ada should perform the same task as a similarly (except
the langsign) named with host language PHP. Examples of used language
identifiers: t3d => t3d, C (also C++) => c3d, Pascal => p3d, PHP =>
ph3d, Lisp =>l3d, COBOL => CO3d, Ada => a3d, Perl => pe3d

Main verb (mainverb):
There are 15 main verbs in t3d language. The mainverb defines the main
category of action which the function will perform. Possible mainverbs
are: add, ai, calculate, close, convert, create, crypto, environment,
find, measure, move, open, read, remove and write.


Inputting (datatype) elements-part (aaaaaa_bbbbbb_cccccc_dddddd):

Each of the six letter strings (a-d) represents a data-parameter (of a
certain datatype), which carries a parameter into the function. Order
of inputting parameters is decided (in priority order) as follows (1)
obvious direction <=> param1 goes-to param2, (2) age <=>
first_young_param then_old_param, (3) size <=>
first_smaller_data(type) then_bigger_data(type), (4) alphabetical
order (aaa_param before bbb_param). There are 20 different datatypes
in t3d; byte, wbyte, int, long, double, bignum, barray, warray,
iarray, larray, darray, bigarray, time, table, url, file, dirpath,
gtable, gobject. Each datatype can carry different kind of data to /
from function.


Datatype Descriptions:
Datatype
Description
byte Size 8-bits; can contain values 0-255
wbyte Size 32-bits; can contain Unicode text (UTF-32)
int Size 32 bits; can contain signed integers
long Size 64 bits; can contain signed integers
double Size 64 bits; can contain floating point numbers
bignum Size unlimited. Bignums are barrays containing a number as
text
barray An array consisting of bytes, (optional use of delimiters
included)
warray An array (for Unicode text(UTF-32)) consisting of wbytes (use
of delimiters allowed)
iarray An array consisting of integers (use of delimiters included)
larray An array consisting of longs (use of delimiters included)
darray An array consisting of doubles (use of delimiters included)
bigarray An array consisting of bignums (use of delimiters
included)
time High-resolution floating point presentation of seconds since
Jan 1st year 0 (00:00am)
table Like a SQL- table(rows, columns, headers); any datatype fits
into each cells
url Unique Resource Locator (internet address or any other exact
location)
file A (binary) file, max file length name is 4095 bytes
dirpath Max size 4095 bytes, identifier path to a
directory/folder
gtable GUI-window with build-in menu-tree structures. Carrier of
gobjects
gobject GUI-object (like an unit in CSS);defines appearance
and reflex-reactions of UI-units
process Semi-independent program within a program; can also be
a thread or external program


Result (data from function) - part (Reeeeee):
Also known as the R-parameter. The return value of t3d-functions is
always an integer type number, so when a t3d- function needs to things
to data in other datatypes, the results can not be returned as a
return value. The result field of a function is described by a capital
R. The datatype following the R will contain the result-data which is
returned back from the function. Result data will be written to a
datatype which is first given to a function using pass by reference or
equivalent techniques.


How to do (the main verb) - part
(ADJECTIVE_PART1_n_ADJECTIVE_PART2):
Also known as the n-parameters. As earlier said there are only 15 main
verbs in t3d. The main verbs of t3d do only define the rough action
but when that rough action is fine adjusted with some extra
parameters, the function is able to achieve very precise actions.
There can be max two adjective parts in each t3d structured function.
A character combination _n_ is used in separating the two possible
adjective parts. Words in adjective parts are written using capital
letters. Both adjective parts can contain one main verb action
defining parameter. Each defining parameter is to be expressed using
one or two words separated by underscore-characters. As an example
following are to be considered as legal single defining parameters:
SHARPEN_IMAGE, TRS_ROUTE, USER_SESSION, SPACE_SEPARATED,
EXTRACT_HIDDEN, RAM_AVAILABLE, THIS_USER, CPU, SET, LANGUAGE, LOCAL.
If a defining parameter contains the word "IS" (e.g. IS_VALID) the
function returns a YES or NO answer. There are two exception 'words'
which will not be calculated as a single word, first is "IS" (as a
yes/no question IS_something), a second word not-counted as a word is
"TO" (meaning "to something"). TO is to be always replaced with a
number 2, in order to highlight its special meaning. There may not be
an underscore letter between the number 2 and the other parts of SAME
verb defining parameter. Thus the following are legal single defining
parameters: INT2BARRAY, TEXT2IMAGE, TRANSLATE2, RENAME2, WAV2OGG,
MP32WAV, 2BASE, INT2ROMAN, IS_FILE_ACCESS, IS_SWEDISH The words which
are to be used within the verb defining parameters shall be in their
simplest singular form, but abbreviations which are familiar to most
of the programmers may be used such as INT,AES256,TAB,ID. The
adjective parts are priority arranged; 1) to follow similar order as
used for input datatypes, 2) secondly according to apparent
significance and 3) by alphabetical order. Examples of arranging order
(according to order given by datatypes) FILENAME_n_FIRST, (according
to significance) IS_ACCESS_n_WRITE (According to alphabetical order)
CPU_n_SPEED_MHZ.


Additional parameters a.k.a the X-parameters
(ARG1XXX_ARG2XXX_ARG3XXX):
In some cases the fine-adjustment of defining the main verb is not
enough or the parameters to function are too numerous for creating
easy to use function names. In those cases the X- parameters can be
used in feeding data accurately into the function. The max number of
X- parameters per function is 10. Each individual X-parameter is
identifiable by having XXX at the end. When using the function, the
X-parameters are to be inserted after the R-part (result parameter
outputting data from function). The order of these additional
parameters is the same as they are listed in function prototype. For
example the following are legal X-parameters LEVELXXX, PASSWORDXXX,
WIDTHXXX_HEIGHTXXX, BITXXX,
SENDERXXX_RECIPIENTSXXX_SUBJECTXXX_BODYXXX, PRESSKEYXXX. The inner
mechanism for inputting the X-parameters into functions are like the
typical mechanism for inputting variable arguments (varargs) into
functions. X-parameters should not be utilized using pointer-
references to variables.

Now look again those previously shown training examples.

.