Hey, Nir. I wanted to thank you, simply because you're my favorite programming related channel right now and make me having hope in serious, high quality and non click-bait-y content on KZbin again. Its informational and educational, quality over quantity and I appreciate exactly this in these days and times, where most channels point their focus on generating the most possible traffic through being striking and superficial.
@nirlichtman11 ай бұрын
Thanks, I appreciate this :)
@minnoxzmozzesmx891511 ай бұрын
I've known mmap for a long time, but not understand the practical use of it. Thanks for the tutorial.
@itsdrdy555111 ай бұрын
mmap in windows is VirtualAlloc, not a mapped file
@jorgerias26211 ай бұрын
Thanks, currently learning this in my OS class, but it's super insightful and useful to see someone program it.
@oracleoftroy11 ай бұрын
This seems like it has some pretty serious race conditions. Without knowing exactly what the guarantees for the shared condition variable are in windows off the top of my head, I think you would want to not autoreset so that the file won't be written to while you are reading it, and only reset once the read is finished. And you probably want to make sure it is false before the server writes new data,.. assuming we want every write to be followed by a read. (Something else would need to be done otherwise.) Still, pretty neat seeing how easy it is to set this up. I haven't needed something quite like this before and didnt realize that it doesn't take much code ro get it working.
@rian0xFFF11 ай бұрын
Next video: Making a simple GPT-4 AI in C on Windows
@nirlichtman11 ай бұрын
😂 "Minimalist" AI
@holiamusic11 ай бұрын
xD@@nirlichtman
@ngokhanh729111 ай бұрын
AI that predicts the age based on an input age
@guilhermebonato40742 ай бұрын
is possible to make a Lit in processes a and send to processes b in memori ?
@harunsarpnar342811 ай бұрын
high quality content congrats👏👏
@angelffg11 ай бұрын
Excellent video! Nir, does this apply to applications between 2 or more computers on an internal network or does it only work for communication between programs on the same computer? Thanks for supporting!
@nirlichtman11 ай бұрын
Thanks! It only works for communication between programs on the same computer, I mostly used this example to demonstrate basic usage of memory mapped files
@angelffg11 ай бұрын
@@nirlichtman Thanks Nir, excellent content!
@jmvr3 ай бұрын
I'd assume that if you want communication between multiple computers, you'd want to look into the WinSock2 API, or similar networking APIs.
@angelffg3 ай бұрын
@@jmvr Thanks 🙌🏻
@Pipe048111 ай бұрын
I'd love to see the Linux equivalent of this
@ryonagana11 ай бұрын
on linux. pipe/socket is the only way
@dimi14411 ай бұрын
mmap has an fd parameter that lets you map a file into memory
@ISAK.M9 ай бұрын
This was so well explained thank u man
@chuckhaatvedt751528 күн бұрын
Nir, could you expand on this example to show two way communication between the server and client ? thanks, this is very informative
@nirlichtman25 күн бұрын
One way to implement two way communication is to CreateThread on both the server and client and then you can have the thread listen on an event and read the message when triggered
@3bdo3id10 ай бұрын
Great work, I loved it
@thisisnotok210011 ай бұрын
Very cool. I've had an interest in how vpn clients "hijack" traffic to encrypt and reroute it to the the VPN server. Could you do a simple demonstration of an application that does something like this?
@nirlichtman11 ай бұрын
Thanks! Could you give an example about this? I am pretty sure the VPN clients just work by changing the network settings on the computer and set up the traffic to go through the VPN server
@GooogleGoglee11 ай бұрын
Very high quality, I think I have got lost 😅 Why not using 'nc' ?
@nirlichtman11 ай бұрын
The idea is to demonstrate how to work with shared memory on Windows