Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\*as\*cendant syntax #5

Closed
29 tasks done
Liebranca opened this issue Oct 22, 2021 · 1 comment
Closed
29 tasks done

\*as\*cendant syntax #5

Liebranca opened this issue Oct 22, 2021 · 1 comment
Assignees
Labels
ESPECTRO Delirium is coming PE$O Semantics, that is the question! UPDATE This better not be fifty gigs in size

Comments

@Liebranca
Copy link
Owner

Liebranca commented Oct 22, 2021

Figure 0:

var@0 =/#/op= var@1;

mamm will have trouble with this because it's fetch first token, check if it's a fetch, then oppy-poppin and finally solving -- and all to repeat the process once again; except this time generate actual instruction tokens and check whether the first oppy is an equals, kush or e-oppy.

This doesn't make any sense. Put instruction then eval once, simple. You know the minimum number of args firsthand, and *all* tokens are translated in the same run.

Thus, figure 1:

cpy var@0, var@1

I have inadvertently developed an interpreter which has a preference for this kind of mock-assembly syntax. And I like it a lot.

So: time to ascend beyond re-thinking and re-designs, this is what we're doing now.

TODOs

  • cpy a, b -> a = b;
  • mov a, b -> a = b; b ^= b;
  • wap a, b -> c = a; a = b; b = c;
  • wed type -> sets typing mode; implicit casting

  • jif a, b -> jump to a if b
  • eif a, b -> jump to b if not a
  • entry s -> defines s as program entry point
  • exit x -> stops program and returns x

  • add a, b -> a += b;
  • sub a, b -> a -= b;
  • mul a, b -> a *= b;
  • div a, b -> a /= b;
  • mod a, b -> a %= b;

  • and a, b -> a &= b;
  • or a, b -> a |= b;
  • xor a, b -> a ^= b;
  • nand a, b -> a = !(a&b);
  • nor a, b -> a = !(a|b);
  • xnor a, b -> a = ~(a^b);
  • shl a, b -> a<<b; cpy a, a << b;
  • shr a, b -> a>>b; cpy a, a >> b;

  • til a -> a = ~a
  • cl a -> a^=a
  • clm a, b -> a&=~b
  • not a -> cflg set/unset non-zero a; a=!a; returns a==0;

  • lis a, b -> define/redefine a as an alias for b
  • buf a -> set buffer idex to a
  • sow varargs -> write varargs to current buffer
  • reap a -> execute op idex a for current buffer
@Liebranca Liebranca added UPDATE This better not be fifty gigs in size PE$O Semantics, that is the question! ESPECTRO Delirium is coming labels Oct 22, 2021
@Liebranca Liebranca self-assigned this Oct 22, 2021
@Liebranca
Copy link
Owner Author

A lot has changed about Peso in the last few months; most of the workload is now done over at avtomat and in a more refined fashion. As for ESPECTRO, it is now shb7 and not currently under development, though I do have plans for the near future.

For now, I am closing this issue and the associated project just to make sure we don't leave things just 'hanging', m'kay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ESPECTRO Delirium is coming PE$O Semantics, that is the question! UPDATE This better not be fifty gigs in size
Projects
None yet
Development

No branches or pull requests

1 participant