#💽Programming Chat v2
1 messages · Page 16 of 1
make your own compliant server 👁️
no im not you
it would be fun
but
no time
:<
besides
the atprotocol
is probably kinda beefy
and unlike http and smtp you kinda need a fuller version to be able to test
eh I think I'll just be cringe and use bsky.social
noooo
for now...
at lesat change the handle....
Blocked.
"lua interpreter"
yknow i've always wanted to do that but i didn't know where to start
lua doesnt have a specification except for the compiler's .c files
good
physx rn seems too hard
im gonna try adding computers again
thankfully i already textured everything
i think i could do better though
what does physx even do
except for the hard disk
ithink i did great on this one
結婚したい
WHAT
what
TO WHO
classified ......
BOI
smh why doeseveryone say htat!!!!
i think japanese text is like a trap instruction for you
i should learn japanese for that reason too..
Yes whenever I see Japanese I have the strong desire to read and translate it
Mmm if only for the sake of knowing what you said for moderation
bleh im so tired
But I will definitely just be a lazy ass and google translate it
With Japanese I do actually want to understand more
i should really pay more attention to my german classes cause they're an actual course
go into qserf and change the language to japanese
bad roblox translations
notice how ada isnt listed... therefore our coolness factor can be anywhere from 0-4* billion depending on the unit used (probably unsigned)
I’m so eeeppyyy
THEN SLEEP
oh but I don’t wannnnnanaaa
Now you are become sleepy, the goer to bed
let mut arr = vec![64, 34, 25, 12, 22, 11, 90];
arr.sort();
println!("{:?}", arr);
ehh
I don't think it looks that much cleaner
in Ada you’d need to define this generic function but it should look roughly the same
well the implementation is defined by the RTS you’re using
you just need to instantiate the function
Imagine even needing to do that
imagine needing a borrow checker
couldnt be us
Imagine still having to manually free your allocated memory
Or just not freeing it at all
That means your http server will eventually OOM
i've already spoken about this with my codev
the memory that is "leaked" is so tiny it doesn't matter
Why is go slower than java?
Have i been lied to this whole time?
Quoting Ben Dicken (@BenjDicken)
More languages, more insights!
A few interesting takeaways:
- Java and Kotlin are quick! Possible explanation: Google is heavily invested in performance here.
- Js is really fast as far as interpreted / jit languages go.
- Python is quite slow...
i should not get myself involved in twitter discourse
@spare quartz hey um yk certbot
for it to like work for nginx, i have an existing config, it tweaks it with it's settings
but like
when it does and i restart nginx it shits the bed
whats the error
getting it rn
so for context
this is before certbot
server {
listen 80 default_server;
client_max_body_size 100M;
server_name .astrohweston.xyz;
location / {
proxy_pass http://localhost:3005;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
now, when i run sudo certbot --nginx, it asks me for which domains i wanna do it, i type it in, and then it throws this error:
remove the api. and try a wildcard cert maybe
damn.
this error ive seen it before but it like
wtf does "unknown" mean wha
bleh
when assembly
i rebooted my system and its good
@spare quartz hey i'm requesting brand new certs for new subdomains, and im getting this error, any help?
doesnt happen for domains that already had old certs in the system
Kotlin as slightly slower than Java 
Both slower than rust and cpp
Now do Ada
isnt nginx supposed to like
if you go to a website that it doesn't have a config for
isn't it supposed to throw a 404
not surprising
kotlin wraps a lot of its stuff around the jdk
heres it with Ofast, flto, and gnatp...
it just optimized it away
with "work" done in the loop
lemme try to replicatewhat this guy wrote
@timid quartz
there
replicated
So about the same then
yeah
technically a 0.8 second boost but
- i dont know what hw this guy was testing on
- i dont know if he rounded down an initial result, or used an average result
oh yeah and also i don't know what type of modulus the other langs used
if it was just straight mod, the divison required could play a big part in the speed
(should also note the randomness im using isn't random, at least every startup, it needs to be seeded)
(but this wouldn't play a part in the speed)
whats interesting is all of these tests have arrays initialized to 0
my program doesnt deal with the initialization
no way
NixOS ❤️
nixos 🤢
But you get public static void main(String[] args) and a garbage collector
do i go richard stallman
What does this mean
what the ui designer submitted in the spec vs. what I made
canvas is written in ruby ..
@spare quartz hows it going
idk in general
with ur projects n shit
also get ur phone out of the shower
and clean urself off
umm fine I suppose, havent worked on TLS for a bit now
the one shower a month you have
really itching to make a third JVM
nahhhh
when ada lsp tho
ummm
and uh when clr
when Ada exe loader..

I might just write the CLR in rust to spite you
Only partially though. I have a feeling that’s a big project
how would writing it in rust spite me
ok sure
Oh yeah. PhysX is going very well. But nvidia uses different quaternion values than Minecraft so I need to rummage that until I figure it out
Also I still need to add lighting and figure out level geometry
Since adding a few thousand static objects doesn’t seem right
Also nvidia documentation writers suck!!!
Literally all they say on the documentation for quaternions is “go read a book”
local MaterialSerivce = game:GetService("MaterialService")
local LogService = game:GetService("LogService")
local Needed = {}
local NeededC = 0
print("Please enter a replacement table of MaterialVariants in your console. When you are done, enter \"done.\"")
print("To enter a MaterialVariant replacment entry, type: \"[ToBeReplaced] -> [ReplaceTo]\" without the quotes, or square brackets *around* the names.")
print("Do not worry about the errors.")
local Replacements = {}
function Run()
for _, Object in workspace:GetDescendants() do
if Object:IsA("BasePart") and #Object.MaterialVariant > 0 then
if not MaterialSerivce:GetMaterialVariant(Object.Material, Object.MaterialVariant) then
local ReplaceCheck = Replacements[Object.MaterialVariant]
if ReplaceCheck then
Object.MaterialVariant = ReplaceCheck
continue
end
local MaterialFixCheck = Enum.Material:FromName(Object.MaterialVariant)
if MaterialFixCheck then
Object.Material = MaterialFixCheck
Object.MaterialVariant = ""
continue
end
print("unresolvable material error:", Object, "-> Need: ", Object.MaterialVariant)
Needed[Object.MaterialVariant] = true
NeededC += 1
end
end
end
if NeededC > 0 then
print(`Please get the following materials ({NeededC}):`)
for Material, _ in Needed do
print("-> ", Material)
end
end
end
local LoggingCheck
LoggingCheck = LogService.MessageOut:Connect(function(Message, Type)
if Type == Enum.MessageType.MessageOutput and string.sub(Message, 1, 1) == '>' then
local ActualMessage = string.sub(Message, 3)
if ActualMessage == "done" then
LoggingCheck:Disconnect()
Run()
return
end
local ReplacementStrings = string.split(ActualMessage, " -> ")
if #ReplacementStrings > 0 then
Replacements[ReplacementStrings[1]] = ReplacementStrings[2]
end
end
end)
pasting this here cause i think i did a cool thing
CLI in a command line script
is there something special about this? maybe im missing something but it seems pretty normal to me
I did a pretty quick pass over it, though
nothing its just a cool idea i had and decided to write
you type in parameters and then it actually runs
oh I didn't realize it grabs from console input
wait does it? I'm not sure whats happening here
the service says right on the tin its not very reliable for in game use but i think its good enough for mini things like this
for tooling, yeah
could be cool if you're too lazy to write ui for a plugin
wonder if you can supress the errors somehow
prob not
pascal case is painful
i like it :3
does intellisense show up if you start it lowercase?
I'd assume not
that sounds awful
having to start everything with shift + letter
oh i just wrote this in notepad
anyways yeah intellisense does actually pop up
if you start lowercase?
yeah
the results are lower but considering all the symbols i use are in that case it doesnt matter
but look how awesome it looks
that we can agree on
all new qserf code is snake_case
🙏
its so ... qserover

get back to work!!!!
anyways wake up time

Do it
Rust if you handle everything properly barring catastrophic hardware failure
Okay but the same could be said for Ada
SPARK means proving nothing can go wrong so the compiler doesn’t need to enforce safety at runtime
oh yeah this chat turned 4 months old a week ago
Well rustc does that too but not in such a way where it solves the halting problem which I’m pretty sure is accomplished by the limitations that SPARK imposes
MATH
can you even solve the halting problem
had to watch a refresher on it again (the amazing one made by udiprod)
whenever i hear the halting problem I hear that its dumb
I just looked it up
why would you want to see if a program ends lol
its just a logic impossibility
"it increases productivity and inclusion in the workplace"
lmao
I don’t think you can with a Turing complete language but I thought SPARK’s restrictions made it to where you could
Because formal mathematic verification blah blah blah
I don’t think it can…
SPARK makes runtime errors impossible
like not just what you're doing in rust with handling all exceptions
just straight up provably impossible (barring the universe killing the hw) to have an error
and heres the documentation https://docs.adacore.com/spark2014-docs/html/lrm/introduction.html
Ok well just…..don’t use Results in Rust :3
Or don’t use exceptions in Java :3
you do realize we have more than just exceptions to worry about right
overflow, divide by zero, type ranges, ...
with SPARK proving nothing out of the ordinary can happen wrt to the aforementioned we can safely remove runtime checks
how?
static analysis? is it incredibly simple?
the two links up here explain it better than i can
this reminds me of that memo I saw of a dev working on missile software acknowledging that his code will eventually OOM due to a memory leak, but he calculated that the missile will either hit the target or run out of fuel before it could ever run out of memory with a margin of like 10x to spare, so he just willfully ignored it
I guess its more firmware maybe
let me see if I can find it
honestly sounds like ada
by default no memory is freed, only finalized
From: [email protected] (Kent Mitchell)
Subject: Re: Does memory leak?
Date: 1995/03/31Norman H. Cohen ([email protected]) wrote:
: The only programs I know of with deliberate memory leaks are those whose
: executions are short enough, and whose target machines have enough
: virtual memory space, that running out of memory is not a concern.
: (This class of programs includes many student programming exercises and
: some simple applets and utilities; it includes few if any embedded or
: safety-critical programs.)This sparked an interesting memory for me. I was once working with a
customer who was producing on-board software for a missile. In my analysis
of the code, I pointed out that they had a number of problems with storage
leaks. Imagine my surprise when the customers chief software engineer said
"Of course it leaks". He went on to point out that they had calculated the
amount of memory the application would leak in the total possible flight time
for the missile and then doubled that number. They added this much
additional memory to the hardware to "support" the leaks. Since the missile
will explode when it hits its target or at the end of its flight, the
ultimate in garbage collection is performed without programmer intervention.--
Kent Mitchell | One possible reason that things aren't
Technical Consultant | going according to plan is .....
Rational Software Corporation | that there never was a plan!
oh interesting
I'd try ada if not for the fact last I heard it had practically 0% market share outside of government stuff
yeah that's true
it's very popular in embedded/safety-critical, but for stuff like desktop/server development it's not very common
the memory not being automatically freed isn't too big of a deal for certain stuff though; i can send an http server i made with it a few million requests and only tack on about 0.3 mb of leaked memory
the farthest I've gone for embedded is a little C and some verilog
absolute despised verilog
awful language
its mainly for fpga programming
looks very uh, weird
OH ITS HDL
yes
yeah that explains it
also yknow what, totally fair
trying to run java in an embedded environment (arm32 softfp) with 512 mb of ddr3 was an experience
no yeah of course
I just thought its cool
oh wow, what JDK did you use for that?
i imagine some java ee one
not ee. i forgot
java me thats it
:<
honestly i wish we had more than just (repackaged) oracles hotspot for consumer use
the amount of versatility JVMs can be made for is crazy
to be more specific it was openjdk setup for that specific platform
namely arm32 softfp
yeah, had to wrestle with the gc settings a bit
also couldn't use half the gcs that are usually available because
arm32
🙏
so ended up with serial gc I think
And like from the stdlib normally when you do these kinds of things in Rust you get a Result :3
zgc... save us.... save us zgc....
okay but you still have to either unwrap that result or handle it right
and the stdlib still has to ensure the input is valid to even give you a result
Or uh don’t use those functions :3
Then you have no runtime errors (probably)
aerasto you've literally just invented pragma Restrictions 😭
#![feature(burgers)]
#[allow(dead_code)] only works on a specific object (eg a function or a struct)
#! applies to the entire project
ohhh ic
the way you're supposed to define pragma restrictions project wide in ada is a little weird
you need a sorta, gpr "configuration file" alongside the gpr project file
Zgc would've been awesome, but no support for arm32
damn :<
Softfp was evil too, in combination with arm33 you lack support everywhere
No that’s /pragma
STOP MAKING ADMIN COMMANDS
DSLs are cool
Twitch https://twitch.tv/ThePrimeagen
Discord https://discord.gg/ThePrimeagen
Become Backend Dev: https://boot.dev/prime
(plus i make courses for them)
This is also the best way to support me is to support yourself becoming a better backend engineer.
LINKS
https://www.php.net/releases/8.4/en.php
Great News? Want me to research and cr...
Just use PHP
NO!!
c is my only backend and middleend htmx is my only frontend I believe in temple os
eepy
05:14:28 up 53 days, 6:53, 1 user, load average: 0.01, 0.02, 0.00
flex....
I wonder if theres a big
like huge linux server
that anyone can remote into and just get a temporary environment
like how when computers used to be as big as rooms a university student could get an ssh thing then use some archaic form of ssh over dsl and connect to their universities computer
i think we're the first to do this type of language generation but i can't be 100% sure
the alternative was making a 300 line file of every items translation key
lol
and of course a lot of reflection to go along with that
our mod is extremely self modifying
ah kotlin
the better java
alternatively, the language that jetbrains made to sell pro copies of its IDEs
(still the better java though)
look inside
unsafe {
// remainder of code here
}```
done
Java 👎
been thinking about trying to make a web app in vue
can’t write mixins in kotlin…
That’s what you think
It’s all JVM bytecode in the end
Uh, no
uh yes 🤓 ☝️
The spongepowered mixin plug-in only supports java for mixins
You can make the mixin code redirect to a kotlin function in another file, but that’s dirty and weird
person who's trying too hard
or
person who can only write business logic
take your pick
huh
I mean "I use neovim" is kinda useless on a resume compared to stuff like github lmao
yeah that's why i specified they're someone trying too hard
just cause you use arch or neovim =/= you are a better programmer for x domain
well im assuming they don't want a sysadmin job
(every programmer should still know how to use a unix-like system though)
it still looks good
yes
wait isnt windows unix like
im 100% the first one 😭
im a sped with no job 😭
Nerd .
@spare quartz 🐱
procedure Read_DOS_Header (Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : out DOS_Header) is
begin
raise DOS_Header_Decoding_Error;
end Read_DOS_Header;
i win
SPARK does not approve
spark approved!!!
nope
i should not have brought arti to qsp 💔
honestly
well
you need the end of it
to figure out the PE header offset
but that's all you need
the DOS header is fixed size which means i can just seek and ignore it
yeah
the oonly thing I'd say is
make sure the MZ signature is ok
but that's meh
no i'll just do an object oriented thing*
oh cmon
they make processors too??
everything i know so far about mitsubishi
- they make cars
- the us government (dod) buys projectors from them
- they make processors
cringeeeeeeeeeeeeeeeeeeeeeeeeeee
type Machine_Type is (ANY, ALPHA_AXP_32, ALPHA_64, MATSUSHITA_AM33, AMD_64, ARM_LE, ARM_64_LE, ARM_THUMB_2_LE, EFI, INTEL_386_OR_LATER, ITANIUM_64, LOONG_ARCH_32, LOONG_ARCH_64, MITSUBISHI_M32R_LE, MIPS_16, MIPS_FPU, MIPS_16_FPU, POWERPC_LE, POWERPC_FPU, MIPS_LE, RISCV_32, RISCV_64, RISCV_128, HITACHI_SH3, HITACHI_SH3_DSP, HITACHI_SH4, HITACHI_SH5, THUMB, MIPS_LE_WCE_V2);
OH almost forgot UNKNOWN
its java
the feds are supressing me
ok but like sometimes is there really a better way to do it
yes, always
ecs
ecs is the superior choice
like i've never had a reason to use oop for anything in lua
the 2 jvms i made dont even have it 😭
but it still sucks
ironic
ecs
ecs or just a module
make entity, door component
easy stuff
collection service is like a knockoff ecs that doesn't really work anyway
local DoorState = {
-- [Door1_Model] = { ... },
-- [Door2_Model] = { ... },
-- [Door3_Model] = { ... },
-- ...
};
local Connections = {
-- [Door1_Model] = { ... },
-- [Door2_Model] = { ... },
-- [Door3_Model] = { ... },
-- ...
};
just shit like that?
no
tf is an ecs
like an extremely simple door module is just
entity component system
pattern for game programming (and more)
sounds like oop with extra steps
its oop with less steps
leads to significantly less coupling in your code
which means writing new features and behavior is incredibly easy
local CollectionService = game:GetService("CollectionService")
for _, Object in CollectionService:GetTagged("Door") do
local misndvinvb = Instance.new("Clikckofodvb ")
minsinfdig.MouseClick:Connect(function()
.........................................
end)
miminfdigfd.Parent = Object
end
no oop
(basically ecs)
kinda
collection service + attributes are like a bad ecs
me when connections don't get disconnected 
yeah we lose a bit on the extensibility for ease of implementation and performance
but really you wouldn't need oop here for any reason
attributes are not performant
they actually don't
they do
they dont
the docs say they do
benchmark?
because I and the rest of sst had to fix a bunch of that shit in qserf
and they do, actually
compared to array access (which ecs is)
mmm nope tell that to qserf
lol ur cooked bruh
they do
well... yeah, direct access will always beat a context switch along with whatever sauce roblox puts down there
oh wait
yeah well an ecs library is just array access
it's not the connection
what are you doing
fr
it's when the connection references a variable outside of it
well yeah
local theValue = {"a", "b", "c"}
script.ChildAdded:Connect(function()
print(theValue)
end)
this leaks memory
unless disconnected
should still get disconnected
cause.. the event is on the script
if you delete the script for example, the event + any other events the script made are disconnected
ok that's if you delete the script
yeah?
your event is on the script
I don't get your point
during runtime you're not gonna be deleting scripts though
I still don't get your point
Ext.Event:Connect(...) -- disconnected if script is removed OR ext is removed
script.Event:Connect(...) -- disconnected if script is removed
-- both capture what we're saying: events are disconnected if the initiator OR target are removed
so like in some shit like this if you delete one of the tagged objects, the connection isn't going to get disconnected and you're going to leak memory
i'd need to see proof of that cause that just doesn't sound right
the event is on the object, if it's removed and gc'd the event won't exist
unless you're saving a ref to the connection maybe
stuff like this is incredibly easy to do with ecs
https://cdn.discordapp.com/attachments/1278332589526220873/1311800687784628244/20241128-2107-14.1397871.mp4?ex=674b7e98&is=674a2d18&hm=61d238792dd974de1b9a8a5ab4150c5d1f5edd0cc93a80397bc88fb1244c69de&
pretty much 0 refactors on the behavior
you're still probably gonna leak terrible amounts of memory if you ever have to regenerate those models
why
because the connections will
a. probably be capturing external variables that don't get gc'd
b. not get disconnected and continue to exist for models that don't exist
destroy an entity results in all its components being freed, thats all the memory there is
@wheat zinc you know more about this shit than I do
okay but the GC cleans up things that themselves aren't referred to by anything
destroying an instance results in all connected connections on it to be freed
so I don't see where theres a leak
after deletion of an object, if you're not trying to save the connection (as shown in the scripts above), the connection won't have any references to it and will be cleaned up
in the end I think the syntax came out really clean
local ModelStorage = game.ServerStorage.Model;
local Counter = 0;
local TheModel = ModelStorage:Clone();
TheModel.InnerPart.Touched:Connect(function()
Counter = Counter + 1;
end);
local RegenEvent = script.RegenEvent;
RegenEvent.Event:Connect(function()
TheModel:Destroy();
TheModel = ModelStorage:Clone();
end);
this leaks memory
connection is never disconnected
The TheModel connection
and they both get disconnected
no memory is leaked
well, they don't both get disconnected, but no memory is leaked
it doesn't ever grow
No, the connection on TheModel.InnerPart will leak if RegenEvent is fired
no
yes
theres only ever 1 connection to that
hold on
when the instance is destroyed so are its children, which frees the connection
https://devforum.roblox.com/t/psa-connections-can-memory-leak-instances/90082
https://devforum.roblox.com/t/garbage-collection-and-memory-leaks-in-roblox-what-you-should-know/374954
Preface I’ve seen several experienced developers not knowing this, or not having a full understanding of what’s going on, so I thought I’d write a dedicated post on the issue of accidentally leaking Instances (so that they are not GCed even when there are no references to them) through lingering event connections. What circumstances cause a le...
This article is meant to teach you how to prevent memory leaks and how the Roblox lua garbage collector works. What is garbage collection? Garbage collection, for those who are new to the term, is the process that a lot of languages such as JavaScript, python, and lua use to clean up memory. When values are no longer being used, they get garba...
you also don't make the connection again
I ain't reading that brah
Then don't argue if you don't read the facts
thats talking about gc
if you used your eyes
do -- Also also all good, as Destroy() implicitly disconnects all connections
local p = Instance.new('Part')
p.Touched:connect(function() print(p) end)
p:Destroy()
end
Destroy() implicitly disconnects all connections
you'd see that they pertain to leaking memory via not-disconnected connections
local ModelStorage = game.ServerStorage.Model;
local Counter = 0;
local TheModel = ModelStorage:Clone();
TheModel.InnerPart.Touched:Connect(function()
Counter = Counter + 1;
end);
local RegenEvent = script.RegenEvent;
RegenEvent.Event:Connect(function()
TheModel:Destroy();
TheModel = ModelStorage:Clone();
end);
for _ = 1, 60 * 10 do
RegenEvent:Fire()
print(gcinfo())
end
no memory is leaked
yeah
its constant
as expected
RegenEvent.Event:Connect(function()
TheModel:Destroy(); -- connection is freed here
TheModel = ModelStorage:Clone();
end);```
Anyways I will still always explicitly disconnect connections
because that's the only way to make sure they don't leak
alternatively you can destroy the instance
and that disconnects them all
memory leaks are hard in well written code, you almost have to try to make one to get one
heres a longer trial without :Destroy()
since the model is cloned to nil, the GC eventually gets to it and clears it
incremental gc 🙏
so I'd turn this into
local RegenEvent = script.RegenEvent;
local Conections = {};
local CollectionService = game:GetService("CollectionService");
local function Disconnect(Conn)
Conn:Disconnect()
end
RegenEvent.Event:Connect(function()
for _, Conn in Connections do
pcall(Disconnect, Conn);
end
end);
for _, Object in CollectionService:GetTagged("Door") do
local misndvinvb = Instance.new("Clikckofodvb ")
Connections[misndvinvb] = minsinfdig.MouseClick:Connect(function()
-- ...
end)
miminfdigfd.Parent = Object
end
that's what I'd do
and add a thing on regen to reconnect everything
in case it fails for whatever reason
(be careful with pcall, exceptions are expensive)
why would it fail?
I'd argue if it failed you'd want it to fail loud
instead of fail silently
then the game breaks and people spam reports
the only reason for it to fail would be if Conn was nil, and that sounds like its more a bug than a normal thing
sounds like a good thing to me
as in, you now know about the bug
it could theoretically happen if this were on a client with something like streaming enabled
but you'd need something a bit more to handle that
honestly if conn is already nil by the time it gets to disconnecting it then I don't see why you'd have to care
you should care
because it shouldn't be nil
and if it is, you should fail loudly instead of ignoring silently
that doesn't seem like a good assumption to make
i'd suggest just checking if Conn is nil and clearing it out if you're intentionally undermining program integrity for whatever reason
if you know it's not nil handle it normally w/o a pcall
All I know is that I've encountered some situations where a nil connection was causing an error on disconnect when it really didn't matter
I don't remember exactly what
But it's possible in some case
i had a similar issue while developing a plugin
but that feels separate from something like game code
also for this what if you want to maintain state
wdym
you make a component
and store it in that
or attribute, I guess, if you're sticking with collection service + attributes
either the script scope (not the temporary event scope) or attribute works
tf is a component
just like
some idk StringVariable object
I never use those
ok so ecs is a pattern
it stands for entity component system
everything in your game is 1 of those 3 things
entities are like your oop objects
components are things added to entities, they are like fields in a oop class
they have a name and a value
taking this at face value it sounds more like an interface in oop
local CollectionService = game:GetService("CollectionService")
for _, Object in CollectionService:GetTagged("Door") do
local misndvinvb = Instance.new("Clikckofodvb ")
local statecounter = 0 -- <--- HERE
minsinfdig.MouseClick:Connect(function()
statecounter = statecounter + 1
--- ...
end)
miminfdigfd.Parent = Object
end
so like that
systems are behavioral code that runs every frame (or n frames, or at a fixed interval, etc..) that act on entities and components
is what I thought
kinda? 1 component is like 1 field
entities can have any combination of components (and values inside those components)
but that concerns one method, not a field
minecraft bedrock uses an ecs
ik bedrock is like
hated on but
its a cool techstack
being explicit
thought you liked that smh
you the kinda person to use x = x + 1 in luau
+= is identical to @ = @ + x so it's less being "explicit" and just being "verbose"
(which i guess you can dunk me on since ada is pretty verbose, BUT. yeah)
dunk on atp anyways
I write luau cause its a fun language
1 of like 2
its a nice break from writing java in my datastructures & algorithms class
well in ada, like lua, we didn't have a contracted form of addition/assignment for the longest time
in 2022 we got @ in something like y := @ + x though so.. /shrug
no contracted assignment/addition is a luau thing
are you sure
yeah
I thought lua got it in 5.3
lemme open the cgi bin they have on the lua site and see if they do
looks like the cited reason is that lua is a single pass compiler
just open godbolt
nvm godbolt doesn't have lua
why hasn't anyone pr'ed lua or luau in
that just reminded me
afaik kotlin doesn't have short circuiting like in lua 😭
so (a == 5 && b == 10) will evaluate both even if a != 5
i dunno
you sure? cause in java bitwise operators explicitly eval both
probably some compiler oversight, they just pushed K2 so it might be good to try
i.e. a == 5 & b == 10
no, && as in logical and
it'll evaluate both sides for ex. an if statement
k2?? we got kotlin2 before gta6
yeah im saying theres an explicit syntax for evaluating both sides in java
so I'd expect kt to be not much different
I guess
probably wouldn't be that bad of an idea to read into kotlins one day
I wish I got to use kt more but
the places I can are so limited
most java I write/wrote was for work or for uni
and they ain't taking kt
i primarily write it for mod dev since writing a mod in java is inferior in almost all ways
they're actually kinda great
biggest hurdles are
- basically no documentation
- the workarounds modloaders use can get very annoying if you try to do something more expected of say, a desktop app
like they wrap a url to a file in an opaque format that's not documented anywhere
and the source being
decompiled and
deobfuscated (with symbols added, thankfully)
probably doesn't help
yeah
microsoft does give out mappings to most things which is a lot better than essentially just having numbers for names but
no javadoc at all
yeah symbols added
(also:)
what da flip
is that reflection
brah
reflection worst mistake known to mankind
nvm null was
reflection to our own classloader since we can't load in the native libraries the normal way
2nd worst mistake
apparently c++ is getting reflection though
can be good I guess, easy to abuse
reflect deez nuts
goat
C++ devs gotta figure out what they want their language to do oh my god
LOL
cpp committee when any new idea is proposed
"but it breaks ABI"
they all say in unison
it's even worse when like
hey c++23 has std::print
there's just random pitfalls in the C++ stdlib that look perfect for x situation but
we're getting somewhere
LOL the stdlib
don't even start
naw it actually destroys your memory soz
half the collections in the stdlib could probably be constexpr'd
but they aren't
cause nobody uses them
so nobody bothers to fix them
the consensus is to just use std::vector everywhere instead
cause its the goated datastructure
whats that
PE** format reader to compete with whatever aeras doing with his
huh
we love unsorted enums
honestly who even came up with the idea of error codes back there
wait till you need to call ConvertSecurityDescriptorToStringSecurityDescriptorA
"oh, this program could potentially have so and so error"
uses a CSPRNG to generate an error code for it
like why???
0xC0000005 for a segfault???
do not let them cook
might have to when i get back to TLS
I've been trying to get into numerical optimization and controls software more
its super cool stuff
thats a bunch of sciencey words out of my league
controls is just
how do I get from x to y
but like do it well
optimization is a big part of controls, its finding the minimum cost to do something
or maximum, etc..
ohhhh
pls help what does print("hello world") do
dude imma be real with you
doesn't ML intersect with that field?
I got NO clue
kinda I guess?
basically I think the gist of that is
people want to try to replace good ol numerical optimization with ML optimization
which, doesn't really work so well tbh
aw hell naw
math is math
you can't just trust a 9 bajillion long equation to do everything right
its cool tech I think but not ready for prod
let it cook
it writes the array of characters to the standard output stream
do not let that noisy mf cook
he forgot to tell you about
local print = error```
you cant just redefine globals 💔💔
I heard there used to be a bug in luau/rblx where you could actually access the genv
through getfenv
what does "the" mean
cause something in the genv would index the script global for some property (like ScriptSecurity or something)
and if you caught it using __index
and did getfenv(0) you'd have the genv
and you could do funny stuff with that
no way
patched long ago though
but yeah back to optimization its a super cool field I think
you can say like if I wanted to shoot a basketball into the hoop from a certain position, what would be the optimal angle/speed to launch it at
and stuff that into a optimizer and solve
just slap on the drag equation for a sphere or whatever
its definitely math heavy though and im not confident enough in a lot of it 😅
friendship ended with approximation.. friendship started with discretization
TRUE
discretization is fun
cause all the math you ever write is
continuous
but when applied to code that runs discretely
it messes up
i suck at continuous stuff personally
im just not smart enough to know how to represent the equation without breaking some fundamental part of it
but for relatively simpler stuff like magnetic field equations the visualizations that can come out are really preetty
well most equations you see are continuous equations
they are applied at infinitely small timesteps
your classical mechanics equation x(t) = 1/2at^2 + v0t + x0
thats continuous
but we iterate over it using steps of 1/60 for say a physics engine
yeah
thats "good enough"
but that equation isn't actually "correct" when applied in discrete timesteps
yeah
thats the whole point of discretization
it's a tradeoff between precision and sheer volume
(can we switch back to using analog computers......)
taking continuous functions and converting them into their discrete counterparts
no we will
add quantum communcations
and blockchain
instead
big data analysis
#programming #pmmodi #memes
(excl. optical data transfer)
says the RUST user
go back to adding @%($%(!#^) to your code
rust users when they have to reach an MVP (near impossible)
using rust is like proactively adding a decade to development time
Go back to your 20 character long keywords
huh im not sure what that is
my abstract tagged limited private record is top tier
I may use Rust but I’m not a nerd
contradictory statements imma be real
at the lowest level it's basically just, what if instead of electrons we used certain wavelengths of light
oh like fiber optic
since they're faster than electrons, you can mux multiple wavelengths,
yeah, but for logic
interesting
My ass ain’t out here talking about continuous equations and optical computing
Ideally not actually
7/10 times if anything other than '_ (an elided lifetime) shows up you’re doing something wrong
nerd
yeah he's got you there
Elided lifetime is like a lifetime jumpscare but it’s actually harmless
see previous comment
you have your elided lifetimes and we have our math but actually programming
Ok Mr physics engine builder
aw hell naw im not making a physics engine
I tried reading through the rust book and got 10% of the way in and gave up
that language is insane
ill leave that to nvidia
cpp is the far superior language
bomb his house
Cough
OK that was just an example
“iT wAs JuSt An ExAmPlE”
I might try rust again for advent of code
marowww mrraoww
every yea I've tried to learn a new language for AoC but it never works out
I just go back to
cpp
or python (god forbid)
I see your mod called physx
ITS NOT CALLED PHYSX
Ok like with rust I cannot recommend learning it by immediately starting to build things with it
unfortunately
Learn how it works first to reduce the damage to your head from banging it into the wall
Do like rust by example or some shit idk
idk I just wasn't that committed to actually learning it
if I was I'd have stuck with the book
I don't see when I'd ever use it instead of cpp
The biggest thing is you gotta figure out what the borrow checker wants out of you
Because it does memory management without being a GC
The 500 valgrind warning lines in question
ok well they're warnings for a reason




