We’re back into the swing of things! Over 100 commits have gone into this release, and it was surely worth it!
Features: - The IDE has had a massive overhaul with a new parser based explainer written in CoffeeScript. - A load of new operators have been added, including regex, sort, compression, base conversion, and tons more.
Fixed bugs:
Closed issues:
172 commits later, and version 2.0 is here with a brand new interpreter, brand new docs, and a ton of features! Here’s a list of what has happened to O:
'
now acts differently with strings, you can read more about it in the docs.Over the past month, @kirbyfan64 and I have been rewriting the O interpreter in C, and it's quite fun(ky). This makes O more portable, and we'll eventually have cool ports to the 3DS and Wii. Not quite sure what that will accomplish, but it's cool. Kirby decided to use a very weird style of C which he calls "APL-style". I find it quite fun to code in, but anyone else would find it garbage. Here's a snippet of this fabulous code:
typedef struct{P*st;L p,l;}STB;typedef STB*ST; //type:stack,top,len ST newst(L z){ST s=alc(sizeof(STB));s->st=alc(z*sizeof(P));s->p=0;s->l=z;R s;} //new V psh(ST s,P x){if(s->p+1==s->l)ex("overflow");s->st[s->p++]=x;} //push P pop(ST s){if(s->p==0)ex("underflow");R s->st[--s->p];} //pop P top(ST s){if(s->p==0)ex("underflow");R s->st[s->p-1];} //top V swp(ST s){P a,b;a=pop(s);b=pop(s);psh(s,a);psh(s,b);} //swap V rot(ST s){P a,b,c;a=pop(s);b=pop(s);c=pop(s);psh(s,b);psh(s,a);psh(s,c);} //rotate 3 L len(ST s){R s->p;} V dls(ST s){DL(s->st);DL(s);} //delete V rev(ST s){P t;L i;for(i=0;ip/2;++i){t=s->st[i];s->st[i]=s->st[s->p-i-1];s->st[s->p-i-1]=t;}} //reverse
As you can see, we've used a lot of defines to take out a lot of the overhead that C requires. We've essentially turned it into an Esolang, to make an Esolang. The new interpreter is almost at the same level as the Java one, and all development has switched over to C. The WebIDE and Docs will be updated afterwards to accommodate the changes.
{}
will now work inside strings~
will now handle output correctly%
concatenates two arrays: [12][34]%o
-> [1, 2, 3, 4]
+
adds strings together in arrays: ["f" "hi"]+o
-> fhi
(
reopens an array: [12] (3]+o
-> 6
^
inserts strings into each other in an array: ['a'b'c]^o
-> acbc
T
LZ compresses the top of the stack, U
uncompresses the top of the stackL
changes the base of a string instead of a number