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

Pages: 1-4041-

Æ 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-20 23:21

11: You best be trolling.

No line noise, then you take it into your head to prefix EVERY DAMN THING with a garbage character? Why do you have keywords? Why do local and global variables exist in different namespaces? Meditate on lexical and dynamic scoping. Self-modifying code is a laughable notion, the way you have conceived it. All you need is a way to substitute new code for old and you can build whatever "lol self modifying" thing you need, but in a more general and actually useful way.

Name: Anonymous 2007-12-20 23:31

>>2
I guess prefixing the keywords were overdoing it, but it just a very early draft.

It is in dynamic scoping, by the way, seeing how you can access the functions defined outside !main inside it.

It is a way to substitute old for new. Everything exists as a variable, a pointer, a function, and a label at the same time, and the prefix is the way you want to access it.

Name: Anonymous 2007-12-20 23:41

>>3
Halfway done meditating, never mind, I suck cock.

But it still is in dynamic scoping, tho.

Name: Anonymous 2007-12-20 23:43

>>1
lrn2language design.  Every single point besides 7 is just useless fucking syntax.  Your language has no new or useful (or presented) semantics.  And how is your "self-modifying" code different from just updating a first-class function variable?

Name: Anonymous 2007-12-20 23:44

This thread reeks of OMG OPTIMIZED!!! useless faggotry.

Name: Anonymous 2007-12-20 23:50

>>3 It is a way to substitute old for new. Everything exists as a variable, a pointer, a function, and a label at the same time, and the prefix is the way you want to access it.
Yes, it's a silly and extraordinarily limited way to substitute old for new. As I understand it (your example is unclear) this would provide a way to refer back to some named "entity" (and you need to define the meaning of "exists" more clearly) and modify it slightly.

a. This introduces an over-reliance on named temporary variables and one function per line style, both of which are hugely problematic.

b. The number of situations in which you want to modify just one small element of a procedure is vanishingly small. Normally this either breaks code or leaves you with unused code elsewhere in the procedure.

c. You can do the same thing and much more just by editing the procedure definition and replacing the whole thing.

Name: Anonymous 2007-12-20 23:56

>>7
d.  It is impossible to thread this language without transactional execution all over the place, slowing it all the fuck down to a grinding halt.

Name: Anonymous 2007-12-21 0:14

I can't believe how ugly your language is.

Name: Anonymous 2007-12-21 0:18

>>7

The only "real" variables are the ones without garbage prefixes.
However, to use the string, array, or whatever the "real" variable reference to, a $ is placed before it. Also, when you create a variable using $, the "real" variable is prefixed with v_, and when using that variable again $ falls back to the "real" variable starting with v_ after it has made sure there are no other. All done at compile-time.

a. Temporary variables? And no, you should be able to have as many functions as you want per line.

b. No, you should be able to change whole subroutines at once, and as long the input and output is abstracted, the middle shouldn't matter.

c. Yeah, but when I made it I thought of finding a way to edit running objects to be optimized for conditions unknown at compile-time.

d. Multiple threads on a single CPU is transactional execution anyway, right?


>>9
Thank you ^_^

Name: Anonymous 2007-12-21 0:25

I'm just glad OP isn't enough of a programmer to unleash this monstrosity upon the world.

Name: Anonymous 2007-12-21 0:29

Aww, come on, it's a lot better than COBOL at least.

Name: Anonymous 2007-12-21 0:51

>>12
I rather write COBOL.

Name: Anonymous 2007-12-21 0:52

>>10
d. Multiple threads on a single CPU is transactional execution anyway, right?

Wow, just wow.  GTFO and most likely underage b&.

Name: Anonymous 2007-12-21 1:10

>>14
The kernel selects the process which is going to run from a list or some algorithm, sets some kind of interrupt timer, loads in an image of the registers from when that process or thread last had control, goes to ring 3 and starts the "transaction" and lets it run until the interrupt fires, the transaction ends, the kernel regains control, stores the registers, and updates the process' location in the queue.. right?

Name: Anonymous 2007-12-21 1:12

>>15
That's not what "transactional" means.

Name: Anonymous 2007-12-21 1:35

>>16
Ah, sorry then, my English has a few holes.

As in, checking that one of the threads doesn't change a variable the other thread might be using? All the variables they touch would then be volatile and it would be the programmer's responsibility to make sure nothing fucks up, as it normally is.

When I wrote >>1 I had a pretty clear idea in my head on how the translation to assembly should go.

Name: Anonymous 2007-12-21 1:43

Alan Kay said that a lot of langugages are either an agglutination of features or a crystallization of style.

Name: Anonymous 2007-12-21 1:48

>>17
Okay, since you're too stupid to see the problem:

Thread 1 enters function Foo, is in the first clause.
Interrupt, context switch to Thread 2.
Thread 2 "self modifies" function Foo, does other shit.
Interrupt, context switch to Thread 1.
Thread 1's process counter isn't even on an instruction boundary anymore (lol x86) and you're fucked.

Name: Anonymous 2007-12-21 1:52

>>17
BTW, say you're all nice and compiled into your code layout, then "self modify" function Foo so that it now takes 300 bytes more code.  What do you do?  All of a sudden, "Foo" needs to point somewhere else.  You can't add dynamic language features to an assembly-based static compilation model.

Name: Anonymous 2007-12-21 1:57

>>20
Are you trying to say that dynamic languages can't be compiled to machine code and still retain their dynamic features?

Name: Anonymous 2007-12-21 2:04

>>20
Jumping around or pre-padding with noop?

Name: Anonymous 2007-12-21 2:21

>>21
No, I'm saying that dynamic languages can't be compiled so that other machine code can treat a dynamic variable as a simple typed value at a static pointer, especially when it comes to dynamic code.

Name: Anonymous 2007-12-21 2:22

Was this language designed to simplify the compiler as much as possible? Because when a language prefixes keywords with x, variables with y, functions with z, etc. it usually is the case.

Name: Anonymous 2007-12-21 2:45

>>24
Designed to be simple, very-low-level, and doing self-modification with ease.

In retrospect, the keywords are prefixed because I planned them to be be user-defineable and modifiable.

Anyway, MASSIVE FAILURE D=
++knowledge, I'll try again later.

Name: Anonymous 2007-12-21 2:56

>>23
Store the function's address in a known location, and update that reference to it when it changes. It's a very tiny bit of extra work to load that address before each function call, but it's standard practice and not a significant performance hit at all. The real issue with this method of modifying the code is syntactic. Perhaps if OP illuminates further it will make sense, but right now it looks like a more complex, less powerful version of explicitly replacing functions.

Name: Anonymous 2007-12-21 3:08

>>26
Right, but doing thunks like that eliminate the basic premise of OP's language where all variables each represent a single known pointer (presumably not dispatched), etc.

Name: Anonymous 2007-12-21 3:11

>>25
C is already simple and very low level.  The only self-modification that is of any use is 1) changing the operand of a single instruction to eliminate lookups and indirection, or 2) swapping out known small chunks of code to eliminate common dispatch.  Trying to make general purpose "self modifying code" language feature will not work, especially if you're talking about patching assembly language like that.  See Erlang for a great example of hot code swapping, and the various checks and conditions that were thought out in doing so.

Name: Anonymous 2007-12-21 3:26

I actually suspect >>1 is a troll, and that we have been trolled constantly. There are just so many things wrong with this premise, it's so stupid. Please, sage this thread.

Name: Anonymous 2007-12-21 3:50

>>29
Never attribute to malice what can adequately be explained by stupidity.

Name: Anonymous 2007-12-21 3:57

So it's perl with // instead of #

I salute your budding genius

Name: Anonymous 2007-12-21 4:20

Hey, OP.

Will the reference implementation be a from-scratch interpreter or will it be compiled to machine code?

Name: Anonymous 2007-12-21 5:13

>>1
CONGRATULATIONS YOU JUST REINVENTED LISP/TCL!

Name: Anonymous 2007-12-21 6:02

[quote][a-zA-Z0-9_æøåäöüëâôûêáóúéàòùèçþ®ßðЪºetc.], generally no line-noise except _.[/quote]

i lol'd

Name: Anonymous 2007-12-21 6:38

>>1
Biggest load of crap I've ever read. My advice to you would be to learn some more programming languages. I mean REALLY learn them, not just lol syntax learning.
Also read SICP - I'm not even trolling saying that, seriously, read it and see what you think then.
I'd suggest learning the following language as a MINIMUM before you start designing your own programming languages (not in any particular order): C, C++ (not C with classes, all those crazy features too), Common Lisp or Scheme, Haskell, Forth or Factor, Prolog, J, Icon.
Maybe not the most "useful" set of languages, but they are varied enough to show you whats available. Theres no point in designing yet another shitty language. Make something useful.

Name: Anonymous 2007-12-21 8:51

Show us the grammar.

Name: Anonymous 2007-12-21 9:49

>>1
Best. Troll. Ever.

Name: Anonymous 2007-12-21 14:26

>>27
That can be glossed over though. A programmer doesn't have to see whatever tricks happen in the background.

Name: Anonymous 2007-12-21 14:30

Prospective language designers need to know about lambda, closures, and the meaning of a symbol in Lisp.

Name: Anonymous 2007-12-21 15:26

ÆFLAGS JUST KICKED IN YO

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

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