Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Æ Programming Language.

Name: Anonymous 2007-12-20 22:59

Programming language design.
Temporary name: Æ

0: Comments

# Comment
// Comment
/* Comment */
#include <stdio.Æh> // Preprocessor, include normal function such as print, etc.
// Code layout is similar to haskell. Code here includes {, }, and ; for no reason.


1: Real Variable

Can only be integer pointers.
Starts with a character or underline, can continue with everything among [a-zA-Z0-9_æøåäöüëâôûêáóúéàòùèçþ®ßðЪºetc.], generally no line-noise except _.
Are defined as this:
  global_variable = 3905671;

2: Variables

Starts with $. Creates a real variable with the variable name specified prefixed with v_.
The name can contain everything a real variable can continue with.
Data types are per default whatever you use them as.

$var = "Hello there.";    // v_var == <location to 'db "Hello there.", 00h' in memory>
$var = 19;        // v_var == <Location to where 19 is stored in memory>;
$var = (19, "Hullo");    // A linked list, v_var is a pointer to the first element, or something like that.
$var = [19, 2 => 20];    // An associative array.
$var = { ++$i; }    // Compiled machine code.
// and so on.

v_var2 = v_var;
$var2 = "sadf"; // $var == "sadf";

$var1 = "lulz";
$var2 = $var1;
$var2 = "Hey"; // $var1 == "lulz"


3: Keywords:

Starts with a %.
Is not a real variable.


%if ($i == u) {
    // Code
} %elseif (%isset $whatever) {
    // code
} %else {
    // Code
};

Generally the same with %do, %while, %goto, %foreach, %static, etc. as with other languages.
%private for a variable or label that should be inaccessible to the outside.

4: Functions

Starts with !. Creates a real variable with the function name prefixed by f_. The name can contain the same as variable. f_functionName is a pointer to where the function is defined in memory. If you give it an argument a variable local to that function named v_1 will point to the location in memory where the argument existed. You can rename the variables by defining the function as !func($var_1, $var_2, $_etc).


!function = {
    !print $1;
    %return;
}
%void !func($string) = {
    !print $string;
    !print "The second variable is contains: " ++ $2 ++ " and is located at " ++ !i2s v_2 ++ "\n"
    %return;
}
%string !i2s(%int $int) {
    // Code for converting an integer into a character array
    %return $string;
}
%int !main = {
    !function "Hello, world!\n";
    !func "Hello again, world!\n", "lulz";
    %return 0;
}


5: Labels

Generally just the same as functions.

!func(%int $i) = {
    !label = {
        !print i2s($i) ++ "\n"
    }
    --$i;
    %if ($i != 0) {
        %goto f_label;
    }
    %return;
}
!main = { !func 10; %return; }


6: Variable searching order.

When attempting to access the variables it first searches local real variables, local variables, global real variables, and global variables in that order. Same with functions.

//You can access the above function as a string of bytecode thusly:
!print !escape $f_func;

//The first line of it:
!print !escape $f_func[0];

//The contents of the label !label:
!print !escape $f_func[label];

//First line of !label:
!print !escape $f_func[label][0];

You can also execute !label directly with !func.!label, but this would have resulted in an error because $i wouldn't have existed.


Etc.

7: Self-modifying code.

$f_func[0] could refer either to the first line, or if the first line is a code block
(as delimited by { and } when not using code layout to controll them), the whole first block
(from which you can select individual lines from again with $f_func[0][0])

Example:
Replace the !main function in the example in section 5 with this:

!main = {
    !func 2;
    $f_func[1] = { ++$i; }
    !func -2;
}


Should print:
2
1
-2
-1


8: Misc.

!main = {
    !multithread f_func1 f_func2;
    // Inline functions:
    $result = !{$1 = "<b>" ++ $1 ++ "</b>"; return $1; } "Useless...";
}


9: And so?

A) Expand with objects, quajects, inline-assembly, superoptimizing compilers, a ton of libraries, etc.
B) Write kernel that uses live code synthesis for lightspeed performance.
C) Be hailed as the person who freed computers from their prevoius speed limits.
D) Watch as a self-modifying AI takes over and destroys the world.
E) ???
Æ) Profit!

10:
Influences: C, Assembly, Perl, Haskell
Explaination for potential suckage: I'm 18 years old and have absolutely no education.

11:
Discuss.

Name: Anonymous 2007-12-22 2:38

>>38
Not in Æ, apparently.  It's OMG LOW-LEVEL OPTIMIZED!!!!

Name: OP 2007-12-22 3:06

>>41
Yeah, to switch functions you do:


!foo = {
    !print "This is foo\n";
}
!bar = {
    !print "This is bar\n";
}
f_foo ^= f_bar;
f_bar ^= f_foo;
f_foo ^= f_bar;

!foo; // Prints "This is bar"

Name: Anonymous 2007-12-22 5:07

>>42
less of the ! please.

Name: Anonymous 2007-12-22 5:20

and please tell me what can you aompilish with this that you couldn't do with C or any other language without that !'äöäöåðªšðŋđħđħŋđđðš€łðšªđŋđð faggotry which you don't recognize as a line noise?

Name: Anonymous 2007-12-22 5:38

>>44
No, !, %, and $ are the line noise. That other stuff is just an example of the allowed set of characters: we can write umlauted stuff, Danish, Icelandic (five times), quantum physics-speak, the IPA, and whatever ª is.

Name: Anonymous 2007-12-22 5:44

>>43
$foo = {
    !print "This is foo\n";
}
$bar = {
    !print "This is bar\n";
}
v_foo ^= v_bar;
v_bar ^= v_foo;
v_foo ^= v_bar;

!v_foo;


Better?

Name: Anonymous 2007-12-22 6:21

>>46
why do you need ! infront of functions you useless cunt.

Name: Anonymous 2007-12-22 6:25

>>46
And you're getting mixed up in your own shitty language.

v_foo is an integer pointer (>>1) so trying to use it as a function wouldn't work.

HURF DURF

Name: Anonymous 2007-12-22 6:32

>>47
So they are treated as functions?
Same reason you need those pesky parentheses after a function in C, I would guess.

Name: Anonymous 2007-12-22 6:40

>>49

!print "This is bar\n";
as opposed to
print "This is bar\n";
?

lolurite this language is awesome

I'LL GET GUIDO ON IT ASAP.

Name: Anonymous 2007-12-22 6:58

>>48
Uhm, no. Read section 6 again.

>>50
In the case of
print getNumber "pi";
It would be a lot harder to figure out if getNumber was a variable or a function.

Name: Anonymous 2007-12-22 7:09

>>51
(print (getNumber "pi"))

S-expressions > ambiguous precedence expressions

Name: Anonymous 2007-12-22 8:13

Why are people still responding to an obvious troll?

Name: OP 2007-12-22 8:30

Interesting topic, I guess.

Name: Anonymous 2007-12-22 11:57

>>53
Are you saying there are non-troll threads in /prog/?

Name: Anonymous 2007-12-22 18:01

>>55
I'm saying that this thread is absolute garbage.

Name: Anonymous 2007-12-23 1:03

>>53,56
Not same people. I would know; I'm >>53.

Name: Anonymous 2009-03-06 9:53


Searching through it of   SQL itself and   Hurd is NO   problem at all   the clicks I   was not doing   any mistake in   the code 4   write an exploit   for it OH   yeah you use   JavaScript for anything   more than a   exe currently am   just using gcc   in a linux   and a Windows   environment and please.

Name: Anonymous 2009-03-06 11:14

The rest was history   It took me   two weeks to   get a grasp   on Python before   that so you   are not asexual.

Name: Anonymous 2009-03-06 12:46

The best programming font!

Name: Anonymous 2010-11-13 17:58

Name: Anonymous 2010-12-23 2:49

Name: barbour mens classic duffle 2011-12-01 22:44

There are many brands of <a href="http://www.barbourjackets-uk.org/"><strong>barbour fusilier</strong></a> in the market today. Each of the brand promises to bring out something new to the customers.

Name: Anonymous 2011-12-01 23:54

FUCK, why was this bumped? I'm so ashamed.

Name: Anonymous 2011-12-02 0:06

I'd like to add «Explaination for potential suckage: Hadn't slept for 48 hours, way too much caffeine, didn't know shit about aesthetics (still don't, though).»

Also, «The Ø Programming Language» should be posted in a year or five, with implementation this time.

Name: Anonymous 2012-07-15 4:20

Is there a compiler for this yet?

Name: Anonymous 2012-07-15 5:02

>>67
yes, the compiler is implemented in bonerlang

Name: Anonymous 2012-07-15 5:24

Æbler.
Hånd.
Rødt.

Name: Anonymous 2012-07-17 12:39

[code]test

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List