Release Notes for 498


Is this meant to be a code block

Its cool to see progress on the Luau debugger, I hope we can utilise in plugins (or you could unlock DebuggerManager) this in the future.

Its a bit anoying, however, to see VoiceChat’s APIs get rolled back in. I thought it was meant to be developer usable?

4 Likes

Don’t worry, voice chat will have a lot of programmability in the long run, when there’s a stable public API available for the more complex parts of Voice Chat there will be announcement posts + full DevHub documentation for it as usual. There’s just been some unfortunate confusion thanks to some still unstable experimental voice chat APIs being temporarily publicly accessible when they shouldn’t have been, sorry about that.

If you’re ever in doubt about an API: Look it up on the DevHub, if there’s no documentation for it it’s probably not officially released yet and you should avoid using it unless you’ve seen an explicit mention from a Staff member that it is ready to be used.

34 Likes

Doesn’t locking tables and checking for locks, just encourage bad code design? I mean… wouldn’t that be like adding a GOTO statement?

Edit: I guess what I am asking is, what would be the necessity of this?

4 Likes

Frozen tables are useful for maintaining your invariants. For example, you if you use a frozen table, and write this:

function myObject:getListOfThings()
    return self._myListOfThings
end

You have a hard guarantee that whoever called the function didn’t accidentally modify the list of things you returned messing up the internal state of your object. Currently the only way to guarantee that is to make a new copy of the table when you return it, which may be prohibitively expensive.

9 Likes

Do you have any details on how table.freeze is implemented? Does it return a new table that has a metatable whose __index metamethod points to the original table and __newindex that throws an error?

1 Like

No, the Roblox Luau VM has a first-class concept of a “frozen” table, which absolutely can’t be modified no matter what hacks you try to pull off :slight_smile:

17 Likes

Will Clouds be Lighting-compatible in the future?

Only being able to put them in Terrain feels out of place, considering Atmosphere can go into Lighting.

6 Likes

More information on table.freeze for inquisitive minds is, as always, here: luau/function-table-freeze.md at master · Roblox/luau · GitHub.

7 Likes

I’m actually quite interested in this for this reason, and for the reason that, as mentioned in the RFC linked by zeuxcg, there’s no “thawing.”

However, I’m a little disappointed that I can’t freeze a table with a locked metatable, this interferes with a lot of my potential use cases for a feature like this with rawset and rawget in mind, because it means I can’t have ““sensitive”” metatable content hidden behind a __metatable metamethod and still be able to lock the table.

The reason that there’s no thawing according to the RFC is that Roblox uses it internally for sandboxing. This is, in fact, excellent for exactly that, sandboxing. It’ll work excellently within code sandboxes like my own.

So, I’m excited for this for a different reason than it was intended for, but, still excited :smile:

1 Like

You can lock the metatable after freezing the table, if you want. Of course this may be awkward if you want to keep producing frozen objects with the same metatable…

FWIW the reason why we [right now] disallow freezing on tables with locked metatables is precaution: if we don’t do that, this means that existing code that uses protected metatables may have the consumer of that code freeze the table, which could confuse the code in question. If you aren’t protecting your metatable this must mean you’re already open to anyone changing your table arbitrarily.

This is something we could relax in the future, but it’s a safer default.

2 Likes

I guess it also occurs to me that in the future we could add an optional metatable argument to table.freeze so that it acts as a freeze + setmetatable atomically. I’d like to see real dev feedback for freezing before committing to that though, but it’s a possibility.

1 Like

New ParticleEmitter shapes will be neat!

image

9 Likes

I really want to know what these do, if anyone has any infomation about these Enums then please tell me.

With the release of animations in the Toolbox, is there a chance that we’ll be able to publish animations for public use one day?

I’ll just link this reply from a Roblox employee:

1 Like

I don’t think that so, the clouds are part of the decoration and they’re planning to improve the terrain decoration, but adding an expandable menu with the Decoration name would be useless for now because there are only grass & clouds to decorate the world

There’s a problem with the Size of particles, now the NumberSequence goes from 0 to 1 while before it went from 0 to 10 and now its almost impossible test some particles that goes outward.

3 Likes

The particle size issue is fixed (unfortunately that means the new particle squash feature won’t be re-enabled until next week).

2 Likes

Thanks for the quick reply!

Anyway for the squash feature it would be cool to have some image references of it because the last time I used it the particle got messed up.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.