#programming
1 messages · Page 89 of 1
not really, you can just do index = x + GRIDSIZE * y
i guess it's still probably worth it
having a huge array full of small vectors does not sound very good
then again if it's small enough it might just not matter 
if you have a limit on the maximum depth you could use a 3D array though, as Toast said 
if you feel generous you could just make a N * M * (N*M) array 
there is no official limit but there most likely wont be more than 10 in a single array
unless i add a fuckton of npc's
in the python engine i was using 500 * 500 * depth
so a casual 2.5k
nah i forgot how to math
250k
use a 3D array and overflow to another instance of the array if necessary 
could make the overflow arrays sparse too
what's the grid for again i forgot
collision
within a single frame?
yes?
i was doing some weird shit in python. didnt perform too bad for a 2d list of 250k
i know nothing about games but i feel like there has to be a better way
memory accesses spread out as widely as possible 
add -MMD and -MP to your compiler flags, add DEPS = $(OBJS:.o=.d) after OBJS and add -include $(DEPS) after your OUTPUT var.
This will fix a bug where you change a header, but make doesn't recompile the cpp files that depend on the header.
never had that bug lamo
oh I just noticed you are hardcoding all of your objects 
you still have the bug though, you just won't have noticed it.
and it's a bigger problem since you probably put definitions in your headers
some iirc
might not exist right now because there just aren't that many objects, but yeah, maintaining this would be an issue once there are transitive dependencies on headers
fixed???


is this for collision?
unless your objects are always unit aligned, a BVH might be a better bet
BVH 
lemme google
Basisvoorziening Handhaving 
oh ye bounding volume hierarchy, the shit RT cores use
it's definitely tough to implement, but man is it fast when you do
boxes within boxes within boxes within within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes within boxes
was bvh where you recursively partition a set of objects into 2 boxes
that just sounds like a ∞D array
it's closer to a tree than an array, but essentially yes.
it uses AABB's which is what im using rn from the gltf file data, sounds good
I do not own any clips, i just try to save Neuro/Vedal content so everyone can watch it
15.05.2024
https://www.youtube.com/watch?v=7t5JbAue6eY original song
https://www.twitch.tv/vedal987 dont miss any stream
https://discord.gg/MZPyedT check out the official discord
https://twitter.com/NeurosamaAI Neuro's Twitter
https://twitter.com/Vedal...
so basicly to bvh i have my range of collision, so [playerpos, playerpos+movevec]
and that gets used to prune the unneeded tree branches till we have the needed objects left

i wonder how they should be grouped tho
a first step would be to group all the boundingboxes of a single mesh toghether, but then what?
are we just memeing now? 
something like this should be fine i think
struct MeshAABB
{
vector<Object*> boundingboxes;
}
std::vector<MeshAABB> BVH;
there will most likely be less than 100 meshes total

Double 5090?
It's not a 2-way setup, the 5090 doesn't support NVLink or even p2p
It's just two GPUs on the same system
Meanwhile me:
The 3090 is exclusively for training
Hopefully it'll be sooner now that I have a 3090
judging by the process running, this two 5090 setup is probably going to be some fallback for serving small audio models
andd it only takes up 8gb so
practically free for the second one

the lack of antialiasing bothers me way more than it should ngl
i’ve been away for 3 days, where are screeps
scroll up a few hours
oh
We got the same setup lmao
Whuh
You also have 4070Ti + 3090?
Ye

now i just need a 4070ti to match
also a A770 which I'm waiting for the next pytorch version which will add native xpu support
i7 13700F and 128gb ddr4 3200
I'm running mine on 12700K and 64GB of overclocked DDR4 at 3800
yea i had that cpu before
Actually i have no idea when i upgraded to 128
I remember always having 128gb somehow
But ik i bought at some point
128gb was so trivial to his bank account he forgot 
I think i had 32gb before
dude ur making me sound rich lmao
128gb here is like 500 bucks , thats as much as superbox paid for his 3090 without shipping
I was somewhat surprised how well DDR4 overclocks, I have the cheapest 64GB kit of DDR4 3200 and it fairly easily went up to 3800
ah i found some for 350. less than 500 but still expensive
245chf which is uh
Cheapest DDR4 128GB with a quick look is a 4x32GB kit of the same RAM I have, and it's 344€
307 usd
in theory i could just buy another 100 bucks 2*32 kit since i already have one, but idk
its cheaper to just buy 2 seperate kits and hope for the best ye
At least that's a valid start on DDR4
Did u read
Where
Everyone is still craving ddr4
So now it started production again
and apparently costs more than ddr5
They had stopped DDR4 production?
Ye
Whuh
For ddr5
can they start producing ddr3 again
I don't currently even have a motherboard that could take DDR5
ddr5 is still more expensive than ddr4 to buy. if it costs less to produce make it cheaper or suffer while making ddr4
me neither
do you have one of those ddr4 only alder lake boards huh
ye
i really enjoy mu current mobo, i will make it last another 50 years hopefully
Windows 12 system requirements
AsRock Z690 PG Riptide
not for work obviously but it has a lot of io so good for home theatre setup
Meanwhile Linux
im probably switching to linux after 11
unless 12 happens to be decent, which i doubt
I already switched because 10 broke for me
im staying on my old ass windows 11 version
For some reason a Windows update broke my Windows 10 install so badly that I could no longer do literally anything after the OS had been running for 1 day
I no longer have any Microsoft malware running on my system
Windows being stupid of course
it took them a while but they did add it to the eu version too eventually
just rip it out and be done with it
Windows is malware, uninstall Windows and install Linux
i only have the shitty rename
im genuinly never using office 365 again unless i need o cuz of school
i hate the rename
like actually i fucking despise it
i have office from school but
frick it
i exclusively use google docs
cause also the teams office live multi person editing thing is so bad
if u know what i mean
the one where many people can edit the doc at once
Here we use Google's stuff and OpenOffice if I remember right
googles workspace thing literally has
a whole integrated plagiarism software
and grades export
and plagiarism check for microsoft word stuff
im so good at coding 
if (collision)
{
boundingbox box = {};
box.min = glm::make_vec3(accessor.minValues.data());
box.max = glm::make_vec3(accessor.maxValues.data());
for (int i = 0, i < 3, i++)
{
if (aabb.min[i] > box.min[i]) {aabb.min[i] = box.min[i];}
if (aabb.max[i] < box.max[i]) {aabb.max[i] = box.max[i];}
}
boundingboxes.push_back(box);
}
Silliness
the almost maxed one with google costs 37.50 euro/year while basic office 365 costs 2.50 usd/month otherwise for the better one 6 usd/user/month
how did it get in here
microsoft usually hands out contracts with much lower prices than this to orgs (especially in education), idk if google does that too
they do
they literally have
a free option
if ur a recognized institution
i once got an unlimited google drive using weird methods
microsoft 365 A1 which is also free has Outlook, Word, Excel, PowerPoint, OneNote all of em web only while google has most of their stuff included
they have 100tb free disk for the whole institution
and secure ldap etc
oh

YES
would go well with my copilot
finally my passwords are stored unprotected on a txt file
somewhere
after keylogger
it's stored somewhere in between the keylogger and the screen scraper
possibly besides the voice monitoring
they're adding an agent to settings 
❓
gamedev 100
bool intersect(boundingbox a, boundingbox b)
{
return a.min.x <= b.max.x && a.max.z >= b.min.x && a.min.y <= b.max.y && a.max.z >= b.min.y && a.min.y <= b.max.z && a.max.z >= b.min.z;
}
bool boundingbox::intersect(boundingbox& b)
{
return min.x <= b.max.x && max.z >= b.min.x && min.y <= b.max.y && max.z >= b.min.y && min.y <= b.max.z && max.z >= b.min.z;
}


ig if i make boundingbox a class that could work
rn im just doing
struct boundingbox
{
glm::vec3 min;
glm::vec3 max;
};
structs also have methods
the only difference between structs and classes in c++ is default visibility
the only one that matters, anyway
the only difference between a struct and a class in c++, is that a class is private by default, and a struct is public by default
yup

"Open"AI getting mogged by random ass Swiss guys
wym ETH is huge
everyone and their mum collabs with eth
shadows mum collabs with ETH confirmed
Fun question, why is it every time I switch my audio to my Bluetooth buds instead of wired headphones, the stream buffers for a few seconds?
I thought some weird Bluetooth interference, but would it also interfere with Ethernet? 
Depending on the capabilities this could be neat. 8B and 70B are good sizes to compete at. Doesn't seem to be multi-modal though which is a real bummer.
like wifi?
i dont think so
idk
Me neither 
If chat is anything to go by, my internet doesn't seem like it's getting interrupted by this
stuttering for a few hundred milliseconds would make sense since the player is supposed to compensate for the delay introduced by the Bluetooth connection
a few seconds is a lot but maybe it needs to calibrate or something
idk how this feature is implemented, but it exists 
I don't think Twitch compensates for Bluetooth latency, or if it tries, it's not doing well lol
And it's not immediate. I switch to my BT buds, the stream is audible and continues to play for like 3-4 more seconds, and only then it buffers for a moment and resumes normally
it should be done by the browser, but yeah, maybe it's just not supported in this case

?
my mum did IT but 1000 years ago
.

@sage crag look at the "dictionary passing" part of this page, specifically haskell vs ocaml comparisons https://okmij.org/ftp/Computation/typeclass.html
(note: it may be confusing that ocaml uses int option to mean Option<int>)
Describing three strategies of implementing type classes, aiming to clarify their behavior
i guess we reinvented typeclasses in hblang 
interestingly, scala uses implicit parameters for this (parameters that get initialized using functions that are registered as implicit)
Can you stop breaking for 1 day????
My roads bgoke cuz my builders stopped repairing them
Ooooooh

you should use typescript NOW
Silly game distracting you from game engine dev
This is such a specific meme lol
https://i.redd.it/hgil3v0vggcf1.jpeg
Also mods pls don't nuke me this isn't political 
Also what are you guys doing
Was at a pride parade today and now I feel like shit after walking 14k steps 
Im not gonna fix it rn lol
redesigning my language mostly from scratch
Making good progress? 
Porting shit to c++

it's been a good few days of 24/7 thinking and reading and zero programming 
idk whether you'd call that good
Classic 
As long as you're having fun? 
The fact he's typing for several minutes now scares me
i did achieve some progress
- figured that if rustc doesnt always terminate i dont have to always terminate either, just complain to the user if something goes wrong
- realized that subtyping is typeclasses + automatic sum type generation (i.e. it's kinda a natural extension of classic type systems; the latter part is what's new)
- thought a bit about subtypes and supertypes (thoughts pending)
When does rustc not terminate? Never heard of this :D
chay thinking of types???
struct S<T>(T);
fn fib<T>(n: T) -> u32 {
if false { fib(S(n)) } else { 0 }
}
fn main() { fib(5); }
Also, the whole area of math or whatever the main category is that contains all the type stuff, is like black magic to me
it just recurses a bit and then gives up
I'm so happy there's smarter people than me that can reason about it and make a neat compiler
notably, typescript takes a different approach - it recurses a bit and then accepts the program 
Neat! But at least it gives up. I thought you meant literally hang
I'm scared to ask, but the program then isn't correct right?
it may or may not be

automatic ToC 
ToC?
table of contents
supposed to look like this
designed a road / extension layout
the middle is spawn, pink is road, yellow is extension
i suppose so
i have not been programming for a while either, taking a short break
I haven't programmed in too long
i've been trying to program but my brain keep complaining about not yet knowing how to do X and back to research i go
real
I keep starting researching, getting over-ambitious and giving up because I've done something too hard
voiced fricative
std::optional<glm::vec3> boundingbox::intersectRay(glm::vec3& ray)
{
glm::vec3 dirFrac;
for (int i = 0; i < 3; ++i)
{
dirFrac[i] = (ray[i] != 0.0f) ? 1.0f / ray[i] : std::numeric_limits<float>::infinity();
}
float t1 = (aabb.min.x) * dirFrac.x;
float t2 = (aabb.max.x) * dirFrac.x;
float t3 = (aabb.min.y) * dirFrac.y;
float t4 = (aabb.max.y) * dirFrac.y;
float t5 = (aabb.min.z) * dirFrac.z;
float t6 = (aabb.max.z) * dirFrac.z;
float tmin = std::max(std::min(t1, t2), std::min(t3, t4), std::min(t5, t6));
float tmax = std::min(std::max(t1, t2), std::max(t3, t4), std::max(t5, t6));
if (tmax < 0 || tmin > tmax) {return std::nullopt;}
t = (tmin >= 0) ? tmin : tmax;
return ray * t;
}
im so good at porting stuff from python to c++ 
i wonder, would
glm::vec3 dirFrac = glm::vec3(1.0f) / ray;
be equivalent
idk how pedantic they are about their floats 
coherence... where are you..... i want you back...
?
i want extensibility and i want it now i want it i want it i want it
but evil programmers say no i want to change my program BOOM extensibility gone
why

i'm currently on a huge tangent, as i'm looking for ways to model overloading i figured why not try row types, and i can certainly do it but the problem is if i do row selection based on supported operations eventually some of the rows may get more operations boom program broken
return ray * t
this seems off, either you're missing the offset in this, or you are using a non-unit ray vector.
of course i could alternatively just say "this code may break at any time good luck", not a problem since erf will not be used at scale (hopefully)
wdym?
that im not changing the vector to world space?
the ray equation is r = o + td and you seem to be missing the o
everything is calcuilated as local cuz its a move vector
o would be needed if the boundingboxes were in world space i think?
what values are you expecting ray to hold?
just the direction
its a vec3
o would be needed if the boundingboxes were in world space no?
then how is the initial position of the ray fetched?
as it seems rn, that you are always tracing from the centre of the box outwards.
there is no fetching of the initial position, but its meant to be the move vector of the player
glm::vec2 movement = glm::vec2(right * move.x, forward * move.y)
it is always needed, as otherwise you would never be able to tell the difference between a ray pointing inwards, and one pointing outwards.
where and how do you use this function?
first we get move from the keypresses
if (keystate[SDL_SCANCODE_W] || keystate[SDL_SCANCODE_UP]) move.y += 0.3 * deltaTime;
if (keystate[SDL_SCANCODE_S] || keystate[SDL_SCANCODE_DOWN]) move.y -= 0.3 * deltaTime;
if (keystate[SDL_SCANCODE_A] || keystate[SDL_SCANCODE_LEFT]) move.x -= 0.3 * deltaTime;
if (keystate[SDL_SCANCODE_D] || keystate[SDL_SCANCODE_RIGHT]) move.x += 0.3 * deltaTime;
then we convert it to player directions
glm::vec2 movement = glm::vec2(right * move.x, forward * move.y)
then we use it in the collision
it also should be normailzed for the collision i relaize
do you just extend movement to a vec3?
so movement is in player local space, but what space is boundingbox.aabb in?
ah fuck
its in world space

i forgor
no wait, its in object space?
ye its in object space
what is object space?
the gltf file has a centre
thats object space
in python i was doing
meshBoundingBoxes = obj[1].boundingBox + obj[0].position
for meshBoundingBox in meshBoundingBoxes:
localBoundingBox = meshBoundingBox - pos
if you want to omit the initial position, you must transform the bounding box into player local space, otherwise you will be way off in your calculations with that code.
ye in python i was putting them in local space
but that probably wastes some cpu
its better to jsut add the +o
Another test with gary. We're not quite there, but he's got the spirit.
Turns out I've just gotta explain the game better to gary 
Today I flaunt my proudest creation: home.svg, it took 30 minutes to write 12 lines, but it was worth it in the end
You could say it's a programmers house
at least it displays somewhat correctly in the browser

i might seperate the logistics logic for filling spawners into a dedicated group of creeps

This looks like someone took a 144p image and tried to upscale it with ai
okay bad idea i'm losing a ton of storage om
not anymore 
for (RenderableObject &rendObj : objectlist)
{
position = rendObj.object.position
rendObj.model.aabb.min += position
rendObj.model.aabb.max += position
for (boundingbox &box : rendObj.model.boundingboxes)
{
box.min += position;
box.max += position;
}
}
fuck i made a mistake
fixed
My lazy butt wouldn't even bother with this, I'd just begin the goto spam
makes me think of that wordcloud lmao
It was your worldcould as well
took a while to find lmao
i notice ive gotten inbto the habbit of "lmao'ing"
huh
huh
Whar

im still here you know
me?
your free to try 


you what?
are you like an amputee?
ah
the diital realm still folows the rules of time
you cant just ignore one of the fundamental rules of ourr universe cuz you exist on a fancy siicon rock with engravings
?????????
dont worry about it
I can only imagine either bot, or an insane crashout
u mean "based sherk"?
sherk is based I'll give it that, but I half assumed something else happened
i dont think so
dont remember anything else happenign
@tight tinsel nothing happened right?
i was just confused on what they were saying
im getting linking errors bwaa
those are the best 
wdym you don't like getting 10 pages of errors just cause you forgot to add -ltbb
though ig that's a best case kinda
Idk why
Im defining a struct in a .hpp
Abd making the function in the .cpp
And it compiles the file, but wont lnk

wdym
explain plz
wdym explain? my question is right there..
You could always write html,css,js on a notes app and open with browser 
hmmm. i wonder what the website "address" looks like
There were two ways to parse that: make a site for mobile, or make a site on mobile
some file:/// thing
oh. my question is to make a site on mobile 
In that case my advice should work? let me test rq
rahh linkedin if your gonna send me emails keep them to promotions!!!
http://127.0.0.1:12882/main/0/storage/emulated/0/Audiobooks/main.html
Not what I was expecting but sure
i thought i got another acceptance email but no its linkedin tellig me some random guy "looked" at my profile
@raw agate seems like it'll work, ig on android it is some port on localhost
Nope, seems like my file app is doing that
I'll give it a solid maybe
Your tolerance to pain is waaay tooo high
Why duck?
Hey twins profile pic
respect
anyone here an electronics nerd
I'm sure there is someone
Scary 
😭
it is hand drawn
Looks pretty well taken care of
later revisions used modern PCBs
and more surface mount components
this device was manufactured from 1984 to 2002
It escapes me that engineers of the old days also draw the PCB traces by hand
oh wow, must have taken quite a lot of hand soldering to get it working and validation to make sure that all the wires are properly done
im mining now in 2 extra rooms outside my main room
why wont you link motherfucker 
g++ output/main.o output/shader.o output/loadGLTF.o output/glcontext.o -g -o output/a.exe -Lsrc/lib -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf -lopengl32 -lglew32
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: output/main.o:main.cpp:(.text$_ZN6Render8baseloopEv[_ZN6Render8baseloopEv]+0x246): undefined reference to `boundingbox::intersectRay(glm::vec<3, float, (glm::qualifier)3> const&, glm::vec<3, float, (glm::qualifier)3> const&)'
collect2.exe: error: ld returned 1 exit status
wtf does this even mean?
I regret what I have done
now I need to debug my junk

it's time to learn how to use a debugger 

link errors
a debugger wouldn't even help with this though, it's a compile-time error 
it means what it says, main.o isn't being linked to an object file containing that symbol
but it shoudl exist???
should work I think, idk what's broken, have fun
fuck
you could check what symbols are in loadGLTF.o but idk how to do that on Windows
am i maybe accesing it wrong?
std::optional<glm::vec3> collision = rendObj.model->aabb.intersectRay(movement, position);
aabb is supposed to be that struct
I don't think so
if it's an issue with the function signature or the call then I think the compiler should be complaining instead of the linker
I think you have an affinity for tech support!
the problem is that it looks like it should be working
but it doesnt
even chatgpt cant figure it out
thank you very much, my patience for solving random bs problems with a complete lack of information is infinite 
i changed some things and now the compiler is spitting oput a bumch of unused functiopn errors
bwaa
btw is the ftp server down?
I leave #programming for a day, and it seems like things are on fire today huh
yep
welp, doing an illegal and putting the function in the header works
struct boundingbox
{
glm::vec3 min;
glm::vec3 max;
std::optional<glm::vec3> intersectRay(glm::vec3 ray, glm::vec3 origin)
{
glm::vec3 dirFrac = glm::vec3(0.0f);
for (int i = 0; i < 3; ++i)
{
dirFrac[i] = (ray[i] != 0.0f) ? 1.0f / ray[i] : std::numeric_limits<float>::infinity();
}
float t1 = (min.x - origin.x) * dirFrac.x;
float t2 = (max.x - origin.x) * dirFrac.x;
float t3 = (min.y - origin.y) * dirFrac.y;
float t4 = (max.y - origin.y) * dirFrac.y;
float t5 = (min.z - origin.z) * dirFrac.z;
float t6 = (max.z - origin.z) * dirFrac.z;
float tmin = std::max({std::min(t1, t2), std::min(t3, t4), std::min(t5, t6)});
float tmax = std::min({std::max(t1, t2), std::max(t3, t4), std::max(t5, t6)});
if (tmax < 0 || tmin > tmax) {return std::nullopt;}
float t = (tmin >= 0) ? tmin : tmax;
return ray * t;
}
};

so it was purely not linking the function in the .cpp to the struct in the .hpp
never come back to this code in the future again
nevermind
...
output/a.exe
Init OpenGL
GLEW initialised
OpenGL initialized
GL_VERSION: 3.3.0 NVIDIA 572.83
make: *** [makefile:22: run] Error -1073741819
no, that's not how linking works 
the call in main.cpp only considers the function signature specified in loadGLTF.hpp and then emits a reference to that function/symbol
the implementation in loadGLTF.cpp should provide that symbol for the linker to find later when it needs to resolve that reference
the linker never sees any header or even any source code, only the compiled object files
if your implementation doesn't match the signature written in the header then the compiler should at least emit a warning

what build system are you using? normally that should take care of all the linking
makefile 

but yeah.. i get it.. build systems are a pain even if they should "just work".
i used fips for my own engine since i used sokol. it worked... but adding new libraries was still a pain
yet again I see sam getting tortured by c++
nah, these are just average C++ issues
it's an overly complicated language with dogshit tooling
python was so much easier
true
maybe use scons as your build system. its basically python
I have found my mistake

I did m(1, 1) * m(2, 2) instead of m(0, 1) * m(2, 2)
took me some time to find it
ah yes, Scons, the build system most known for being so awfully slow that everyone is moving away from it when possible
"Oh man, python is so slow on this task... let me search if there're ways to make python faster"
Top search result:
Convert Python into C/C++ code 

-# 
wdym slow?
that's what it's known for
idk why it's slow, I've never used it since there hasn't been a reason to
well.. i use it to compile the godot engine all of the time.
wow.
im used to the supermarket door ignoring me
but it did it TWICE today
on the way there it just shut right in front of me and i had to walk around for like 10 seconds for it to notice me
on the way back it just ignored me again
learn some manners 
need a chayleaf visibility day
Please no, use meson instead
what is meson... literally never heard of it
i get that... but what uses it
Wdym? As in a big project that uses it? IIRC, GNOME uses meson a lot
but also what is the benefit of meson over something like scons
I've used it for modm.io
i never heard of meson but i've seen a few scons users
Can say, not my cup of tea to use SCons
Because it's not basically python, it is python
to be fair meson is also python
Mhmm, fair point
Meson only generates a file for Ninja to run though, similar to CMake and others
AFAIK Scons actually tries to do the build itself 
honestly that shows me.. that it literally doesn't matter... 10 seconds slower is like nothing if its a multi-minute compile anyway
surely the issue doesn't become worse for larger projects
That would be cursed ngl
I didn't know that. I thought SCons were handling it over to ninja or smth when using modm
honestly.. i don't plan on starting a new c++ project anytime soon.. so i won't worry about build systems
i just have to use scons because the most c++ i write is for GDExtensions for my godot projects
rendObj.model->aabb.min += position; why does this not work?
it makes the program crash during runtime
is the model a nullptr?
this meanas model is not a valid pointer
it shouldnt be
it was freed or never initialized
well.. are you checking if it is before accessing it?
thats why you use shared_ptr (or unique_ptr)
it should be in scope, and its also a std::shared_ptr<Model>;
cout works but mutation doesnt?
well, thats when you learn to use valgrind or asan
fuck
Everytime I see Sam error
Like actually, how did you manage to do something so cursed that the whole compiler, linker, and IDE straight up give up
windows?
nobody cares about windows
just link correctly 
ofcourse, why didnt i think of that?
It is time Sam, to use build system. They've been calling you from the abyss this whole time
dont think that would help here
I think it will help with linking mishap
thats not the problem anymore
it wont magically link to asan
Oh, it's new
https://github.com/google/sanitizers/wiki/AddressSanitizerWindowsPort
https://clang.llvm.org/docs/AddressSanitizer.html
Clang has asan on Windows 
LLVM wins again
meow meow
Any ideas of what to eat?
food
is this rizz chat
your climate is different from siberia so idk what seasonal dishes you have but its summer so i think i'll start cooking eggplant dishes every now and then
Eggplant sounds nice
Thanks for some idea
Spicy eggplant it is
my color transform made in Blender's compositor is better than Filmic 🙏 😭
Are you also one of those that hold 100+ tabs hostage?
Firefox has it‘s own task manager with shift+esc, there should be a list with gpu so you can spot whats hogging vram
are you the halting problem
i am a halting problem, but not the halting problem

halting problem sounds less dangerous than non-halting problem
What does the * operator do?
multiplication?
Can't be too sure on one of these days where everything is on fire
i have figured out why it crashes i think
apparently doing
using ModelPtr = std::shared_ptr<Model>;
makes every ModelPtr mesh1 = std::make_shared<Model>... the same exact class?
then i tried adding debug prints and it stopped crashing
then i kept the code that gets the stuff for debugging but removed the prints and it still didnt crash
and it didnt do any function calls, it just accessed some pointers
find this behaviour very weird but idk
Why not?
because its just a type alias
idk what parametrized means but model looks like this
class Model
{
public:
std::vector<MeshDraw> meshdata;
std::vector<boundingbox> boundingboxes;
boundingbox aabb;
Model(const char* filename);
void drawModel();
void drawDepth();
~Model();
private:
std::unordered_map<int, GLuint> textureMap;
void bindNode(tinygltf::Model& model, const tinygltf::Node& node);
void bindMesh(tinygltf::Model& model, tinygltf::Mesh& mesh);
void bindAttrib(tinygltf::Model& model, int binding, int vecSize, int attribPos, bool collision);
void createTexture(const tinygltf::Model& model, int index);
};
You know what, I think I need to sleep for a bit for now
yeah using shouldnt affect anything here
on firefox any good dark mode extensions?
each one is a diffrent instance, but if im using the same model twice then it gets fucke up
Dark Reader
absolutely the only good option 
thank you o7
Interesting IP 
i think movies do it on purpose so they dont collide with actual people's ips
guys did you know my ip adress is 192.168.....
Yeah but they could have just used a local IP then
also just in case you didn't spot it, look at the fourth octet
i did spot it
I needed a second look to spot it 
lmao my ip adress location puts me in france 
Mine puts me in my country's capitol, the opposite of where I actually am, the benefits of LTE I guess, GeoIP shows nonsense
ok new development.....
//this one doesnt crash
rendObj.model->aabb.min += position;
//this one does crash
rendObj.model->aabb.max += position;
i didnt even change anything
im so confused
i added prints and it stopped crashing??????
wtf
ask chatgpt or something
and valgrind doesnt work on windows it seems
UBSan 
chatgpt was like "do this command" and i did it and it didnt work
classic
it just gave me shit i tried already
if you want ASan or UBSan you should just use Clang
dunno what ChatGPT is hallucinating there but it just doesn't seem to be supported with MinGW
didn't you say you were on windows?
does windows have a pacman?
cause the one chatGPT generated is definitely the one for arch
ah
addignmore prints made it break again
hmmm
i need to find the optimal amount of prints
https://github.com/msys2/MINGW-packages/issues/3163#issuecomment-2451639935
okay yeah unless something major changed in the past few months sanitizers are just not supported with GCC on Windows

and valgrind doesn't exist on windows either so you can't use that instead
Clang has sanitizers on Windows though 
at least ASan
how do i do that?
I do wonder why you can't just use MSVC, you can still use it in a makefile, you just need to use the developer console to run make
Install Clang (again), change compiler calls in your Makefile to use Clang, add the ASan flags
https://clang.llvm.org/docs/AddressSanitizer.html#usage

alternatively if you don't want to bother with ASan you could try manually printing some pointers and seeing where they're pointing and why that memory is now inaccessible somehow
geuss im using c++20?
replace 23 with 2b
you should probably use clang as the linker
MinGW Clang 
so delete mingw?
probably just get the proper version of Clang and fix your PATH to point to that first
(or figure out what's wrong with the MinGW one)
maybe install mingw-w64-clang-x86_64-compiler-rt
issues like these make me very glad that I don't have to mess with globally installed half-broken toolchains like this 
@real sierra things have gone very, very wrong
Hello MetaHumans
the amount of meow's and awa's is incereasing every single day
istg what is awa
with each day #programming 's autism grows stronger
awa
awa
awa
awa

its a vicious self-reinforcing loop
installing clang again is making my windows defender freak out 
meow
Did you uninstall it?
Windows and unsigned, rarely seen executables
its doingf this rn
clang should absolutely not freak out windows defender
??? why are you building LLVM
im following the guide
Just download it from GitHub 
I'm pretty sure you can download a precompiled version but good luck 
nah, take me to gh
They even have an installer
yeah, I'm 99% sure you even had it installed already 
never seen someone actually building at home
i was just mindlesly following the guide lmao
the Gentoo users in question
You should already have it installed unless you yeeted it
surely that has nothing to do with why you have those weird problems to begin with 
welp
Sam shares so much stuff about his game engine here that I know which C++ toolchains are installed on his system
if you still have the original Clang install from when you first set up all the C++ stuff then you should be able to just use that 
Ah so it was clangd right
you probably know better than me cuz i have installed so many random bullshit files now that i lost count
no, this is not what i mean by cps
You should have all of llvm iirc
Including asan
Well not all but all that matters
executables my beloved
honeslt someday i will nuke this windows install and all these installed programs tthat im not using
yes linux
i will have a dualboot tho cuz i need my satisfactory
reasonable
satisfactory should run just fine on linux no?
oh yeah, Satisfactory is compatible
isnt proton less performant than jut using a barebones windows?
no
idk where you heard that
it might be depending on the game
but it might also be faster depending on the game
yeah, it's faster sometimes 

it's a completely different stack than on Windows, so performance can be different than on Windows sometimes, but due to Valve and the Steam Deck a lot of effort has gone into making it fast over the past few years

another win is you wont be able to run roblox or league of legends
same goes for lol
right, I remember that there was a wine version for that specifically
I guess it broke with Vanguard if they have that for LoL now
idk I don't play it
mhm its just game companies being actively hostile rather than linux's issue
lots of energy to mine from this container
my question is how he even got on top of the wall
road?
no road
just wall
why tho? 
my brother plays lol sometimes
your brother is single forever
bro literaly has a girlfriend
impossible
they watched pirates of the caribbean yesterday
wtf based??
i had to get the files
legendary trilogy

The files you ripped from your owned Blu-rays
also there are 5 movies, wdym trilogy?


if i counted all 5 i'd have to take the "legendary" part off
are the last 2 bad?
nah ill watch all 5
LINK : fatal error LNK1181: cannot open input file 'SDL2main.lib'
fuuuuck
sdl2main is for mingw
why is it using MSVC now 
is it not supposed to?
I don't think so, no
no, ideally use lld as the linker
what even is lld?
dunno what dependencies you have left on the MinGW stuff, that's on you to figure out 
linker from LLVM
its just a visual bug
i had some of my miners be on the other side of the room a few times
ah yes
Satisfactory runs on Linux
got it
Almost all Windows games run on Proton on Linux
i love when trying to install php on WSL doesn't work for zero reason
And yet I still see people say "Linux doesn't run half of the games"
and start arguing about it 
if your games are on steam you're basically golden
Just tell those kinds of people to try it if they think stuff won't work
there are still compatibility problems (like lack of some professional software) but games are not one of them
one day we will get a non-office(dot)com 365 suite on linux
like literally it's an office software why in gods name is it so integrated into the operating system 
tbf the few games that don't run are some of the really big ones that can afford intrusive anti-cheat solutions (like LoL)
plus they're often multiplayer which makes the social aspect of switching worse, so it quickly becomes a dealbreaker
Platform dependency
Yes but claiming "half" doesn't work is just plain wrong
All the malware games
Oh of course
Yeah I did an oppsie
in like 2019-2020 i switched from linux to windows just for osu!taiko because fps was unsatisfactory (not the actual fps, but the fact it looked choppy despite running at good fps, some kind of vsync issue or whatever)
But don't tell me you do not agree 

Half the ones that matter to the average person 
switched to linux for good in 2022 though
Yeah I typed their library is literally League and CS2 with some flair
(so like all games)
I went to Linux because Windows just stopped working completely because of an update
in its place is an emacs config that takes up all of my free time 
hi heir 
I was planning to switch anyway, just not so suddenly
hio
the games that i like do actually run on linux under proton!
osu! runs natively, factorio runs natively, and i literally never launch anything else
Surprisingly most games run perfectly well on Linux
the month of july seams to be the invasion of mods into #programming
my friend was lamenting not being able to get helldivers or vrchat to work on it
I assume malware games with anticheats

vr is a bit wonky because its headset dependent
Kernelside anticheats are basically malware
that aint nothin
have you seen what thery snuck into borderlands
i can never play it again
Helldivers has Sony AC and VRChat has EAC
VRChat literally 1 click away from support, it is just not enabled 
vrchat is rated gold on protondb
https://www.protondb.com/app/553850
wait holy misinfo
Helldivers is gold as well
it straight up wasnt working for her
If there's a bug in a kernelside anticheat, it either takes down the whole machine with it, giving a BSoD or gives a vulnerable entrypoint for malware to enter to the highest level of permissions
maybe proton experimental?
Wait thefuck, vrchat is Deck Verified
i assume it depends on the type of linux
yeah, was about to say
I played both of those on Linux a while ago 
(not with VR though)
-# (a while = 1-2 years ago)
games absolutely do require troubleshooting every now and then on linux, its a bit of a pain
Literally the same thing can happen like it happened to that other software. Crowdstrike was it?
Yeah, and that's why you keep your games out of the kernel
i feel bad for the nonprogrammers switching to linnux thinking they will have a much better time because windows is a fuck
I wouldn't want the devs that make games that run like garbage with 0 optimizations poking at my kernel
well, the thing with linux is its getting better and better but you very much have to be good at googling
There's very casual-friendly distros
Mint is a good one that just works most of the time
you don't need to be a programmer to use Linux
you do want to have the capacity to troubleshoot issues and learn new stuff though
i wont make the switch until i absolutely have to :/
you can try dual booting
yh if you need something that just works ™ , linux is still not really there yet
With how Windows 11 is going, I wouldn't even bother with Windows any more
its inching ever so close though
next year is the year of the Linux desktop 
steam and how it's done proton removed so much headache from figuring out wine
an inch is a miniscule amount of movement when youre trying to run a marathon
well, many people in this channel run linux and it works for them, windows causes its own kind of problems
one day maybe it will be there 

as a typical non programmer end user who doesnt even engage with the side things windows has I dont really have enough problems to warrant a switch to linnux
(and not in this channel, haven't seen mito in here)
tbf there's also the fact that many things are just designed without considering linux
yeah agreed
we're just kinda left figuring out how exactly to interface with it in a way that doesn't pain the user
like the damn ipu6 cameras on new laptops 
im gonna inevitably come across thigns i want that i just can no longer have if thee switch is made
yeah, I think there is a disproportionately large amount of Linux users around in online communities like this in general
you just don't really notice because they're not mentioning Arch Linux all the time 
Like an update making the system unable to do literally anything when booted for a day
That's what happened to my Windows
my brain is hurting from clang
clang clang clang
good thing that you can use both 
dualbooting or using a VM is kinda annoying for daily use but very good for learning so that it's less of a hurdle later 
it is the time once again
hopefully it explodes less under hyper-v instead of virtualbox
i am the table
and clang is the metal pipe
named after the sound of it hittin my empty skull
i forgot i have an ice cream
i will no longer have an ice cream in a few minutes

i am having pizza in a bit
that's new
how have you managed to get into a state where I can't power off my nixos vm 😭
your first mistake was thinking you have any power over nixos
m
im considering making Io a struct like Allocator
ship it before zig does so you can say you did it first 
i'm postponing work on erf i got a weird new idea a stack based language with first class continuations
any particular reason you're doing this over just installing it under wsl? 
that sounds so cursed but i'm intrigued
I kinda want to mess around with a desktop environment
is Allocator a struct?
i should've guessed that 
the problem im trying to solve is specialisation in Io operations
its an API right?
I might end up using nixos for some rpi stuff and it feels like it'd be easier to debug like this
idk really though
API, but loosely for each function that takes it, Allocator is a struct
including asyncio
mainly because while making operations async with epoll is trivial, actually running them async is hard
also file operations just block either way 
true 

didnt you already have some prototype for that i forgor
vaguely, but i decided that was too much specialisation

why are we linking with gcc
can you send the makefile again 
rather than having separate apis for IO operations, just separate IOs entirely
CXX := clang++
CXXFLAGS := -fsanitize=address -O3 -Wall -std=c++2b -MMD -MP \
-Isrc -Isrc/include -Imodels/V-nexus \
-target x86_64-w64-mingw32
LDFLAGS := -fsanitize=address \
-Lsrc/lib \
-lSDL2main -lSDL2 -lSDL2_image -lSDL2_ttf -lglew32 -lopengl32 -fuse-ld=lld\
-target x86_64-w64-mingw32
OUTPUT := output
SRCS := src/main.cpp src/shader.cpp src/loadGLTF.cpp src/glcontext.cpp
OBJS := $(SRCS:src/%.cpp=$(OUTPUT)/%.o)
DEPS := $(OBJS:.o=.d)
$(shell mkdir -p $(OUTPUT))
all: $(OUTPUT)/a.exe
$(OUTPUT)/a.exe: $(OBJS)
$(CXX) $(OBJS) -g -o $@ $(LDFLAGS)
$(OUTPUT)/%.o: src/%.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
-include $(DEPS)
as ive seen, separating Writers and Readers into individual APIs tends to fragment IO and it would make it nearly impossible to do something like async cohesively
might wanna remove the targets
oh right there is also the problem of some operations not necessarily being supported (like seek) but honestly this can jut be solved with an $if + @error
now it just cant open SDL2 for some reason
mhm exactly, if something doesnt implement a function it just stubs it with a compile error
deos sdl2 depend on the compielr?
i actually wasnt aware that zig was doing this. is this their answer to function colouring?
yeah, one giant interface that contains everything that can block the main thread apparently

















