1. you can define keywords, operators, grammar rules, general concepts endorsed by the language, etc.
2. do your worst
3. we are starting from the ground up, so it is prohibited to import complete keyword sets from an existing language (no OK, ALL JAVA KEYWORDS, THREAD OVER, HURRRRRRRRRR)
4. and we need a name for this language as well
Name:
Anonymous2007-07-06 19:48 ID:9Ovxq4eu
>>79
You know, this makes some sense, actually. It enforces the principle that variables with larger scopes should have more descriptive names.
you must start EVERY line of programing with four arrows >>>>
and comments are written like this:
/BEGINING_OF_A_SINGLE_LINE_COMMENT/this is a comment/ENDING_OF_A_SINGLE_LINE_COMMENT/
Name:
Anonymous2007-07-06 21:16 ID:APpULTHM
and certain commands should only work 27% of the time XP
Name:
Anonymous2007-07-06 21:47 ID:HwxuKK9s
cbf to read entire thread
forced indentation of code is a must have
Name:
Anonymous2007-07-07 9:00 ID:BBvas4ZD
No variables, Instead, you must allocate memory addresses manually. Additionally, you can only allocate data to one byte at a time.
Here's what I got:
* calls a numbered primitives.
@ calls a value on the stack.
[ defines a function.
~ within a function defines arguments.
$ calls a function.
^ is an if statement. In needs to be followed by at least one [] block.
% is else.
*0 = eqauls
*1 = plus
*2 = minus
*3 = mult
*4 = div
*5 = mod
*6 = ==
*7 = >
*8 = <
*9 = ||
*10 = &&
I once implemented this. It's insanely easy and really satisfying.
Factorials:
!this defines a function on the 0 place on the function stack with the ability to calculate factorials
!there are already no need for parens because it's polish notation
[ 0 ~0 ^(*10 @0 0) [ # 1 ] % [ # *3 @0 $0 *2 @0 1 ] ]
!this is how you call it
$0 5
returned 120
Name:
Anonymous2010-06-26 15:42
>>47
A programming language requires stacks to be Turing compatible.
No language is complete without an interpreter!
Programs are given names that are capital Cyrillic letters. Examples: ф х ц ч ш
The interpreter requires all instructions to be ASCII binary text and since no program can be over 100 characters (800 bits), a call to another program is given by ~H which means "Stop running this program immediately, copy the stack, etc and start running Program ц". These two features should increase complexity.
Name:
Anonymous2010-06-26 16:50
The completed executables have 2gigabits of header that is TOTALLY USELESS
Name:
Anonymous2010-06-26 16:56
>>103
Don't make it useless, make the header contain the program code repeated 9 times so that you can check whether data was corrupted before executing.
>>105
I was a reader of esolang after Malbolge was invented but before any programs were written for it. This thread started when Malbolge was 8 years old and the most interesting program anyone was able to produce was a broken version of cat. When it comes to essies Ben is a bit of a genius.
You could conceivably make a worse language, but I doubt it will be anytime soon that someone makes one that is any of the following:
- not a mere derivative
- is worse in a way that is interesting
- creates that same kind of wasteland that needs crossing
Name:
Anonymous2010-06-26 20:34
MASO
A new language for modern computing.
I'm going to start off with some core features and their justifications:
1) ALL IDENTIFIERS MUST BE AT LEAST 20 CHARACTERS
Now that even consumer computers have gigabytes of memory, there is no justification for short identifiers. Everyone knows that code is only written once but read many times, so this rule eliminates confusing variable names like 'i' and 'x'.
2) EVERY LINE MUST HAVE A COMMENT
Self-explanatory.
3) EACH COMMENT MUST BE AT LEAST 30 CHARACTERS AND END WITH A PERIOD
This is to discourage programmers from circumventing rule (2) by making comments that only contain, say, a space.
4) EVERYTHING IS AN OBJECT
Unlike, say, C++, there a no 'primitive' types. This simplifies container classes, eliminates issues with boxing, etc.
5) EVERY OBJECT IS A DICTIONARY
Similar to Javascript and Lua, this simplifies the language implementation and provides run-time flexibility.
6) EVERY OBJECT DICTIONARY IS AN XML STRING
People already know XML and may already have editors that support XML. Performance might be a little worse, but performance matters for only around 10% of any given program and, as we all know, that part is written in C++ anyway, right?
7) ALL BINARY OPERATOR EXPRESSIONS MUST HAVE PARENTHESES
Should (a ^ b << c) be interpreted as ((a ^ b) << c) or (a ^ (b << c))? Just a few extra parentheses eliminate operator precedence mistakes.
8) THERE IS NO EQUALITY TEST OPERATOR
Rather than have confusion between '=', '==', ':=", etc, the equality test operator ('==' in C) is eliminated. If you want to see if A and B are equal, check if (!(A < B) && !(A > B)).
9) ALL OBJECTS MUST SUPPORT THE '<' AND '>' OPERATORS.
This is because of rule (8). Because operator overloading can be misused, overloading any other operators is prohibited.
10) ARRAYS ARE ONE BASED
Non-programmers might be involved in the production process and they are used to arrays that start at one. See Lua for additional reasons why this is a good idea.
--------------------
Operators and syntax
--------------------
1) OPERATORS
+, -, *, /, ^, and, or, not
note: to make the language more orthogonal, 'not' is a binary operator
2) FLOW CONTROL
if else, while, sometimes, don't
note: something in a sometimes block will happen some times and not others
note: something in a don't block will never happen, even if the same statements
appear elsewhere outside of a don't block
3) OTHER KEYWORDS
new, delete, start, kill, injure, maim
5) BLOCKS
There some controversy in the programming language community about significant whitespace. In MASO a compromise is reached: blocks must begin with a '{', but afterwords use significant whitespace (no '}' is needed).
6) STATEMENTS
Statements end with a '.', or a '?' or '!'. If they end with a '?' or '!' they can be referred to as "questions" or "exclamations".
--------------------
Example code
--------------------
#include <stdio.h>
There are only two usable variables: variable_number_one and variable_number_two. You have to use the stack for everything else. Function names can only contain numbers, and numbers are written in octal as "one hundred and fifty seven". It's strictly object oriented, and classes can't have more than two member functions and three variables.
>>108
Bump from oblivion for this epicnessnessness!
[implement-green-text]
>sitting in the office
>browsing /prog/
>come across this post
>laugh out loud uncontrollably several times
>no one in the office does programming
>can't explain what is so funny about a seemingly mundane subject
>more uncontrollable laughter
[/implement-green-text]
The code must be sung. Syntax and definitions revolve around lyrics. Functions are choruses, the verses are the initial running thread, programs are called songs, et cetera. But what to call it. VoiceCrack?