SpacemanDMM icon indicating copy to clipboard operation
SpacemanDMM copied to clipboard

515 compatibility

Open Mothblocks opened this issue 3 years ago • 3 comments

  • call_ext now exists to replace call, with similar syntax
  • type::variable_name now exists in static definitions, to alleviate a breaking change to NAMEOF

http://www.byond.com/forum/post/2828780

Mothblocks avatar Oct 24 '22 20:10 Mothblocks

Release notes with non-explicitly-breaking features: http://www.byond.com/docs/notes/515.html

Will likely only get to this after 515 has stewed in beta for a bit and codebases like /tg/ are actually looking to start using it.

SpaceManiac avatar Oct 26 '22 07:10 SpaceManiac

It's gonna be a bit before we can because it breaks tgui but I'll keep you in the loop

Mothblocks avatar Oct 26 '22 15:10 Mothblocks

oh yeah pointers are a thing now too lol

Mothblocks avatar Oct 26 '22 15:10 Mothblocks

basic builtins.rs adds at 1597

proc/ceil(A);
proc/floor(A);
proc/fract(A);
proc/ftime(File, IsCreationTime);
proc/get_steps_to(Ref, Trg, Min=0);
proc/isinf(A);
proc/isnan(A);
proc/ispointer(A);
proc/nameof(V);
proc/noise_hash(hash_name, num1, num2, num3 /*, ...*/);
proc/refcount(Object);
proc/trimtext(Text);
proc/trunc(A);

client/proc/RenderIcon(object);

list/proc/RemoveAll(Item1, Item2/*, ...*/);

ANIMATION_SLICE = Int(8);
ANIMATION_CONTINUE = Int(512);

JSON_PRETTY_PRINT = Int(1);
JSON_STRICT = Int(1);
JSON_ALLOW_COMMENTS = Int(2);

not sure on call_ext because of the second params scope

Spookerton avatar Dec 20 '22 13:12 Spookerton

515 also adds __TYPE__ and __PROC__.

Mothblocks avatar Mar 05 '23 08:03 Mothblocks

also adds the /final/ var sugar. https://www.byond.com/docs/ref/#/var/final

Spookerton avatar Mar 18 '23 13:03 Spookerton

Also adds /proc/bla() as type, which is equivalent to RETURN_TYPE in SDMM.

Mothblocks avatar Mar 18 '23 23:03 Mothblocks

Will likely only get to this after 515 has stewed in beta for a bit and codebases like /tg/ are actually looking to start using it.

@SpaceManiac It's been about 6 months and we're about to require 515 for building.

The two biggest failures right now are no nameof and no savefile/byond_version.

Mothblocks avatar Apr 08 '23 02:04 Mothblocks

So we need:

  • call_ext
  • nameof
  • refcount
  • savefile/byond_version
  • :: syntax
  • : syntax

Those last two are important because I can't just define over those

Mothblocks avatar Apr 08 '23 02:04 Mothblocks

Trying to collate all that...

  • [x] call_ext (pending https://github.com/SpaceManiac/SpacemanDMM/pull/353)
  • [x] pointers (& syntax, is there more than that? do we need static typing support for it?)
  • [ ] __TYPE__ & __PROC__
  • [x] ~~: syntax (@Mothblocks what changed with this?)~~
  • [ ] :: syntax
  • [ ] /proc/bla() as type syntax
  • [ ] var/final/x syntax
  • [ ] new builtins (non-exhaustive list: https://github.com/SpaceManiac/SpacemanDMM/issues/341#issuecomment-1359369034, nameof, recount, savefile/byond_version)

sohpeach avatar Apr 14 '23 12:04 sohpeach

I'm wrong about :, it was SDMM incorrectly reporting :: and I got confused

Mothblocks avatar Apr 14 '23 15:04 Mothblocks

also adds the /final/ var sugar. byond.com/docs/ref/#/var/final

/final/ is also used for procs, it should probably be reserved to prevent people for accidentally finding out the hard way

VSC Example

image

Dream Maker Example

image

Zandario avatar Apr 25 '23 23:04 Zandario

Recent attack mitigation stuff in late 515 won't be backported to stable. Much of this can be hidden with a version file at the moment, but the :: accessor and & pointer syntax are unavoidable.

Spookerton avatar Apr 30 '23 13:04 Spookerton

https://github.com/SpaceManiac/SpacemanDMM/pull/353 handled call_ext 240d8e02c41e7f8f3f7479354e0dcca362ec511e handled :: scope token (partially? /foo::bar() cries) 41297597fb29a565375106189309426b8ef2c3a9 handled /final/ sugar 32bf1b3b98c3e81e576300ec32bfe357813e4bae handled & and * pointer stuff

https://github.com/SpaceManiac/SpacemanDMM/pull/354 does simple constants and proc signatures, op lists remaining things afaik having gone through the ref for byondver=515 hits

Spookerton avatar May 01 '23 10:05 Spookerton

To add onto willox's post, we'll need __IMPLIED_TYPE__ support, see https://www.byond.com/docs/ref/#/DM/preprocessor/IMPLIED_TYPE Shouldn't be hard, just need to tell the parser that it exists and it can be ANYTHING (insert rainbow wave)

LemonInTheDark avatar Sep 04 '23 09:09 LemonInTheDark

@SpaceManiac are we free or is there more to do

LemonInTheDark avatar Oct 20 '23 03:10 LemonInTheDark

/tg/station now passes dreamchecker in 515 mode. Sure to be bugs or something missed along the way but I think that's the majority of it.

SpaceManiac avatar Oct 20 '23 06:10 SpaceManiac

aight ws, sounds great

LemonInTheDark avatar Oct 20 '23 19:10 LemonInTheDark

Closing this since 515 support was released in suite 1.8. Any bugs should now be their own tickets, example:

  • #374
  • #375

SpaceManiac avatar Nov 19 '23 22:11 SpaceManiac