#Some preferences for scripting languages

1 messages · Page 3 of 1

spring gyro
#

my opinion is javascript bad idea (i made blocklandjs), wren bad idea (i've worked on it eons ago)

#

there's two options imho:

  • luau
  • make yer own interpreter
spring gyro
#

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

obtuse talon
#

Then thats just Lua with extra steps

tropic raft
#

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

obtuse mango
#

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

pallid zealot
#

i dont think exceptions are all that important for mod scripting

raw kiln
#

but lisp is epic

acoustic sluice
#

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

lethal star
#

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

spring gyro
#

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

obtuse mango
#

i see, fair enough. my question is angled from a purely practical perspective of what enables people to make/share things more easily

spring gyro
#

people become overnight millionaires on roblox with luau so i mean

obtuse mango
spring gyro
#

but good god do those codebases become unmaintainable nightmares beyond a certain line count

#

(source: i worked on one of those codebases professionally)

lethal star
#

there is no agreement

obtuse mango
#

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

tropic raft
#

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

spring gyro
#

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)

obtuse mango
#

add one to the libriscv supporters

spring gyro
#

:^)

tropic raft
lethal star
#

never said that

obtuse mango
#

imo libriscv a terrible idea not because it'll just create the lua fake-oop-misaligned-approaches situation but writ large

lethal star
#

or implied that

obtuse mango
#

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)

lethal star
#

all im saying is at this point this thread is just looping

obtuse mango
#

disagree, today's conversation has brought up completely new points for people who care to consider

spring gyro
#

i mean implementing something like the RISC-V ISA only really becomes a problem when you're crossing an interop boundary

tropic raft
spring gyro
#

that's when you start needing shit like an IDL to define struct layouts / wire protocols

obtuse mango
#

fortunately we have wires already :v)

heavy gorge
#

hi conan!

tropic raft
#

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...

heavy gorge
#

nice to see some familiar faces here

spring gyro
#

but then versioning becomes a pain in the ass

obtuse mango
obtuse mango
spring gyro
#

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

wise wolf
#

being able to see the source of blockland mods is why ive ever done any amount of coding

obtuse mango
#

that said it would be especially funny if brickadia only supported risc and people got into low level programming through it

wise wolf
#

or at least where i started

spring gyro
#

i wrote one of the first semi-readable-ish dso decompilers : - )

obtuse mango
#

like blockland to programmer pipeline but on steroids

obtuse mango
spring gyro
#

stopppppppp

#

remember when i went viral for that shit

obtuse mango
#

wait you did? i genuinely never heard of it i just remember you complaining about being bothered 3 times a day during class xd

spring gyro
#

yeah venmo corporate posted me on their instagram

obtuse mango
#

LMFAOOO

#

(context: i sent ellie a penny a day (or more than once a day) for like 6 months to a year)

spring gyro
#

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

obtuse mango
#

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

spring gyro
#

should've charged interest, missed opportunity

#

anyways

#

my opinion: just use lua

indigo grotto
#

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

spring gyro
#

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

indigo grotto
#

LOL

crisp fulcrum
#

I vote for Assembly the obviously superior choice

mellow temple
spring gyro
#

but i made that dso decompiler when i was still a teenager so.............

mellow temple
stuck tiger
#

fun fact: behaviors (the custom language we were developing) was a lisp-style lang

heavy gorge
#

wow!

willow sage
tropic raft
#

hence the whole thread about "maybe consider something other than lua please"

spring gyro
#

can yall just like, implement haskell already and get it over with

delicate stream
#

the children yearn 4 lisp and scheme

spring gyro
#

can we get some smalltalk in here please

crisp fulcrum
#

Okay hear me out,

#

QuakeC

deft sky
#

lol

#

at that rate just use anyland's language foot64
when touched then become next in 0.2s

pearl stirrup
#

Foot 64

deft sky
#

the very same

ocean wraith
#

you LOVE this image

deft sky
#

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

manic elm
#

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.

pine prairie
tropic raft
#

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

stuck tiger
#

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.

pine prairie
#

i just beg for something with c-style syntax and decent flexibility

hushed prawn
#

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.

obtuse talon
#

I do not think the devs would want anything unsafe

indigo grotto
#

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

pine prairie
#

i would never write a mod if i had to do it like that

pallid zealot
#

kid named class Timer { /* fields... */ }:

#

Nope. Too easy. Use meta tables

indigo grotto
#

not even some like weird thing im doing either this is what roblox has in their official OOP video

#

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..

pine prairie
#

i love a good switch statement on an enum

spring oracle
#

C#

shell hawk
#

can we use scratch coding

spring oracle
heavy gorge
elder lodge
# pine prairie this looks disgusting

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

pine prairie
#

i still dont like it

elder lodge
#

(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
pallid zealot
#

this still blows
in any language with actual oop this would take like 6 lines

elder lodge
#

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...

elder lodge
#

It's true... you don't have to react 😭

tropic raft
# elder lodge There will always be a caveat for any language you choose, for you OOP in lua mi...

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

elder lodge
#

(Normally you wouldn't need to cast any, atleast according to the luau website, not sure how it has changed since)

tropic raft
#

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

tropic raft
elder lodge
#

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

tropic raft
#

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

elder lodge
#

I had to search them up because I've honestly never heard of them but looking at the syntax it looks fine to me

pine prairie
#

#1395136071872020632 message

i think angelscript is ruled out :c

vague stream
elder lodge
#

its not worth debating on opinions, we'll never see the light of day

runic roost
#

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.

indigo grotto
fleet field
#

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

steady crest
#

Car.__index = Car? what?

elder lodge
#

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

steady crest
#
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);
  }
}
elder lodge
#

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

steady crest
#

well i agree with them that it's ridiculous to have to write that many lines of code just to have a class

elder lodge
#

And I personally find writing everything in Java very irritating, preference..

elder lodge
little onyx
#

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

elder lodge
#

Yeah I agree, choosing a language with good OOP built in would be nice :)

little onyx
#

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

pallid zealot
#

-# some may say lua has the most 'trying to be quirky' syntax of all the ones mentioned here ;0

little onyx
#

..that's fair lol

little onyx
little onyx
#

looks like sandboxing might be pretty alright too. looks similar to how lua does it just...nicer

elder lodge
#

super readable

elder lodge
#

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

zinc summit
#

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#

elder lodge
#

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

little onyx
manic elm
#

AngelScript would be ideal though. It's C-like, fast, and already has UE bindings that the devs could use.

zinc summit
#

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

willow sage
#

Sandboxed and slow is better than non-sandboxed and fast

little onyx
#

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

manic elm
tropic raft
#

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

steady crest
#

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

deft sky
little onyx
tropic raft
#

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

tropic raft
#

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

pallid zealot
#

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

wise wolf
#

i find using symbols helps with pattern recognition

pallid zealot
#

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

wise wolf
#

agreed

deft sky
#

I definitely prefer symbols surrounding function bodies too, but I've learned to tolerate the alternative

delicate stream
little onyx
#

seems lua is planned

loud canopy
#

seems like it's actually Luau instead?

#

I guess we will see although IMO regular PUC Lua is a bad idea

little onyx
#

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)

loud canopy
#

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

tropic raft
#

bad ending

#

oh well

pine prairie
#

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

little onyx
#

havent messed with transpilers before but sounds cool

slender pebble
#

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

visual yew
# loud canopy but overall I think it's a better choice (especially long term) then using any r...

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.

heavy gorge
#

mov $420 %rax
retq

#

honestly wiring feels like assembly sometimes

steady crest
#

after having to use golang for a yagpdb discord server custom command...

please dont use go for brickadia scripting

steady crest
delicate stream
#

the template language inside go

steady crest
delicate stream
steady crest
#

ive used it in Flask