CURRENTLY REWRITING THE WHOLE THING. Because it became a mess, and I got some new ideas to make it better. (Learn While Doing lol)
I am working on a programming language for the 83 etc, (But it is easily retargetable, so anyone who knows er, ti-nspire asm for example, could edit some strings and is ready!!)
I made it with JavaScript (I have a strange relation with that language)
working on a C++ version, so there is an exe for the winows guys coming!!
Current Features: -Nice name (Happy) -Operator Precedence -Somewhat optimized expressions (Crenshaw hates me now) -Really platform-independent because it's made with JS -Nothing more yet...
To show what it is currently able to do:
Spoiler For Input and Output:
4+-(5+~3)
is translated to:
ld hl, 4 push hl ld hl, 5 ld de, 3 ld a,e cpl ld e,a ld a,d cpl ld d,a add hl, de pop de ex de,hl ld a,e cpl ld e,a ld a,d cpl ld d,a inc de add hl, de
That may seem much, but most of it is the super inefficient unary operator - and ~. It is able to do * and / too, but that's not a z80 command, and I have no libs yet...
It also optimizes a VERY little bit: for example, it doesn't fall for this one: (Which is also good to have no precedence)
((((2+3)*4)+5)/7)
is translated to:
ld hl, 2 ld de, 3 add hl, de ld de, 4 call multiply ld de, 5 add hl, de ld de, 7 call divide
Isn't that nice?
Spoiler For Log::
10-06-2011 Started development with a Crenshaw tutorial. 13-06-2011 Because of the horrible output quality, I started rewriting everything. 14-06-2011 Announced it here, posted a poll about precedence. Almost finished the expression parser the same day. 15-06-2011 Getting the pushes and pops right was harder than expected. 16-06-2011 Adding variables (sort-of) and function calls, Still fighting with pushes and pops. 17-06-2011 Still fighting with those #$%^pushes and pops, made a website for it. v0.0.2 18-06-2011 Assignments!! I think I finally fixed the pushes and pops. v0.0.3 19-06-2011 A few things that I want to make better, and going to make it MULTILINE YAY Between: v0.0.4 21-06-2011 It was slowly turning into a mess, so I decided to start over. REWRITING YAY Until now: rewriting almost complete, rewriting it in C++ so it is more usable
As some of you know I'm working on a programming language for the TI83/84 etc, but I've got a question:
Do you guys want operator precedence?
It would be less optimized (pushes and pops), but since the compiler is not on-calc, I can work on this. It would also mean more work for me (but that's not really bad)
Ok, this is a little bit confusing. I'll try to explain it: Gnome is (like KDE) a DE, which means Desktop Environment. Gnome's Window Manager is called Metacity, it's KDE counterpart is called Kwin.
A Window manager is the program that shows the taskbar (if it has it) and to quote Wikipedia:
Quote from: Wikipedia
A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface.
It draws your window borders, the desktop and so on.
A DE is a window manager packaged with various programs that are made to work with it. For example KDE:
Konsole
Konqueror
Kate
The heavier winmanagers are Kwin and Metacity, the lighter ones are fluxbox (a little bit ugly) Openbox(less ugly and inside LXDE) Xfwm(inside Xfce)
I was bored, and I have a obsession with... Nevermind, here it is.
Made with my iPod Touch (no copy-paste used, everything is hand-codedthumb-coded) Why js? Because I hate Apple Waaah. Er, no, because I can't program in any other language with it thanks to Apple. (ok, it's jailbroken, but php is just ... not right for this and bash... There are still windows users here...
var RAM = [4, 3, 5, 9, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0]; var ip = 0; var a = 0; var b = 0; var c = 0; // for easy xchg var z = false;
function setFlags(num) { if(num == 0) { z = true; }else{ z = false; } }
function execOpCode(opCode, arg) { var opCodeLength=1;
switch(opCode){ case 0: break; case 1: opCodeLength = 0; ip = arg; break; case 2: opCodeLength = 2; if(!z){ ip = arg; opCodeLength = 0; } break; case 3: opCodeLength = 2; if(z){ ip = arg; opCodeLength = 0; } break; case 4: opCodeLength = 2; a = arg; break; case 5: opCodeLength = 2; b = arg; break; case 6: opCodeLength = 2; RAM[arg] = a; break; case 7: opCodeLength = 2; a = RAM[arg]; break; case 8: a = abs(a+b); setFlags(a); break; case 9: a = abs(a|b); setFlags(a); break; case 10: a = abs(a^b); setFlags(a); break; case 11: a = abs(a&b); setFlags(a); break; case 12: a = abs(~a); setFlags(a); break; case 13: a = abs(-a); setFlags(a); break; case 14: c = b; b = a; a = c; break; case 15: a = abs(a-b); setFlags(a); break; default: break; } return opCodeLength; }
function log(txt) { document.querySelector('div#log').innerHTML += txt; }
function hex(num) { var string = num; var abcdef = ['a', 'b', 'c', 'd', 'e', 'f'];