#💽Programming Chat v2
1 messages · Page 19 of 1
and although i don't use the u32s to their fullest i'm planning to add more stuff in the future
mf has "reserved" bits that will be reserved indefinitely
microsoft would like to hire you
:3
i also gotta make a generic package for bitfield enums
the PE file has approx 200 lines just dedicated to them
I gotta go destroy this exam in half an hour
i got my exam in an hour and 20 minutes :3
also
looks like the memory problem got pretty bad over 24 hours (repeatedly downloading a video)
195 mb is unacceptable
or use a language that does it for you :3
like rust :3
ada is faster
i think its a good tradeoff even if its a bit annoying
im sure i could get it quickly up there by reloading a video with no cache
but im gonna try and use valgrind
valgrind should work
just deallocate your memory!!!
512 kb and flush the ends to the http request..
give into the use-after-free
give into the random program crashes
or you could be like the guy who was programming a missile
my computer is not an explosive
big difference
OH
there is one thing that i know causes a lower library problem in ada though that it doesnt catch
"yeah I know there's a memory leak, but I've mitigated it enough so that by the time it becomes a problem, the missile has either exploded or has otherwise become useless"
quickly allocate and deallocate a C++ library
you should do that in a loop
i did
200 times
but the c++ library i was using was coded well
and threw a use after free error
code your own badly
sure and i'll also push it to a program 9 billion companies use
:3
oh yeah
with Ada.Containers.Indefinite_Holders;
with Ada.Text_IO; use Ada.Text_IO;
-- see if i can't commit use-after-free by keeping a Reference_Type's anonymous
-- access value around past its holder's lifetime.
procedure break_indefinite_holders is
type Thing is
record
name: String (1 .. 12);
end record;
package IH is new Ada.Containers.Indefinite_Holders (Thing);
function Funny_Business return access Thing is
use IH;
x: aliased Holder := To_Holder(Thing'(name => "abracadabra "));
begin
return Reference(x).Element;
end Funny_Business;
p: access Thing;
begin
p := Funny_Business;
Put_Line(p.name);
end break_indefinite_holders;
you can also technically use after free with this code
but that's kinda called for since you're using an access type
mf
//! Behold, a perfectly memory-safe use-after-free!
use std::hint::black_box;
use std::io::{stdin, stdout, Read, Write};
use crate::lifetime_expansion;
/// The size of the buffer we create and then drop.
const HORRIBLE_LEN: usize = 64;
/// Get a static reference to a dropped buffer.
#[inline(never)]
fn get_horrible_buffer_mut() -> &'static mut [u8; HORRIBLE_LEN] {
let mut buffer = black_box([0; HORRIBLE_LEN]);
lifetime_expansion::expand_mut(&mut buffer)
}
#[inline(never)]
fn innocent_prompt() {
print!("Give text (must be at least {HORRIBLE_LEN} chars) > ");
stdout().flush().unwrap();
}
/// Reads data from a freed buffer, puts random data on the stack, then reads it again.
#[inline(never)]
fn innocent_read(initial_buffer_mut: &mut [u8; HORRIBLE_LEN]) {
let mut stdin = black_box(stdin());
println!("Buffer before writing:\n{initial_buffer_mut:?}");
let _buffer = black_box([0_u8; HORRIBLE_LEN / 2]);
let _thing = black_box(69_727_420_u64);
println!("Buffer after creating random data:\n{initial_buffer_mut:?}");
innocent_prompt();
// "Nah, I'd win." - Rust compiler
stdin.read_exact(initial_buffer_mut).unwrap();
println!("Buffer after writing user input:\n{initial_buffer_mut:?}");
}
/// Create a buffer and drop it, then read from it in `innocent_read`.
pub fn use_after_free() {
let initial_buffer_mut = get_horrible_buffer_mut();
innocent_read(initial_buffer_mut);
}
thx for the free code
rust use-after-free
ignore weird name im using the learn adacore compiler
EXAM IN 20 MINUTES
(<- I am so cooked)
maomomrowemrowermoweomrwemorwe,r,,weormewor
i imagine i should probably be using debug info with valgrind
since this is all binded code.....
bleh don't know how to assign these to the representation 'Read and 'Write
Bro is not just cooked he's burned
honestly like
15% chance I clutched up majorly to get an A in the class
majority chance I keep a B
W test gameplay
IM BACK
FROM THE TEST
just walked a fuull hour rtrhough waist high weesd cause my phnoe was lost and i had t o walk home
Lol
but...
1 dolla
yeah
I wonder how much they can make that for
we love efficient miniaturization
even if they're beyond my understanding
My teacher had one of those
It was really nice
Didn't even feel cheap
finally got this compiled
now to open the PE reader and see if it works
the settled byteflipper is quite different
Is that a traffic controller plc
They can be, if you want uptime to go to 20 percent give or take 5
me when i replace the traffic controllers in arizona with a 3B+
(it destroys itself in the summer)
theres also people just spouting nonsense like elon/spacex/doge will fix it
like the system we have rn is robust and stupidly repairable 😭 how can you "fix" that
i love twitter
The existence of an efficiency department implies the existence of inefficiency, so I propose we get rid of doge
well it isnt a real department
just essentially a glorified suggestion box
doge suggestions or EVIL doge suggestions
🙁
cat is glorwing
tbf
elon is also the same guy saying the F-35 is a waste
he'd be amazing as a chinese spy
Did he say that
yeah
Goat
multiple times
I thought f35 was banger cause it's like hella cheap compared to the 22 for what it can do
now lockheed is going on twitter and saying trump doesn't agree with that because their stocks are taking a drop
Great
i wonder if lockheed has an assassinations department like boeing
maybe we'll find out
HUH
🧌
Replacing this reliable thing with something that dies the second it's micro sd does is really funny
Also it's not easily repairable you haved to buy a new one when it breaks
Also Elon musk saying the f35 is shit is funny lol
nice
i found an acars decoder chip
unfortunately it requires a serial port ( i do not ahve one )
isnt there serial port to usb things
i also do not have a usb port
how
full

are you making your own imgui clone
Ui design is my passion
I like the imgui look, but iris (the roblox imgui port) doesn't have what I want
And it also isn't imgui, it's reactive instead 
Quite evil
💀
Namely graphs
made them use the holder color (will send video after avg is done, it impacts readability a little bit but thats fine)
1% highs please thx
99 percentile, same thing
Action but it's a string?? How does that work
if its a string its a property read directly from Stats
otherwise the function provides the value
typeof <3
NOOOOO
(the averages rn are 10, but im gonna add a set of timescale buttons to configure that)
mixing units 💔
make the selector vertical or something 
i am not scrolling through allat
homosexual stats
A long time ago, I'd say just ask and see
If someone can answer it they will, don't ask to ask
Write fast python by writing as little of it in python as possible
It can be fast, just gotta let stuff like numpy do all the heavy lifting
Personal project
I usually use C# but errrrr .net
Could use C++, did make a basic game engine in that before
There is no other language which i can just start writing and know confidently there will be a package i can pull in that does 90% of the work
no that was literally my question, just seeing how many people used it
🐟
Doing linalg in python is awesome
Because i don't have to write a matrix implementation first
I can just full send
Oh
I used opencv a lot more for cv but I do remember trying pygaze
pygaze relies on psychopy and is a bit broken in 3.12 due to removed packages
will try to fix but might try opencv
Imgui
Yea absolutely love imgui, but the roblox port didn't have what I wanted. Also usually prefer imgui but trying to learn a reactive ui library so now we're here
I tried to use imgui once but I only have bad memories
How
It's dead simple to install and get content on the screen
cmake crashed my pc somehow LOL
bro ran a.exe
"But C++ is faster than Python!"
Check out (some of) the source code: https://github.com/SheafificationOfG/Fibsonisheaf
Soft prerequisite: https://youtu.be/KzT9I1d-LlQ
Timestamps:
00:00 - Introduction
00:54 - But C++ is faster than Python!
01:34 - (Horrible) toy example
05:18 - Object-oriented design
06:05 - Case study: a "linear" ...
memory leak!!!!!!!!
surprisingly not
if only your lang did deallocations for you..
the memory is freed here
which means even though we're handling >1 gb throughout the progarm, only 1.9 gb is actually resident at a time
in fact
i was actually pretty wrong about memory management in ada
the memory does get freed, but i'm not sure how exactly yet
"just follow best practices" mf
the ^C in question
nuh uh
i wonder if theres an algorithm for that
for a set of numbers from 1 .. 1_073_741_824, can you get the amount of characters needed to represent all numbers in that set (+1_073_741_824 for spaces)
since rn it only pages 1_000_000_000 characters at a time
what's the best algo or way to issue api keys for, let's say a roblox game that communitcates to an api to send/receive data from an external db
((10^n) * 10^(n+1)) + ...
oh true actually
an api
aside from JWT
jwt 👎
THATS WHAT IM SAYING
but that one is listed everywhere
oh yeah fair enough
and store that somewhere
LOL
yes but how would you have the middleware check it lol
it would be weird if it just
checked a db if the key exists
the only reason jwt is good is because you can check it with a private key or whatever they call it
whats a jwt
json web token
json web token
oh
ultra cringe
^^
idk if you really want you can use your own gpg key to sign it
and then check it in the middleware
but that's more trouble than it's worth tbh
can't you just use an oauth like system for this
or at the very simplest
oauth.. for a roblox http request??
request (usr,pwd) ->
<- response (1 time use key)
im not building a website or login im just doing api auth middleware
for
game data fetching and saving
oauth is for issuing keys so
it sounds the most similar to what you're asking for
what do you want
oauth is used to log into web apps, not backend calls
like he can literally just bang his head on a keyboard to "generate" a key for the server he's connecting to
and store that in a .env file or a database
then why'd they want a way to "issue keys"
idfk
if they just want simple auth
poor word choice?
just use the Authorization header if thats all you want
yes
poor word choice i didnt mean to make a system to issue keys
just a way to check if the provided key is valid
I just remember it being worse than the alternative I had
just keep a copy of your user/password groups somewhere secure (encrypt if you want)
and send an auth header like Basic <base64 user:password>
i tried jwt its giga weird, they do it with like <jwt>.verify and you would pass in your secret
honestly aera the db thing might be intuitive it just feels a bit weird because it would be a double call to the DB, 1 to check the key and the other to fetch/write data
you can just cache the keys in memory then
function mainFunction() {
let keys = getKeysFromDatabase();
// ...
}
or whatever
oh you mean that
or store them in a .env file
and just don't commit the .env file to git
bleh env files
well obviously 😭
i mightve done that befor
but idk how i feel about this in the long-term, like if i want to have a dev key or give someone else a key
i have moved my server to ubuntu 24.04
yep
extrapolating: w/o flushing to stdout, 72x speedup
lemme see the solution to this
of course YOU appear
yeah for a pvp server with like 10,000 people on it
okay so the solution is
10_700_048_964
what is that picture 😭
or 170,000
i really need to find a solution to handling that many connections at once
i don't think linux would be happy with 170,000 threads
that's not the problem
even if i had a supercomputer it wouldn't be the most optimal strategy
yeah i know im just implying that
a craptop cant be made into the god of computers
you need a good setup to begin with
yes they can
ok buddy
i didnt say to get like
a mega computer but
a decent computer would be good
astro i will run your brain on a raspberry pi
❌
✅
i should get a raspberry pi
uploading zip bomb to his neuralink
ok mr. im gonna import every large project into this one gitlab instance
@timid quartz wormhole receive 4-aftermath-woodlark
:3
what happened to your javart.zip
also this didnt load
it still works
and ik
you have to click on the link
reasoni m not using the domain is cause its HSTS
wait what why does this video work
loads for me
okay but try playing it
what was the alternative?
oh, that loads
wha
this server is noneuclidean
i need to look at what headers discord is sending
mb I could've phrased that better LOL
I meant like
that meaning of loads
not
literally that loads
brah
english is hard
guys what browser is good
i dont like arc or chrome and firefox is weird
bruh
a ny
should've said that before
asking the question
chrome is great
I have enough ram to run it so I don't care about it being greedy and otherwise it runs fine
doesnt chrome eat up your cpu lol
not really
yeah but I have 64gb
it does when you have a few dozen tabs
so im chilling
but every browser does that
wtf do you need 64gb ram for
cpp builds
so i can run 20 intellij ides at once
I consistently reach 60 (on the largest projects)
goated
I can't believe intellij is the only reasonable choice as a java ide
like why couldn't someone else
make something just as good
@timid quartz have you tried out the zed editor yet
on your mac i mean since you gotta build it for windows
what da flip is zed
o right
removable
some ide that was made by a bunch of nerds
i don't see the appeal in it personally
iunno wear thigh highs or something
you can take a look here
they made vscode with less menus
like i know these could have appeal to somewhere elsewhere but
- vsc/intellij are fast enough as is
- i don't really need ai
- i don't need real-time collaboration even with a team (git/telegarm is enough)
LLMs bruh
its over
copilot wrote some faulty code for a friend of mine on a project we were working on
and I didn't notice until like weeks later
minimalistic ide
mac and linux only as of now
you can build it from source on windows but it takes ages (at least for me)
their original aim was for it to be mac only
becuase it fits with mac more than windows or linux
at the end of the day I just be using vscode for everything except for heavy c + cpp, .net, and java + python
essentially just use vscode and whatever jetbrains has for the other ones
cause they are unfortunately just better
have you used vsc with wsl
do you know how to make the gpg signing not break when commiting
well because the key unlocking requires a password input in a tty
and the vsc commit button isnt a tty
i think it just kills itself preventing me from making a commit (other than manually doing a command for it)
huh
I've never tried to sign in wsl before
in fact almost all my commits are just unsigned usually
😈
evil
probably need to change what gpg program is used to open the key
is this your issue
yup
"have u tried sfc and dism???"
chill bruh thats only microsoft forums
saving this here
i really dont wanna make an MP3 encoder in ada rn so im gonna unfortunately write my first python server
actually no
ill just add chunked transfer**
Not at pc rn will get it soon
Give me like 15 mins
lmk when you're back so i can put it back up
back
@spare quartz
@spare quartz
@spare quartz
@spare quartz
@spare quartz
@spare quartz
WHAT AERA
BACK
UGH HOLD
WORMHOLE
watch it :3
BUT IT SOUNDS GOOD RIGHT
ig?
yay :33333333
fuck
its better than this
what in the world is wormhole
virus aera made me install
bro does not know how to make ui
file-sharer
oh interesting
so the better sftp
kinda?
uhh its basically ftp over something like ngrok
ui design is my passion
TRUE
pop out button that just launches the cpp imgui
with the same data
that doesn't sound too hard actually
they can just both listen to something on localhost
im not doing that
if only httpservice was able to run on the client in prod
unfortunately then roblox would become a dos tool 💔
requires ID verification 
just make a remoteevent and have the server do it on the client's behalf
in prod
localhost doesn't exist in published servers and even if it did you'd see like
RCCService stuff 😭
no no aera was talking about the roblox player that has his setup in the datacenter
yeahhh
probably
We have api key and database key splitting in Guardsman V2 lol
So everything you are asking
gg
your point being..?
Just make a key for the user in the db
Point it to their id
ok yes but that's an entire admin system i
mmm
i mean
yeah ig that works but i only really need one key right now which is the key for the game to request and send data
i- what
i'm not doing this for guardsman
it's for my own project i'm working on from scratch
oh
also sorry if this seemed passive agressive what i meant to say is i cant use v2 as a reference because it's not released
how much have you taken from v1 
I’m still pissed that sky made it MIT 😭
I’m pretty sure the in game module for external saving is done
isn’t GLink anymore
whats wrong with MIT
I assume you're talking about the license
also unrelated but I used to be #1 admin system lover but at a certain point I just realized its so not worth the effort
but kinda cool
REMINDS ME
i was peering around the voice chat service stuff and i found out thats how you make it compat with the audio api system
i should make a radio
HAHA IT WORKS
makes me uh
wonder
could you theoretically just capture peoples voices
without them knowing
i can plug a video into a VAC and have it show up on the graph
Over what
You’re either about to say AGPL or closed source
ben would go great at (Every company ever)
STRAIGHTEN YOUR ASS PROGRAMMER
@lyric mesa THIS LOOKS SIMILAR 👁️
i'm currently still continuing with my eye tracking with opencv
i liked the facial landmark method so i'll see if there's landmarking available for eyes
i tried doing threshold method and it's too annoying
this is all that come to mind with "landmark"
@spare quartz 
WHAT AER A.
i should make a virus that plays this on your computer whenever im pinged
How about I make a virus that deletes Ada every time you open an Ada file
dew it ;3
?
yo I think this is the wrong audacity
how
oh thats a plugin
LOL
vocaloid or something
crazy
That's not a virus that's an anti virus
Actually real
i like it /shrug
there are 48 buttons in that list so maybe but its not really that bad to use
unless you lack a scrollwheel....
then you're sol
should probably make these divisions porportional to min/max
the huh
for those statistics
avg is a decent number to look at but
usually what I really care about is
the 1% lows
avg isn't really a finished thing rn
its just a linear filter
with a moving window
yeah but im waiting until i add timescales to actually do more with them
since rn they're just hardset to an arbitrary number of samples
oh
cause a moving average is just a FIR filter
where the FIR gains are all just 1 / samples
i also need to factor in dT with the graph since it's reading every frame rather than a defined interval
scary..................
yeah
ill probably add an input to allow the user to set the percentile of samples to use
(if you have a generalized implementation of a FIR/IIR filter)
lemme get the link where i found it
it was on some math stackexchange post
yeah
the Averages table is going to be used for timescaling (1s, 5s, ...) but rn it's just "how many samples do you want"
(which due to the problem above with dT means the averages aren't over a time... which is the polar opposite of what i want!!!)
it was listed as an answer so it's infallible
yeah idk if thats the "proper" way of doing it
the only way I've done moving averages was either with a FIR filter
or by doing the convolution manually
I think I've used numpy.convolve for it
before
it appears to give the right answers and does smooth out extreme changes so i think it's fine
of course still just a wip though
I wonder if it would match the 2 other ways of calculating average I listed
can you try
Gay
if I write u an implementation
I just write luau
pfp checks out
TRUE
Write it in Rust make atp ultra mad
open wormhole!!
cause I'd just call np.convolve
;333333
dw ill find the c file and go off from there 👍
goated
Not AT HOME
Idk
Why is it called oven when you of in the cold food of out hot eat the food
w hat
Nice embed NERD
i died a minute after spawning :<
scp 939 failed to lugne attack me but i only had a pistol 😭
unfunnylad posts all artifyber content to me
omg do youo know what NSA xkeyscore is
Do you know what grass is
no : 3
i walked a few miles 2 days ago and like
90% of the grass outside of my school district is yellowed/dead
Did you get burnt from the sun
surprisingly no
Did you recoil in shock like a vampire
i havent gotten a sunburn in years even though im like
super white
(i dont use sunscreen)
Did you wonder what the super bright ball in the sky was
look at this guy who stared at the sun
yeah WAS
LIKE IN A MEAN WAY
9 billion times degredation
omg so keycore ✨
w hat
tz go back to moderating deez nuts .......
im gonna mute you yapper
nya nya nya
@spare quartz hi I went to grab dinner
--!native
--!optimize 2
type Map<K, V> = {[K]: V}
type Array<T> = {[number]: T}
export type MovingAverage = {
_average: number,
_samples: number,
_n: number,
_window: Array<number>,
compute: (self: MovingAverage, n: number?) -> number,
}
local function avg(n: number, window: Array<number>): number
if n == 0 then
error("not enough values in window!")
elseif n == 1 then
return window[1]
elseif n == 2 then
return (window[1] + window[2]) / n
elseif n == 3 then
return (window[1] + window[2] + window[3]) / n
end
local sum = 0
for i = 1, n do
sum += window[i]
end
return sum / n
end
local function next_avg(n: number, prev_avg: number, last_n: number, next_n: number): number
return prev_avg + ((next_n - last_n) / n)
end
local function compute(self: MovingAverage, num: number?): number
local average = self._average
if not num then
return average
end
local n = self._n
local samples = self._samples
local window = self._window
if n < samples then
local next_n = n + 1
window[next_n] = num
self._n = next_n
local next_average = avg(next_n, window)
self._average = next_average
return next_average
else
local next_average = next_avg(samples, average, window[1], num)
table.move(window, 2, n, 1)
window[n] = num
self._average = next_average
return next_average
end
end
return function(samples: number): MovingAverage
local average: MovingAverage = {
_samples = samples,
_average = 0,
_n = 0,
_window = {},
compute = compute
}
return average
end
passes tests ✅
wow someone who actually tests
oh i just opened scpsl
ill impl after i die
I wouldn't be surprised to find out that the branching is actually slower than the loop
if the loop gets unrolled for n < ~10
the branch is probably transformed into a jump table so don't sweat it
there might be some funky or straight up errors if you use samples <= 2
I'll add a test and fix that now since you're in sl
nevermind it works
im the goat
made it better
and more tests!
is this frame under a screengui
if its under another child it will be constrained to the parent size
okay time to impl this
also question why do you do type Array<T> = {[number]: T} instead of ... = { T }
it looks nicer
😅
GA y
I like how Map<T> and Array<T> looks
i used to too...
in fact I have them aliased for the entire workspace in vscode
but now i just do plain {}s
also { and } is farther on the keyboard compared to < and > 🙂
local a = require(a)
local b = a(10)
while ...
b:compute(value)
end
i imagine this is how i use it?
yes
well
it returns the average
you can also call b:compute() to get the average again
you should probably add the return argument to the local function decl. of compute
but seems simple enough
yeah I usually do
alright impling it now
I guess I forgot
@spare quartz fixed the return types
It’s directly under a screengui and anchor,size,position are all set right
And it’s not updating when I change the viewport size 😭
there
should be impled
huh
OH it's on immediate sampling (0)
wait no same error
just made it skip over computing averages for 0/1/5
next error
top line in output is [Value, SampleSize]
ugh
its cause i forgot to update a var
nothing just a bunch of mini problems
how is that possible
changed the naming on something and didnt see the tiny orange line
huh
no clue
ui design is my passion 😅
so the same
wait
its the same except for one of them?
the exchange equation is more "volatile"
it changes for every value put into it
yours appears to buffer
can you assert(math.abs(a - b) <= 1e-6)
oh
that'll prob fail then
based on what you say
yeah ok what I think is happening is
the stackexchange formula takes the average at the head
or no, at the center
whereas mine takes it at the head
so that means spikes in the underlying data is in phase with the average for the stackexchange method
whereas spikes in the underlying data is out of phase (average is behind) for my impl
thats my guess
its nice that the stackexchange way means you only store 1 number
thats kinda cool
(automatically assigned)
nice peak
and another shot
finally heres one with 1,000 samples
yeah hm
maybe my conclusion earlier was wrong
@spare quartz oh wait
I just realized
?
I think the stackexchange answer is the same as sampling everything
so its not really a moving average
do you get what I mean
you hold onto the average forever and continuously change it
whereas in a moving average you only view a window of the past n samples
which means the average is exactly the average of the window
and not the average of everything to this point
(note: the averages were complimenting each other due to an oversight in the code, updated to fix:)
yeah that makes sense
i was thinking of doing the sliding window approach initially
but didn't wanna hold onto thousands of samples given a long timescale/many selected elements
each value in an array is 16 bytes
so its not really a big deal
until size gets crazy
an optimization that could be made is to use a circular buffer instead of the array
that would avoid the table.move call entirely
I didn't want to implement a circular buffer so
wait what's the structure of an array element in lua
[???][8 byte double]
yes
its just a TValue
but what is that
incredible
but yeah every single value in lua/luau is a TValue
even booleans are 16 bytes
HashMap<usize, T>
:3
package Aera_Is_Babio_Question_Mark is new Ada.Containers.Indefinite_Hashed_Maps (String, Meow, Ada.Strings.Hash, "=");
I think they are just an array of TValues?
so many,,,,
strings in luau are UTF-8 right?
well cause it doesn't matter at the end of the day
oh ok
was gonna talk about 8/16/32 bit characters but /shrug
also i think utums tired themselves out
WHAT FATSO
STOP GAMBLING IDIOT
NO.
shut up
crippling liars table addiction
HEY I WON THE JACKPOT 4 TIMES
OUT OF LIKE 200
160*
your payouts a penny after all you've lost

