#💽Programming Chat v2
1 messages · Page 23 of 1
how does your uh
Meshing
Oh
if its like more nested than my cable management im gonna shoot myself
Tree
yyeah ig
hmmmm
so like..
would it be bad if i asked for the conv to go to technology
or would that be impeding you guys
oh right fair enough
Sentenced to 20 minutes of #1267583072728121384
See the forum things are great except you can't search in them
true
Whoever decided that it wouldn't be worth adding search per-forum should be fired
actual worst platform design
LOL
anyways my class reader still isnt complete even though it compasses 1000 lines
i still need to do attributes
Sounds like time for a refactor
nope
all looks perfectly fine
except for a few violations in dry which i can't control beyond throwing a giant "ternary" at them
Did you spell that wrong
spell what wrong
what time is it for you
you're probably in the state where words look incorrect but they're spelled fine (like Color)
11 in the morning
weird
No it looks fine now
I think the evil people were messing with me just then
It looked super weird
yeah maybe you needed a 10e2 to help you
Maybe..
oh GNAT... please get a tiny bit more smarter so i can just plug Read_Tag in these...
(it will always be either of the three)
forgot to mention each of the read functions except for read_class are all in their own files cause of how large they are
Yea I can't tell what's going on there
Is that a switch case
look up
I did
i think the case/when would be good enough signifiers
Item.Include is just setting a value in a map
Kinda? Case makes it seem like it's a single case in a switch
Is that switching on Read_Tag
yes
Oh ok
Really? It all looked like function calls to me
X'(...) creates a record of type X with the values provided in ...
Why new vs no new
new creates an access type (pointer) of something
it's called an allocator in the RM
usually these wouldn't be needed but due to the self-referential nature of a constant pool it's required here
So why don't you use new for Constant_Pool_Entry
Ok wait so new gives you a pointer? What does no new do then, stack allocates?
implementation dependent but for GNAT iirc yeah
you're advised to stay away from access types as much as you can even though they're safe to use all of the time
i'd use a Holder for indefinite types like the constant_pool records but again
self-referential nature
what are the big wrods
Whats an indefinite type here
uhh essentially a type whose size isn't defined at compile time
like an array type without bounds or a record with variants
I don't get what you mean by this either
hold on, helping someone rn
will show what i mean in a bit
Disaster, I'm grabbing lunch
so in this record
we have this variant here
which is defined as type Utf_8_Constant_Pool_Entry is new Constant_Pool_Entry (UTF_8);
Wait, the record contains itself
a specific variant of itself yes
For utf8
because the way the specification is "elaborated" (read by the compiler, at least to my knowledge), Utf_8_Constant_Pool_Entry will not be defined when it is used there
Alright
so we have to make it an access to an incomplete type (just type Utf_8_Constant_Pool_Entry;) and then define it after Constant_Pool_Entry
and yeah heres two examples of that
Wait so you define that type first, then Constant_Pool_Entry, then redefine that type after with the proper definition?
Oh alr I see
yeah
Neat
types are also "frozen" at a certain point (i.e., you're not allowed to add stuff to it like functions after a point)
but i still need to learn more about freezing + elaboration order so i'm not the best source of info
surprisingly comfortable to write in after a while ill admit
oh yeah i ned to fix these later
Yeah personally it used to be really tough switching between languages but now that I do it so often for school work and personal projects it's gotten significantly easier
Kinda related but not really lol, sorry
Seems like a good balance
Zeux outta nowhere dropped math.lerp like yesterday lol
oh yeah theres more nuance to this with things called storage pools but i have absolutely no idea what those are at the moment
whos zeux
He's the reason luau became open source
It was, he came outta nowhere and just dropped an implementation pr lol
🙏
Yep, and ncg should be a thing for it soon https://github.com/luau-lang/luau/pull/1609
Yes
excessive "free" time*
first jvm corrupted data a lot
second jvm errored a lot due to unfinished features (but was much much more safer as every table had both mutability/bounds/type checking built in)
third jvm might be where things work...
NO WAY
Yep
I'm telling you luau is kinda balling. I just wish the new typechecker was better and string requires would be settled on
Oh and I hope we get an actual package manager
the first jvm was written like
almost 3 years ago
so all i had back then was like string.pack/unpack 😭
LOL
never got real Long support too cause
everythings a double n all (and idk how to write bignums)
Buffers change a lot
Since shilling sci hub in that new channel wasn't effective I'll shill sci hub here
It's awesome stuff
what new channel
oh those
idk why they didnt just make more interest threads
if i get back to lua dev soon ill def check those out for networking/file stuffs
actually just reminded me
first/second jvms used simulated overflowing in order to remain within the jvm specification...
read/writebits might make me not have to do that!!
🤨
I mean tbf the java JNI stuff is just as cursed
that stuff is absolutely awful to write
and maintain
and
do anything with
very true
😭
don't worry
instead of sending objects people just end up sending the fields as args directly loool
cause jobjects are so annoying to work with on the c side
gonna be so honest i actually ran into the same issue with the lua jvms 😭
huh
granted its easier to work with since it's lua but objects are so opaque (like strings for example, you have to index at least 7 tables to get to the content of one)
ehh pretty okay
i never did any instruction speed tests on them without running into an error down the line due to corruption/hitting an unfinished block
despair
yeah heres what prepares a CLASS method for execution
(.CreateBufferStack is just a buffer w/ a cursor)
and heres the execution part
despair 2
I think you have an unhealthy obsession with while task.wait() do
no its normal pwomise
embrace the heartbeat connection instead
what r u working on
this is old code im just sending over cause its interesting to look at again
gonna be honest the reason i wrote jvm 2 was cause i wrote a class file reader for fun
then decided to spend my weekend on writing another jvm for it
I've been following a lossless luau parser written in luau's progress recently
its whole point is to be super fast
super cool project I think you'd be interested
heres what im actually working on (separate)
whats it name
sorry was finding the link
huh
CENTRAL STANDARD TIME?
oh that’s cool
and its fast
waow thats a lot of types
they haven't pushed local changes for a while though
😭
~30 lines for a constant pool in lua and 361 for one in ada.....
then again the one in ada is consolidated
dynamic require
ok that casing has to be a crime
what is that
I think any other choice would've been more sensible
its a good name, sir 👍
readu8, read_u8, ReadU8, readU8, Readu8
nvm some of those are bad too
the first 2 are good
readU8 🤢
lol
ughhh theres so much stream protection in this jvm i kinda wanna turn into its own library
but idk when i'd use it
never because checks are boring and we're part of the blazingly fast club here
oh, cause they pushed a complete rewrite to a diff repo (new name)
https://github.com/jackdotink/poke/tree/main/pokeless
i love debugging
whole lotta text
i had to do away with the timers cause they were just too extreme
application does 600 class files in under 100 ms eyeballing though
write it in asm you can do it faster
nyo
nyo??
lmao
I THOUGHT I HAD IT ALL TOGETHERRRR
https://cdn.astrohweston.xyz/u/06cf2ab4-bda9-4924-8f5a-3996e768bf4e.png
cheap!!!
im buying every astrohweston domain in existence and making it redirect to a certain page
why .
because i can
RICH
ASS
im not
5 billion dollars
in debt
WHAT
okay so
therees this guy anmed Chinese in this scp sl server and
we convertedf him into a chaos insurgetn and he had a pinkl cand y (makes youo blow uip)
what does any of that mean 😭😭😭
nya
:3
That's gotta be racially motivated
idk if it was
scp-079s name that round was literally just chinese text
I also stole a traffic light it's so great how simple they are to take off the rope young
What.
that is an image from my local technology store
i did not steal a traffic light
Oh
I mean it's 3 lights maybe a heater and a painted plastic/metal cast shell
NO I DID N
Can I have a million
this you?
Github edu 🔥🔥
GitHub said my student id was worth jack shit
what do you get with github edu
Free stuff
like
For example you can own the entire professional intellij line of apps for completely free
Usually thatd cost like a few hundred dollars a month
Coding stuff
Probably other vendors who support it too
Idk all of them though
`
yeah we should kill you
what does that mean
i hate writing code
so real
trying not to think about the other thing happening in my life rn though so
its all i got
oh
mmm
made it work up to JDK 6
but i think its starting to suffer from memory problems with 17,145 classes
or maybe its an I/O issue
yeah def an I/O issue
JDK 7 time
7 constant pool entries done, just need to do attributes... but first, an alignment test
hell yea
perfect run
8 SODA CAN ROBBERY COMPLETEEEE
it's very simple to make someone ragdoll in qserf
require(game.ServerScriptService.functions.get_character)(workspace.Real_N3bu14).effects:set({{effect_id="ragdolled",stack_count=1,strength=1,created_at=os.clock(),source={kind="unknown"}}})
(no you cannot do it with humanoid.platformstand)
huh??????
unconsenual ragdolling is a violation of california penal code 502.1 subsection 59A
I believe you'll find that meowing without a permit is violating Section 20 of the Offences Against the Person Act of 1861
#hopelesscore #programming #linkedlistsarentreal
Genuinely what’s the reasoning behind using a linked list
What does that do?
i assume you're asking about the case x is part?
I'm asking what part you meant by easier
no that's matching for if Frame_Type is within that range
Oh huh
this is a variant record declaration (the case x is) which allows us to set different fields for different discriminators (Frame_Type here)
finished version of that recrod
yeah
you can put fields above the case for fields whichll be present for every discriminator
or add a when others => branch which acts as a default for nothing matching any of the specified branches
(all cases in ada must be matched by a branch, or there must be an others branch)
also thats just the specification so it's not really "easier" but
i prefer that over this
Oh yeah that looks much better
impl time
more efficient for some ops
like adding to front is O(1) since you just make a new head and point it's next pointer at the old head
vs an array where you have to shift every other element
oh i never think about using arrays for dynamic structures
understandable but surely theres better structures that can do this and more
even if they're "heavier" memory-wise
well that was just one example
sometimes a linked list just lends itself more logically
also holy shit my specification is 750 lines long
like for example for the constant pool resolution idea that I had, I tried to use an array of linked lists
I did an array because there's only so many entries in the constant pool and you can make a fixed size array
but it's harder to tell how many other entries are gonna reference a given entry
so that's why I did the linked list part
so editing it would be way more flexible
i threw an Indefinite_Vector with some accesses in it as a solution for mine, i think that's something like a linked list internally
alsot hats a bunch of types
ughhh
this is gonna be such a pain
wait i never asked
what version of the JDK are you basing off again
6?
it took me a bit to figure out mine since there were holes in it at first
i went with storing complete stuff first in the map, then ran through everything in incomplete map using a special variant record with just indices
my idea is the array of linked lists
each array index represents a possible index being referenced
if we detect an incomplete reference, we do stuff[wanted_index].append(index_that_wants)
although honestly what I need to do is use pointers in the struct rather than copying by value
wdym
you know what the aliased prefix is in ada right
no
here
heres godbolt showing the difference
i still don't fully understand it but basically compiler has to do extra work
:<
lol
apparently they've had a PR to add documentation for it since 2018
sorry not a PR
just the issue
rust up here has had a bit of the same issues like zig
it appears to be a problem stemming from llvm
miscompiled code https://stackoverflow.com/a/57259339
I blame your choice of casing and the -> tab characters here
i blame you
You got me
re: linked lists, I find myself using std::vector almost exclusively in cpp, because the other stl containers are just so terrible
Unsafe Rust is like C in some ways, but there are tricky rules that unsafe Rust has to follow that don't exist in C. C also has some tricky rules of its own. This is a talk about some of these differences, particularly when it comes to pointer aliasing. I've gone through the autogenerated subtitles and made lots of corrections, so hopefully the ...
til
rust users hate zig users and vice versa
rust users are also c haters but zig users are c lovers
hardcore rustaceans are also Haskell stans
im watching a rust guy rn ... help
💔
rust copied our (A => 5, B => C, others => <>) syntax
nuh uh he's technically invoking the default trait there
teehee
unfortuantely idk how
casting parts of that array into struct pointers is a little cursed, but I can see that having a use case when packing buffers
scary and spooky code
#include <stdio.h>
typedef struct {
int x;
int y;
} Foo;
int f(Foo* foo1, Foo* foo2) {
foo1->y = 42;
foo2->x = 99;
return foo1->y;
}
int main() {
int arr[3] = {0};
Foo* foo1 = (Foo*)&arr[0];
Foo* foo2 = (Foo*)&arr[1];
int output = f(foo1, foo2);
printf("OUTPUT: %d\n", output);
}```
what do you think this prints?
LOL ok
I'll save the summary of that video for when you want to figure that out
cause thats essentially the entire video
the guy likes drinking water
too
its a pretty cool video though
look a little closer, what does foo2->x really point to?
outside of arr?
Foo is 8 bytes long on a standard 64 bit system, arr[3] (which i assume means 3 bytes)...
xxxxy[yyy]
^
outside
its an int array
lol
im not familiar with this syntax (Foo*)&arr[0]; what does it do
@timid quartz same question for you
oh
hes here
$5
i plan to make mine a bluetooth dongle but thats for later
anyways yeah
I would buy the pi 5 if I hadn't bought like 4 orange pi 5s when pis were outta stock
99?
Assuming it packs
casts arr[0] into a foo pointer
... so a null pointer
the funny thing is ||its both 99 and 42|| (thats the answer btw atp, if you don't wanna see it yet)
||its 99 with no optimization, 42 in O3||
nope
its just a pointer to the beginning of the struct in memory
or, thats what its treated as
Yeah but ||because both foo1->y and foo2->x reference the same spot, the foo2->x assignment overwrites it no?||
you guys dont need to censor it i dont care about spoilers
alr
i knew something about the sizes would cause misalignment and aliasing of some bytes but
they do reference the same spot, but c compilers in O3 will optimize the return to a constant 42
im not the greatest at C
instead of reading the pointer again
which is why its 99 with no optimization
and 42 in O3
idk about O1/2, prolly the same thing?
o1 does 42 yeah
yep
essentially c compilers have a rule that you cannot read and write to separate objects unless you know they are either distinct types (completely disjoint in memory) or they are the exact same object
that rule exists so that it can make that optimization
so it assumes foo2->x = 99 cannot possibly have effect on foo1
so the return just becomes mov eax, 42
weird
yeah, its interesting
theres a flag related to it called no-strict-aliasing
thats not in any spec though, so only gcc and clang have it
Ahh gotta love O3
is C under any specification body i forget
also hold
Checking .\classes\classes007_080\com\sun\xml\internal\messaging\saaj\soap\impl\HeaderImpl.class ...FAIL. 2382785355
yep, looks like even O2 will do it
I am once again begging C++ twitter to stop using Ofast
Quoting wang (@wangzhr4)
It turns out that compilers matter really a LOT.
For the very same code and optimization level, Clang built a extraordinarily performant executable while GCC's outcome was way slower (see the highlighted time-elapsed).
Maybe, it's time to set Clang as my default.
read something similar today
this was Ofast though which is much more aggressive
ye
oh, body?
like analogous to the cpp committee?
like ANSI
yeah ANSI C
oh cool
lol, Ofast
Ofast allows the compiler to violate the C standard iirc
It turns on -ffast-math, -fallow-store-data-races and the Fortran-specific -fstack-arrays, unless -fmax-stack-var-size is specified, and -fno-protect-parens
but can clang compile Ada
Didn't think so
It's GNAT not CNAT
gcc is just better
i think aera has a brain worm
clang is just a frontend for LLVM
🧠
which we already know sucks
tbf
I KNOW
ugh!!
But then what is THIS ABOMINATION
This is an Ada compiler based on LLVM, connecting the GNAT front-end to the LLVM code generator to generate LLVM bitcode for Ada and to** open the LLVM ecosystem to Ada.**
gross
llvm rust 🤢
I wish rust would have its own codegen
gcc rust 😁
I can't wait for when zig eventually does
(coming in... actually not that long)
wait fr
yeah iirc GNU is working on supporting rust

heres this project if its of any interest
who needs IR
rmn.. do it..
this feels interesting
in ada its just type Positive is Integer range 1 .. Integer'Last; but
theres no way of doing the bounds skip like in new_unchecked
unless you formally verify with SPARK that it can't be broken
i think this is cool that you can define your own restrictions like that through coed
but it still leaves an entry point with unsafe
i suppose the same argument could be made with ada using Unchecked_Conversion
but that'll still fail when the bounds goes to check it
I mean you don’t always have to mark this
If you’re able to handle the unsafe ops correctly then your entire function doesn’t have to be marked unsafe
Notice how main isn’t unsafe
And if you try to be funny…
That’s basically the thing that happens when Ada’s Unchecked_Conversion fails
yeah no i understand this
i just don't like the existence of new_unchecked in general
Yeah I doubt many people actually use it
It’s just a super lazy way around the unwrap
i wonder if there'll ever be a possibility of unsafe being removed from rust ever
Even the compiler kinda discourages you from using unsafe blocks so I really doubt anyone would use new_unchecked
Probably not, unsafe still has to be used for stuff like MMIO, using GPIO pins, and other stuff like that
The goal is to make safe wrappers around unsafe stuff
yeah but it just feels
... again ... short sighted
i know the ada way of checking everything at every step of the way isn't too applicable to the rust thought process
but there must be some way to do those operations while keeping program integrity
I’d have to disagree, I think it was deliberately done that way to visually mark areas where you’re doing things that could result in UB
yeah i'm just used to the former here
Letting the programmer know “hey you need to know what you’re doing and the program’s integrity relies on you here”
It’s harder to do that when you start actually interacting with the hardware, and even then there are still restrictions in unsafe Rust and you’ll probably end up in the same spot as Ada where you crash
it really matters on how you crash
Well you saw this
i'd assume rust is on par with ada even during unsafe ops where it recognizes a problem and panics instead of whatever C does
i think i'm just on another uh
whats the word
philosophical debate instead of a solid problem
There are ways to make rust just segfault normally and I’m sure you can do that with ada too but you have to really go out of your way
I can see how it’s nice to not have to deal with unsafe blocks but I also like the delineation between safe and unsafe that rust has
its almost like the exception v data argument we had a bit ago
I wonder if there’s a way to program a Teensy 4.1 in Ada
except in reverse
uhhh probably?
i was looking at the alire index and we've actually got a nice little embedded HAL set of libraries going
looking thru an ada journal from 2012
looks like someone got it working with the AVR set of compilers
alire toolchain --select
itt
looks like the teensy 4.1 uses an arm cortex m7
so youll probably find use out of this alire crate
oops
should've highlighted 4.
- might be useful too
Me when I use gcc-avr and compile c
avr-gcc*
Die
:<
okay lesson learned
'Input in aggregates MAY NOT be in order
perfect
just gotta do annotations
also im not sure how but this is telling me its performing doubly as well as it was with java 6 code
... ;3
reading the JVMS 7 date as 2013
i might have an idea on what to do

naw its okay*
i got it resolved
:3c

*At the time these lines are written and from the perspective of AdaCore, A&D is still the largest consumer of Ada today and covers about 70% of the market. *
man it really IS a mic language
(a&d is aerospace & defense)
not surprised why the community is so nonexistent
i find it funny in that post they also talk about how
they're pracitcally the only competitor and willing to keep it that way
but if they ever disappeared things would be fine
alternatively, the community is all top secret 😅
💀
they have links to the top secret stuff?? wow, please share on war thunder forums
wow you can even make a bridge with ada
don't tell civil engineers this
some of the links are broken due to age
but this is still up
frrom 2007 👍
LFG
ADA AC!!!!!
HVAC and CAD, which is it? make up your mind
Byron Informatik is dedicated to software development and consulting for engineering companies in the HVAC (Heating Ventilation and Air Conditioning) sector and for companies doing facility management. Its clientele are from companies around the world, including from Germany and Switzerland, and will soon include many more European countries.
so the program itself is CAD but tehe company does HVAC
3d printed ac tubes
cats are da coolest
oh ok
great, it just says CAD everywhere
wait, it is this cad
this article is from 1999 as far as i can tell so
what in the world is HVAC CAD
prboably
they had HVAC back then?? wow!
just talking about the integrity of this source
i cant be certain if any of the information is still applicable
Beware of bugs in the above code; I have only proved it correct, not tried it.
*In the near future, the application will be ported to other Unix workstations and PCs using Solaris. *
nvm
they did not add more favorites
no
keep your grubby paws off my Ada.
im talking about the correction crabs for brains
so you’re all crab furries????
also im so mad looking at the server membership count for rust
12,600 people 😭
meanwhile the adacore gap server has like
… 40
MEOWWW
MROWMEOEMROWMOEMWW
nuh
succumb to the rust mind virus
join us on comp.ada 💪
okay you too in Ada then
how many crates have you made btw
wh
and it's not really maintained
most of my stuff are executables and not libraries
I’ve got a whole chain of libraries i wanna make
yeah I pulled the 0.4.0 version
I’ve got SE 7 on the index, next i wanna add JAR support, EXE support, SE 9 vendor specific class store support…
Do you plan to use open cloud APIs for new stuff
Right
Forgot there’s like 5 billion rust devs making everything.,,
Mmm
I should make a line up of API stuff for Ada…
Actually no idk how id do that very well
Since… GNAT.Sockets…
And I’d imagine depending on AWS would be massively heavy
yeah but that’s practically just reading and writing the raw messages
Not whatever you guys have
I also have to finish my TLS implementation
Since it’s got up to the encrypted negotiation part of which idk how to program
Byteflippers, checksum, file_format_java_class…
Mmmm … JVM or ZIP reader….
I’m looking at what you guys have for JVM stuff
Not very good results :<
then just use google lol
Last update was 6 yrs ago though
Boorinnnggg
well yeah..."basically feature complete"
no update necessary
You can’t be feature complete with class files though
There’s a new JVMS every 6 months
Unless you plan to stick with SE 11
I can’t see the code but hopefully it has versioning limits
https://crates.io/crates/rjvm is also cool
More modern
Different philosophy though
This reminds me
Need 2 make a static analyzer for bytecode to ensure correctness
idk
kinda busy
not a lot of programming ideas in general
Unfortunate
Not really any motivation lol
I’m hitting a lot of complexity walls personally where I’m overestimating my ability
At least I’m learning through it though
This really is a toy
The urge in the back of my head telling me to write a Java compiler
Rust lets you do efficient reference-counted strings and dynamic arrays using Arc basically just as easily as their owning (and deep-cloning) equivalents, String and Vec respectively. So why not use them as a reasonable default, until you actually need the mutability that String and Vec provide? Get into the weeds with me here, feat. some cool v...
C needs to be a third person
permission to send an image really quickly
ugh dm me
AAAAA
read first idot
class reader can apparently function in embedded environments!
okay so its an issue with misalignment in lvt
thats not good
(he's gonna use lwjgl! a prebuilt game library!!!)
ok but that comparison is really good holy shit
been doing some research into color stuff and found oklab, it's super cool because its designed to be a perceptually uniform color space
also thinking about the best way to pick a sequence of colors that are perceptually as distinct as possible from one another
to me theres essentially 2 different design goals, I either want a sequence of N colors, or I want to be able to continuously generate colors (arbitrary N)
stack overflow seems to think, if N is small enough, the best bet is just a hand-picked list of colors, lol
and otherwise it links like 4 research papers into this topic - didn't expect it to be so hard to pick distinct colors
if anyone has any ideas or prior research/experience with this topic, would love to hear from u
agreed
Tbf, that's mainly a binder to OpenGL, though the audio system was basically just a random library he found and used, and ofc he's using Java which is pretty high level, it doesn't even compile to the machine, it compiles to its own wack-ass interpreted intermediate language
Java's weird
:<
That's just bytecode
dont insult my baby language
but lwjgl is a composite of libraries, lemme get the binder it sues
also i just realized you're gm... welcome back... again
Idk who u are sorry lol
Yes it is I, I don't really play Roblox or do stuff in it at this point but DT invited me to a project and I decided why not join QS
Who's DT
recurrent member who's done dev stuff here and there
DTrainsMan, FAAS guy
Yeah idk what is either 😅
awww nondescript, just their own......
qserf thing i dont know too much about either
Oh ok
i think its a intercom/vox thing
The voice announcements
Like the DMR ones
He voiced that
Unless they changed it
Oh ok
You did mean bytecode yes? If so, all interpreted languages do indeed have that
Yeah
Luau has its own bytecode too
Though Java just doesn't act interpreted I guess, you still need to compile it n such
Yeah
it is interpreted yes
Well, compile to btyecode, yeah
most JVMs have a just in time compiler for performance though
You have to do that for all interpreted languages
Yeah
but how fitting... im working on a component of one right now
You have to compile luau to bytecode too
Actually I recently learned about DUPCLOSURE and thought that was super cool
I'll send an example
local N = 64
local arr = {}
for i = 1, N do
local function a()
end
arr[i] = a
end
local eq = true
for i = 1, N do
if i ~= 1 then
if arr[i] ~= arr[i - 1] then
eq = false
break
end
end
end
print(eq)
would yall expect this to print true or false?
false since all functions are inherently different
unless they changed something with dupclosure you're talking abt
It's true in O1 and above!
neat
Yep, in O0, when that local function a is made, NEWCLOSURE is emitted, which creates a new closure (distinct function)
But in O1 it's able to tell a doesn't capture any upvalues
So it emits DUPCLOSURE instead, reusing the same closure
So all the references end up being to the same function
local function a()
print(N)
end
so i'd imagine this variant of a would not be copied?
Honestly I do really like Luau, just having typing makes things way nicer to use
I also quite like LuaJIT's optimization features though
Oh tough one. If you print i, it definitely would use NEWCLOSURE, I think N would cause that too but I'm unsure if it can tell N doesn't change
local function a()
print("hi")
end
This would still get DUPCLOSURE
I think it's based on if the function captures any upvalues
So N would also be a new closure
Luau can actually beat out luajit in a few edge cases! Still a little far from general case though
Huh neat
test
I've mainly been messing around with this language called Nelua recently
Funny Lua-style language that compiles down to C
ugh god this is miserable
Switch statements, structs, and typecasting in Lua, funni
Oo nice
Could prolly set that up in Nelua as well, it's got a really neat preprocessor system
i could say a single word but i dunno if thatd be a good idea
so you said 15 words instead? OK
the word is ada
does ada have that?
yes


