#Some preferences for scripting languages
1 messages · Page 3 of 1
What’s wrong with Wren?
it's a fine language, i think it's cute, but i don't think it has the quality of life or ecosystem benefits that other comparable languages have
also the spec is a /little/ half-baked. error handling is like "oh we have exceptions" and then it's up to you to draw the rest of the owl
i guess technically you can extend the compiler and the spec to add in something like an error type but then it isn't really wren
Then thats just Lua with extra steps
ah yeah reading the doc i see that its error handling is distinctly different from the typical try/catch syntax
still, i personally think exception handling being a bit lacking is significantly different from entirely missing an actual standard OO implementation that everyone agrees upon
given how scripting exceptions did not really exist in blockland, and also bl exception handling just isnt a thing, it seems like something thats easier to work without than oop
i dont think exceptions are all that important for mod scripting
but lisp is epic
lisp syntax looks like my shift key is stuck down and Im trying to type a number
dont ping me in this thread, its horrible and everyone just wants their favorite language
this entire thread is just
i like a
i hate a lets go with b
i hate b lets go with c
i hate c lets go with a
yeah but like
in terms of language design, dorkscript is just barely a step above php
my point isn't necessarily to nitpick on error-handling per se, but it's just an area that i look at typically to determine a language's maturity. a type system is also in that same realm
i see, fair enough. my question is angled from a purely practical perspective of what enables people to make/share things more easily
people become overnight millionaires on roblox with luau so i mean
strongly disagree, feels way too reductive. theres many good points (positive and negative) about the various options in this thread
but good god do those codebases become unmaintainable nightmares beyond a certain line count
(source: i worked on one of those codebases professionally)
but it all just boils down to that
there is no agreement
the point of the topic isn't to universally convince everyone who comes in here of which option is superior. its purely to get people thinking about the upsides/downsides of each option
universal agreement is unlikely (and i don't think the OP expected it in the slightest), and honestly probably undesirable in this case as it doesn't breed useful conversation
if you're not paying attention to or can't understand the technical sides of the argument it sure will look from the outside like we're all just endlessly bickering, but the whole point is to get educated opinions from people who have used languages A. what languages they have used and would like to see used more, and B. what shortcomings some languages have, whether they've used them or not
hot take i think language choices don't matter in a world where we have webassembly modules (or, if you're getting fancy with it, the RISC-V ISA is also quite neat and very embeddable)
add one to the libriscv supporters
:^)
ellie here saying "i wouldn't use wren (or maybe 'wouldn't want to see it used') because of its error handling and general lack of maturity; lua is comparably mature as an ecosystem" isn't the same thing as "i have only ever used lua and i love lua why are we talking about other things the devs already said lua"
never said that
imo libriscv a terrible idea not because it'll just create the lua fake-oop-misaligned-approaches situation but writ large
or implied that
when everyone and their gamer girlfriend decides to use different languages that have a risc implementation (?) (don't really have the right vocab for this word)
all im saying is at this point this thread is just looping
disagree, today's conversation has brought up completely new points for people who care to consider
i mean implementing something like the RISC-V ISA only really becomes a problem when you're crossing an interop boundary
this is the most productive the thread has ever been though lol
that's when you start needing shit like an IDL to define struct layouts / wire protocols
fortunately we have wires already :v)
hi conan!
riscv is a really fun idea and it's a bit of a pipe dream (and not an inherently good idea) but god it would be cool...
nice to see some familiar faces here
idl is kinda different, think like, asn.1/protobuf/flatbuffers/etc
but then versioning becomes a pain in the ass
i mean moreso in the sense of sharing and teaching others how to create things in brickadia - when the conversation starts at "what (higher level) language should you use" its pretty detached from the end goal of "i want to make a local chat mod for my survival rp server"
it was a shitpost :(((
yeah wasm/riscv is a step down because i feel like knowledge diffusion in BL happened primarily because you were able to look into the source code of mods and modify it
whereas instead you're just shipping bytecode around and running it
it's a step above DLLs, a step below sharing .zip files with the source code and assets
being able to see the source of blockland mods is why ive ever done any amount of coding
that said it would be especially funny if brickadia only supported risc and people got into low level programming through it
or at least where i started
i wrote one of the first semi-readable-ish dso decompilers : - )
like blockland to programmer pipeline but on steroids
time to send you a penny
wait you did? i genuinely never heard of it i just remember you complaining about being bothered 3 times a day during class xd
yeah venmo corporate posted me on their instagram
LMFAOOO
(context: i sent ellie a penny a day (or more than once a day) for like 6 months to a year)
right
you offered me $100 to write a dso decompiler
and i did and you weren't expecting, so you offered to pay me via pennies
for those wondering: i paid it all off in the end, i think my last installment was a single chunk of $20 or so cause i couldnt be assed to keep doing it anymore
but a lot of these people use typescript or a ton of modules that bring functionality from other languages just to make luau bearable
obviously the games made in a weekend dont really care but I cant think of any complex games that do well with just what studio offers
yeah i know, they use roblox-ts as a transpilation layer which lowers TS to luau
but even that's hit or miss across the industry
the game i worked on was just vanilla luau and i was actually forced out of the company for supporting roblox-ts lmfao
LOL
True.
I vote for Assembly the obviously superior choice
ya well i wrote the first fully-working one :^)
and totally showed me up in the process >_>
but i made that dso decompiler when i was still a teenager so.............

fun fact: behaviors (the custom language we were developing) was a lisp-style lang
wow!
what do you mean was 😡
They’re not doing a custom language anymore
hence the whole thread about "maybe consider something other than lua please"
shouldve kept it
can yall just like, implement haskell already and get it over with
and u killed it 🥀
the children yearn 4 lisp and scheme
can we get some smalltalk in here please
lol
at that rate just use anyland's language foot64
when touched then become next in 0.2s
Foot 64
the very same
you LOVE this image
perhaps
there's just so much subtle emotion in such a stupid image
it's like he sees into your very being and mutters "yeah" like he lived the same life several millenia ago
anyway uhhh standard ML without the funky let ... in ... syntax
I am currently making a game in Love2D (a Lua game framework), as well as a tutorial series on it, and you are wrong. You can do modular, readable stuff in Lua. Maybe Roblox flavor of Lua is different, but that's not the fault of the language, but Roblox.
Anyway, my vote remains for AngelScript. It's C-like and already has a working Unreal Engine implementation.
at a glance, i would be happy with this
i like angelscript better than lua by a long shot, and this isn't meant to be "oh i hate angelscript actually" because i think it'd be pretty nice to write
but making the developer handle which specific numeric data type to use seems a bit silly
angelscript has auto just like c++. I think we avoided angelscript for mostly sandboxing reasons, it's more intended to be used on the developer side for gameplay scripting reasons.
i just beg for something with c-style syntax and decent flexibility
Someone was just asking for variable references as a type in wires, so to prevent that madness, it would be nice to have a language that recognizes the concept of reference types and has the ability to dereference them.
I do not think the devs would want anything unsafe
its entirely syntax complaints.. arguably luau is more capable of representing classes than lua but the way of going about it is extremely hacky and not similar to real oop in anyway
make a bunch of tables and link them up to other tables for nil keys and do type inference on the setmetatable method with an entire nested table of every single variable and functional type in ur class and return the constructed tables as a that type and yea maybe ur code is full of mazelike syntax but hey at least you get halfworking autocomplete and vaguely correct oop just make sure you dont serialize anything or youll lose the metatable !
im not familiar with other languages to say this 100% confidently but im pretty sure u dont have to do all this boilerplate just to have types in ur classes and they often lose focus and dont get considered by the typechecker either if ur doing inheritance and exporting to other files
you could also just not use metatables at all and have a table for objects and a table for methods and a constructor and basically have oop without metatables. the inconsistency is really annoying that there is no general way to do oop
this looks disgusting
i would never write a mod if i had to do it like that
not even some like weird thing im doing either this is what roblox has in their official OOP video
Dive into the OOP paradigm and how it works within Luau.
For more, check out these links:
https://create.roblox.com/docs/luau/metatables
https://luau.org/typecheck
Chapters:
00:00 Intro
00:24 What is it?
01:36 Why do I care?
02:01 How do I it?
02:31 Example
03:25 Tangent
04:07 Example pt 2
09:59 When should I use it?
9 minute mark
the lack of support for custom enums is also really annoying
you either make a table but get no autocomplete and no type checking or make unions of literal types
which means that u get autocomplete but all ur enums are then typed out as strings..
i love a good switch statement on an enum
C#
can we use scratch coding
💀

Luau is still in development, and some fields in that type are not necessary anymore.
For things like "time, autostart" etc anything not inherited from the setmetatable, should be defined in a type, and the final type would look like
export type Timer = setmetatable<TimerData, typeof(Timer)>
(update I guess!)
Also, for the self types, currently there is not inferring done (which is quite a shame, you still have to define what self is in each method but they plan on introducing a better way for that
i still dont like it
(oop in luau)
local Car = {}
Car.__index = Car
type CarData = {
speed: number
}
type Car = setmetatable<CarData, typeof(Car)>
function Car.new(): Car
local self: CarData = {
speed = 15
}
return setmetatable(self, Car) -- Might give a warning in the current typechecker, they are working on it, can cast :: any if needed
end
function Car.Boost(self: Car) -- self not inferred, must do it manually ( : will still work ) (Said they'd release an update on this in Q3)
self.speed *= 2
end
return Car
this still blows
in any language with actual oop this would take like 6 lines
There will always be a caveat for any language you choose, for you OOP in lua might not be intuitive, but something else from another language might not feel intuitive for someone else...
When you look at Luau on a broader scale, it is quite a good candidate, easy to use (which might bring more people onboard) we can't really eliminate the possibility of using luau because of a more manual-like approach to oop, plus it's still very readable...
It's true... you don't have to react 😭
this horse has been so thoroughly beaten that it's gone past dead and is essentially a fine pulp now, but the fact that this is the best luau has for something so foundational to modern developer practice as OO is not, in my opinion, acceptable. i'm not one for code golf, but i'm also not one for intentionally making common operations more verbose
to put it a little more bluntly, you shouldn't have to write a thorough analysis of why a programming language's object oriented paradigm being unconventional is ok in order to even have a vague shot at convincing me of such. if you do have to do that, any arguments you have about "ease of use" automatically have gaping holes punched in them, and they're not the kind you can patch over with a sample implementation
feel free to waste your breath trying, but nobody's going to be convinced that luau's OO is "good, actually" just because there are ways to make it suck a little less
especially not when you have comments like "you can cast to any if you need to make the typechecker quiet"
that's not a functional type system, let alone support for the entire OO paradigm
(Normally you wouldn't need to cast any, atleast according to the luau website, not sure how it has changed since)
yes, they do have plans to fix it, but why would you ever want to rely on an upstream to provide fixes to a language so core to your game's functionality as this? relying on microsoft and foss devs for typescript support of your use case is bad enough if you start doing anything complex with the type system there, and that's production-ready. luau frankly looks amateurish by comparison
technically, sure, its sandboxing features are nice, and it's pretty fast, but luau isn't rocking luajit levels of performance, and plenty of languages offer good sandboxing and that kind of sufficient performance
there just isn't enough compelling evidence that luau is more suitable than any other language, especially not in the face of the elephant in the room
not to belabor the point, but it's fine to rely on an upstream for nice-to-haves and feature additions, but OO isn't a "nice-to-have", and its ergonomics are such a completely solved problem that it's utterly baffling to see people claiming to be sane developers trying to argue that it's ok for lua to be Different
Any easy to use language would be fine with me I think it's best for the platform, I was naming Luau because it was brough up a couple of times
Which language would you personally recommend
you can read the OP if you're curious about some of the detailed suggestions i had when i initially created the thread, but there's other suggestions interspersed throughout: #1395136071872020632 message
stuff like chai and teascript, squirrel, angelscript
there were others that i can't remember off the top of my head
the more credible suggestions all follow along the same lines: something with native sandboxing support, passable performance for game logic scripting, and maybe a good ecosystem for libraries and plugins so users don't have to reinvent the wheel
and, most importantly, good ergonomics so that the language is comfortable for existing developers and new users alike without intentionally being Different for the sake of it - python is one example of a bad (and highly controversial, in terms of syntax at least) option for that reason, but i initially suggested it to make a point that i really dislike lua's syntax
I like these too
I had to search them up because I've honestly never heard of them but looking at the syntax it looks fine to me
#1395136071872020632 message
i think angelscript is ruled out :c
in lua there's like a 100 caveats, it's like you took the worst design decisions from all over and put them all into one language. luau lowers that to around 95 caveats
its not worth debating on opinions, we'll never see the light of day
My two cents on choice of language: Lua is awesome and I enjoy it. However, I would prefer a variant where you must declare variables. I do not enjoy when I misspell a variable's name and Lua thinks I'm declaring a new variable. It creates the worst sort of runtime bugs.
yes, this was written before the type checker could infer from typeof in set metatable but overall I still get pretty confused with how lengthy it can get even with current shortcuts especially when they manifest as several nested declarations
I can't say anything here as I am way to stupid to even code at all anything as I have tried for the last 10 years on Roblox scripting
Scripting comes out for this game I won't even touch it at all since I already know I never will be able to do anything with it
Any language it uses
what the hecc is this
Car.__index = Car? what?
Read on metamethods
The __index metamethod allows a table to be able to look at indexes of another table if such index isn’t found in the original table, which allows for sort of inheritance
ew
class someClass:
def some_method(self, blah, whatever):
return whatever
way nicer
or
public class someClass {
public void some_method(int blah, string whatever) {
return(whatever);
}
}
Not sure if you wanted me to reply to that it all comes down to preference, it is obvious that you will prefer something you’re more familiar with
well i agree with them that it's ridiculous to have to write that many lines of code just to have a class
And I personally find writing everything in Java very irritating, preference..
I was much more interested in OP’s suggestions
and thats the problem. lua would be a great use case imo but there's a big need for OOP, which lua doesnt do out of the box and has too many different ways to set it up
Yeah I agree, choosing a language with good OOP built in would be nice :)
Maybe the devs could use a common implementation of OOP in lua at the C level, but not sure how feasible that would be. and obviously there could be disagreements from users on how it gets implemented.
i dont know, just something with syntax similar to most languages, lightweight, can be integrated with Brickadia relatively easy, and with OOP would be nice.
lua fits most of the bill except for OOP. must admit i'm very biased to lua, but if there are similar langs that aren't just progressive and try to be quirky (e.g. deviate from common practices/syntax a lot; looking at you Wren..), then that'd be cool
-# some may say lua has the most 'trying to be quirky' syntax of all the ones mentioned here ;0
..that's fair lol
maybe squirrel is kinda neat. found some cheatsheet online that pretty much sums it up
https://developer.electricimp.com/sites/default/files/2021-01/Squirrel-Reference-Sheet.pdf
looks like sandboxing might be pretty alright too. looks similar to how lua does it just...nicer
super readable
Does this imply method overloading? that would be nice, I can't find it in the documentation
super easing thread system like lua
enums... constants...
oh it's dynamically typed
isn't lua dynamically typed too?
honestly even though I've never used it, I like how Squirrel looks more than lua and I've got plenty of experience with lua, python, javascript, java, and C#
yeah base lua is dynamically typed, luau is gradually typed
Idk I think the class system makes up for it comparing it to luau but thats kind of a big deal for me
looks like there's some decent forks of Squirrel that might make engine implementation even easier https://github.com/SuperTux/simplesquirrel
AngelScript would be ideal though. It's C-like, fast, and already has UE bindings that the devs could use.
Speed and bindings aren't the only considerations, it also needs to be sandboxed since it's untrusted user made code running on other people's devices
Sandboxed and slow is better than non-sandboxed and fast
yea and both squirrel and lua have sandboxing as well. they even have debug hooks which let you profile how much cpu time is spent in user code. this is how Starfall in gmod prevents people from just crashing servers with while true do end
also starfall is a pretty good example of how to sandbox user code in general imo
AngelScript is sandboxed. It can only run what the developer allows it to.
angelscript was ruled out by the devs iirc for not having satisfactory sandboxing for what they need: #1395136071872020632 message
not that i dislike it, just that it's been explicitly looked at and was shut down
imagine if brickadia could somehow uses littlebigplanet's internal scripting engine (fish) . i doubt it though, licensing and all
lbp scripts were called fishfingers if i recall that right XD
I forgot to mention miniscript :-] https://miniscript.org/files/MiniScript-QuickRef.pdf
first glance, not bad 👀 having to type end function bugs me a bit but that's just me
i don't think it's just you
i'm a hardcore believer in c-like syntax, not because there aren't any other good syntaxes, but because nobody has found one yet that works better
my mind is open but the proof just hasn't materialized
haskell is an exception but haskell isn't exactly useful here, and lisp-likes too (which might actually work - others have already suggested scheme)
and those are kind of cheating anyway because if an operator you like doesn't exist for your data type you can just define it
not just you lol that really irks me too
part of why i don't like lua's (and similar) syntax is that since everything is keywords there is no visual distinction between the start/end of blocks and actual instructions
i find using symbols helps with pattern recognition
using even more keywords to close out blocks just makes the problem even worse because block endings are now going to be varying in length so you can't just tell if a bit of text is an 'end' or not at a glance
agreed
I definitely prefer symbols surrounding function bodies too, but I've learned to tolerate the alternative
seems lua is planned
seems like it's actually Luau instead?
I guess we will see although IMO regular PUC Lua is a bad idea
just actually did research on luau finally, and yeah that'd be much better compared to regular lua
(whether it's the best option is a different matter but i guess thats what this thread is for lol)
Luau has a few downsides due to heavily focusing on keeping compat with Lua 5.1
also they removed tail calls
but overall I think it's a better choice (especially long term) then using any regular PUC version of Lua
f
maybe i can write a code editor with built in intellisense with c syntax and types and auto conversion to lua one day, idk
havent messed with transpilers before but sounds cool
my opinion about wren changed
there's like... absolutely no way to give the VM a generalist set of function ptrs for WrenForeignClassMethods
it has to be 2 fptrs per class and the only way i can see to make it work dynamically at run-time (outside of editing wren itself) is actually having to write your own instruction machine code and marking it as executable
which is insane, moreso if you plan to support other architectures and even wasm
this should really be accepted
I've been thinking a lot and I think that because of the increasingly unstable decisions made by Roblox I don't think LuaU is a reliable language long-term anymore and should be avoided at all costs, regardless of its current and historical usability or performance. Roblox aren't exactly making sane decisions and if they become unable to make money then LuaU will lose funding and thus will become a dead language, which means feature and security updates will cease.
after having to use golang for a yagpdb discord server custom command...
please dont use go for brickadia scripting
it is not normal go
what is it then??
oh god its horrible
have you seen other templating languages?
i like jinja2
ive used it in Flask