klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
<zid> old*
<heat> i get excited about new computers, i get excited about old computers. iget excited about computers
<heat> linux ekranl operating system windoze
heat has quit [Remote host closed the connection]
heat has joined #osdev
xenos1984 has joined #osdev
Brnocrist has quit [Ping timeout: 245 seconds]
netbsduser` has quit [Ping timeout: 246 seconds]
Brnocrist has joined #osdev
joe9 has quit [Read error: Connection reset by peer]
joe9_ has joined #osdev
MiningMarsh has quit [Ping timeout: 250 seconds]
joe9_ has quit [Quit: leaving]
nyah has quit [Quit: leaving]
Turn_Left has quit [Read error: Connection reset by peer]
heat has quit [Quit: Client closed]
netbsduser` has joined #osdev
heat has joined #osdev
<heat> is there no way of more or less knowing a wifi thingy's location from the signal?
<heat> like some sort of weird triangulation but with wifi routers vs cellphone towers
<moon-child> hmm what about wifi extenders? Can you tell which one you're talking to?
[itchyjunk] has quit [Read error: Connection reset by peer]
dude12312414 has joined #osdev
netbsduser` has quit [Ping timeout: 248 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Vercas has quit [Ping timeout: 246 seconds]
m3a has joined #osdev
goliath has quit [Quit: SIGSEGV]
netbsduser` has joined #osdev
gog has quit [Ping timeout: 246 seconds]
netbsduser` has quit [Ping timeout: 248 seconds]
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build]
elastic_dog has quit [Ping timeout: 245 seconds]
eck has joined #osdev
elastic_dog has joined #osdev
netbsduser` has joined #osdev
netbsduser` has quit [Ping timeout: 246 seconds]
m3a has quit [Ping timeout: 246 seconds]
heat has quit [Ping timeout: 246 seconds]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
GeDaMo has joined #osdev
Jari-- has quit [Ping timeout: 260 seconds]
<Ermine> silly idea: use RDF to find the device
<Ermine> probably too much noice for that
frkazoid333 has quit [Ping timeout: 248 seconds]
[itchyjunk] has joined #osdev
Jari-- has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
xenos1984 has quit [Remote host closed the connection]
xenos1984 has joined #osdev
Left_Turn has joined #osdev
Bonstra has quit [Quit: Pouf c'est tout !]
Bonstra has joined #osdev
Jari-- has quit [Ping timeout: 248 seconds]
Burgundy has joined #osdev
phoooo has joined #osdev
phoooo has quit [Ping timeout: 246 seconds]
gog has joined #osdev
Turn_Left has joined #osdev
Harriet has quit [Quit: K-Lined]
Harriet has joined #osdev
Left_Turn has quit [Ping timeout: 245 seconds]
netbsduser` has joined #osdev
CaCode has joined #osdev
MiningMarsh has joined #osdev
CaCode has quit [Quit: Leaving]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 246 seconds]
SGautam has joined #osdev
goliath has joined #osdev
heat has joined #osdev
<SGautam> So when I create a TCP socket with parameters AF_INET, SOCK_STREAM and bind it to whatever ai_addr I get from socket()... why does it default to I mean how does it know to use localhost? Or am I asking a stupid question because it has no other way but to connect the TCP port to localhost.
<SGautam> Also, what if I want to connect to the port of another IP, is it even possible? Suppose I want to intercept all connections to my phone's IP's port. What's the way to authenticate?
<zid> you're supposed to bind to something specific
<heat> huh?
<heat> you don't bind to ai_addr
<heat> Next!
<zid> the ai_ stuff are hints to getaddrinfo
<zid> it returns various routes to bind to
<heat> socket doesn't give you an ai_addr
<SGautam> getaddrinfo(NULL, std::to_string(port).c_str(), &hints, &result);
<heat> that's also not binding, it's connecting
<SGautam> this->listener_socket = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
<heat> bind != connect and the two are very separate, different calls
<SGautam> this->winsock_err = bind(listener_socket, result->ai_addr, (int)result->ai_addrlen);
<SGautam> ^
<zid> well my answer was already given
<SGautam> I want to understand where is the point I'm speciying the IPv4 address to bind to.
<zid> getaddrinfo is the thing that gives 'localhost'
<heat> that's wrong
<zid> go look at `result`
<heat> bind there makes little sense
<SGautam> ooo
<SGautam> Yah, it's not bind I should be looking at
<SGautam> But getaddrinfo
<SGautam> "A pointer to a NULL-terminated ANSI string that contains a host (node) name or a numeric host address string. For the Internet protocol, the numeric host address string is a dotted-decimal IPv4 address or an IPv6 hex address."
<zid> If the AI_PASSIVE flag is specified in hints.ai_flags, and node
<zid> is NULL, then the returned socket addresses will be suitable for
<zid> bind(2)ing a socket that will accept(2) connections
<SGautam> So passing NULL defaults to localhost.
<zid> It's like mmap heat
<zid> no, passing null *makes it find interfaces to bind on*
<zid> one of which may be localhost
<SGautam> Now what if I pass, that means with port forwarding enabled, I can essentially host my website.
<zid> it might also be, etc
<SGautam> On theintenret.
<zid> that's why 'results' is an array
<heat> you generally don't need to bind to any interface in particular
<zid> you're supposed to loop over them and look for the one you "want"
<zid> or just take the first one as a default
<zid> (which will be ::1 or
<heat> or forget it and bind to INADDR_ANY
<heat> (or don't bind at all, which defaults to INADDR_ANY)
<heat> which generally is the correct thing to do for an external-facing socket
<SGautam> binds to all interfaces, correct?
<heat> yes
<zid> yea
<zid> I like it when software has a config option for what to bind to though
<heat> also binds to all interfaces
<heat> for histerical raisens
<zid> else I can't use my /48 for vanity hosts :(
<heat> <SGautam> Also, what if I want to connect to the port of another IP, is it even possible? Suppose I want to intercept all connections to my phone's IP's port. What's the way to authenticate?
<heat> i assume you're mixing up connect vs bind
<heat> but no, there's no way to bind to your phone's IP
<heat> because that makes 0 sense
<zid> bind is 'which interface' (which may impact routing), accept is 'wait for connections', 'connect' is 'connect'
<zid> i.e localhost:80 vs lan:80 vs wan:80
<zid> all of those would have different effects
<heat> i can't bind to 2a03:2880:f152:82:face:b00c:0:25de because that would be very dangerous and physically impossible
<zid> I mean, you could, but accept() isn't likely do do much :P
<heat> bind rejects it
<zid> aww mean
<SGautam> So essentially, if I have to host my website on the internet, I must host on and with port forwarding on my router and I can basically connect to my_internet_ip:80 to my website.
<zid> no, you must host on any interface that is internet routed
<zid> and the address the other end will have to connect to is determined by that
<zid> i.e if I listen on then the other end has to connect to that, but they could also access my webserver via if they were on my lan, and that's what I had listened on
<zid> or they could connect to as if I did some port forwarding and NAT stuff
<heat> ... sure, which "" should be, if you're connected to the internet
<zid> or I can listen on 'anything', and have the LAN and the internet address both work
<zid> at the same time
Burgundy has quit [Ping timeout: 260 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 248 seconds]
woky| has quit [Quit: Nothing in this world is hopeless!]
[itchyjunk] has joined #osdev
woky_ has joined #osdev
xenos1984 has joined #osdev
woky_ has quit [Client Quit]
Harriet is now known as Elestren
Elestren is now known as Harriet
woky_ has joined #osdev
<mcrod> hi
<gog> hi'
<mcrod> gog may I pet you
dutch has quit [Quit: WeeChat 4.0.2]
dutch has joined #osdev
Harriet has quit [Quit: K-Lined]
Harriet has joined #osdev
netbsduser` has quit [Ping timeout: 246 seconds]
zxrom_ has joined #osdev
zxrom has quit [Ping timeout: 256 seconds]
zxrom_ has quit [Quit: Leaving]
netbsduser` has joined #osdev
Burgundy has joined #osdev
zxrom has joined #osdev
CaCode has joined #osdev
CaCode has quit [Quit: Leaving]
Harriet has left #osdev [Leaving]
<immibis> SGautam: servers normally bind to (internet connected) or (not internet connected). Any other bind address is basically for niche scenarios
<immibis> and if there's a NAT router between you and the internet, then you have to set up port forwarding on that router so the internet can reach you
<immibis> heat: wifi trilateration is something you could theoretically do
frkzoid has joined #osdev
dude12312414 has joined #osdev
pyzozord has joined #osdev
<pyzozord> hey, can someone explain to me why exactly printing to terminal is slow?\
<zid> which terminal?
<zid> adn how?
<pyzozord> i mean i always found that doing printfs when writing a game would slow things down a lot
<zid> well yea, more work is more work
<pyzozord> but it's just writing to stdout which isn't even a real file
<pyzozord> it's just some memory in the kernel
<zid> okay? it's still a syscall
<pyzozord> so it's just overhead of making syscall each frame?
<zid> plus all the work
<mjg> what is the output
<pyzozord> i don't understand what work is involved
<mjg> cause writing to a tty is massively expensive
<pyzozord> i have my own custom terminal a heavily modified fork of st
<mjg> (not inherently, the code just sucks)
<zid> copying to kernel, messing with the buffer, queing up the thread waiting on the read side, converting \n to \r\n, parsing ansi escape sequences, rasterizing glyphs, evicing unused glyphs from the LRU, setting up a display list, submitting to the GPU..
<zid> evicting*
<pyzozord> it uses epoll in a separate thread and writes things to my memory without blocking, while the main thread comes in 60 times a second and render whatever happens to be in memory at the moment
<mjg> bra that's the terminal /reading/ it, could be done by some other thread
<zid> running the bytecode VM for kerning + glyph rendering
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<pyzozord> i haven't tested it but I have a feeling it would significantly slow down the game even if stdout wasn't actually rendered anywhere
<zid> no, >/dev/null is VERY fast
<zid> you *only* eat the syscall in that case
<pyzozord> it is?
<pyzozord> i have to check
<pyzozord> so you are saying i can do 10 100 character printfs per frame in my game
<zid> you could do a few meg through /dev/null no problems
<pyzozord> to stdout and as long as i redirect stdout to /dev/null i will not have any signfinicant slowdown?
<zid> >/dev/null ends up doing a file.write = do_fuck_all; void do_fuck_all(int fd, char *buf) { return; }
<pyzozord> lets say that's 1000 bytes per frame and 60 frames so 60kb per second, pretty tiny
<zid> so your write syscall almost immediately just returns having done nothing
<pyzozord> yeah
<pyzozord> just goes over to a kernel and immediatly returns
<pyzozord> s/a/the/
<mjg> did you know *opening* /dev/null does not scale? :p
<mjg> fucking hilarious
<pyzozord> ugh ok imma head out of this place
<zid> make sure you're not wasting a bunch of time in your libc too, like doing "blah" instead of "%s", "blah" to printf
<pyzozord> enjoy
pyzozord has left #osdev [#osdev]
<zid> THANKS
<zid> do you think he heard?
<mjg> i was serious tho
<mjg> if you do large scale package building and whatnot there is tons of "crap > /dev/null"
<mjg> which is O_WRONLY | O_TRUNC
Thedarkb has joined #osdev
<mjg> which in turn serializes on a lock
<mjg> and yes, it is a real thing which shows up
<SGautam> "Why do you need Flask / Django? Just print" moment https://usercontent.irccloud-cdn.com/file/FXFasZgC/image.png
RelayChat has joined #osdev
joe9 has joined #osdev
<nortti> SGautam: are you intentionally doing your own cgilike-but-not-cgi interface?
<zid> cgi is crap
<zid> and fastcgi doesn't exist
<mjg> it is fast in comparison
<mjg> classic misnomer
<SGautam> nortti: probably more of a UGI
<SGautam> "Uncommon Gateway Interface"
<gog> meow
<zid> moo
RelayChat has left #osdev [Leaving]
frkzoid has quit [Ping timeout: 248 seconds]
frkazoid333 has joined #osdev
* mjg burps
<sham1> fastcgi is nice
<sham1> Of course, there are nicer things one could use, but well, if you can't…
<SGautam> What's the idea behind fastcgi?
<zid> fastcgi doesn't actually exist
<zid> nothing supports it beyond "the exact same thing as cgi"
<nortti> instead of spawning a process per request, you keep a long-lived process and shove requrest to it
<zid> namely, connection multiplexing
<zid> so that you can use limited processes
<zid> apache doesn't, ngnix doesn't, iis doesn't, etc
<sham1> That doesn't mean that it doesn't exist. It's just that nothing takes advantage of it
frkazoid333 has quit [Ping timeout: 256 seconds]
<zid> There was an old, dead, commercial webserver that did
<sham1> Although IIRC OpenBSD httpd implements fastcgi
heat_ has joined #osdev
<zid> doesn't appear to from a cursory look, beyond 'be regular cgi', same as apache etc
heat has quit [Read error: Connection reset by peer]
<heat_> did that guy just pop up, ask a question, and say ugh fuck this shit im out
<zid> yep
<kof123> eh, seems like inetd was used to conserve RAM. so the idea is do not need to conserve RAM. yes he did an inetd :D
<Thedarkb> I mean, if you need this speed why don't you just write your own HTTP server to meet your needs?
<Thedarkb> They're not that complicated tbh
<kof123> that is just to say, i would bet hysterical raisins had something to do with it
<heat_> what
<heat_> HTTP servers are very complicated
<heat_> a shit one is simple, but then it's not fast neither will it scale
<heat_> and if it doesn't scale you get mjg hatemail directly to your home address
<Thedarkb> To be fair, I've only written shit ones.
<Thedarkb> I did one at work at one point to generate a nice web print out of one wire bus temp sensors in a server room.
<heat_> "oi bruv ive tried your http server on my 96 core sapphire rapids and its contending on locks and bouncing cache lines PESSIMAL innit" but in KURWA MÁC
<Thedarkb> I mean, you don't really have those kinds of issues on an ESP32
<sham1> And this is why you write your HTTP servers in Erlang
<sham1> Or just use Cowboy because the HTTP server support built into OTP sucks, frankly
<heat_> use python!
<heat_> wonder if micropython still has all the crap
<sham1> That's pessimal
<Thedarkb> I wrote a HTTP server once that served clients by forking for each client, I bet that's pessimal in some way
<heat_> OH
<sham1> Do you want to get DDOSed? Because that's how you get DDOSed
<Thedarkb> It had a cap you could set.
<heat_> yeah that's horrendous for latency
<heat_> and DDoS
<Thedarkb> Seemed snappy enough to me, I only wrote it as an experiment.
<sham1> Does it at least pool the handler processes
<heat_> yeah but you're not handling real production traffic :P
<Thedarkb> Nah, it just forked and joined when they were done.
<Thedarkb> Each thread had a SIGALRM set with a timeout as well, and there was a cap written in to the main thread.
<heat_> threads would be significantly cheaper but still should be pooled
<zid> or use fastcgi
<zid> oh wait you can't :p
<heat_> lets say you get 1000 connections at the same time. if you never pool anything, those connections will 1) be handled one at a time (if you don't have threads accepting and dispatching to others) 2) if you have proper dispatching of connections, they will all contend on fork() or pthread_create (clone() or mmap() will both suck)
<heat_> 3) you pay the cost for a bunch of system calls
<heat_> the system calls themselves probably won't necessarily cost you much, this isn't microtrading, but they add up and you want to keep latency down anyway
Valeria22 has quit [Excess Flood]
xenos1984 has quit [Ping timeout: 246 seconds]
xenos1984 has joined #osdev
Valeria22 has joined #osdev
Valeria22 has quit [Excess Flood]
Valeria22 has joined #osdev
Valeria22 has quit [Excess Flood]
Valeria22 has joined #osdev
Valeria22 has quit [Excess Flood]
<sham1> ERLANG
xenos1984 has quit [Ping timeout: 246 seconds]
<heat_> its like haskell for even hipsterier people
xenos1984 has joined #osdev
netbsduser` has quit [Ping timeout: 248 seconds]
netbsduser` has joined #osdev
yoyofreeman has joined #osdev
Valeria22_ has joined #osdev
nyah has joined #osdev
m3a has joined #osdev
Valeria22_ has quit [Remote host closed the connection]
Burgundy has quit [Ping timeout: 248 seconds]
nanovad has quit [Ping timeout: 244 seconds]
Turn_Left has quit [Remote host closed the connection]
Turn_Left has joined #osdev
<mcrod> i have a deep craving for american fast food today.
<zid> what makes it american?
<zid> corn?
<mcrod> fat, greasy
<heat_> linux
<heat_> wait no that makes it finnish
<heat_> windows
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
Burgundy has joined #osdev
<sham1> reebsd
<sham1> freebsd I mean
<heat_> netbsd > freebsd
<sham1> Regents of the university of california
<heat_> flirting GNU project @ MIT vs harassment BSD @ UC berkley
<heat_> vs unspoken rizz of the University of Alabama
<sham1> vs redmond's MONEY
<gog> hi
<heat_> howdy yall
<gog> howdy heat
* sham1 gives gog fishy
* gog chomp fishy
<gog> we're having curry for dinner
vdamewood has quit [Quit: Life beckons]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<zid> good curry for bad european curry
<zid> or*
* geist yawns
<geist> good afternoon folks
<sham1> Afternoon
<sham1> Well, it'll be midnight in half an hour after which it'll be mornng
<zid> In half an hour it will be 10pm sham
<zid> you should adjust your TZ
<sham1> Not here it ain't. DST is also annoying
<geist> well, it's 2pm, a nice warm PNW afternoon. breezy with temps around 25C. can't ask for more
<zid> wow, geist's clock is even more wronger
<gog> awoo
<zid> gog's animorph transformation finally reveals itself
<heat_> whats yalls's favourite linux kernel feature
<zid> animorphing
<heat_> animorph(2)
<zid> are you going to add it to onyx
<geist> there's a syscall iirc that removes a _ from the end of a string
<heat_> no, yiff yiff away from my great operating system
<kof123> awoo just makes me think ff6 gau howling
* kof123 throws gog a dried meat
<heat_> there's a syscall that prepends _ to strings
<heat_> ez dynamic reserved identifier generation
<gog> _meow
<heat_> _gog
<geist> i dunno, i just figured heat should go find that one
<geist> or heat_ specifically
<heat_> who's heat?
<heat_> im heat underscore, destroyer of worlds
<zid> he's like heat_ but uglier
<geist> no he's private member heat
<geist> we're not allowed to talk to private heat unless via an accessor
<geist> that's what heat() was for
<geist> returned a reference to heat_
<heat_> const heat& heat() const { return heat_; }
<heat_> we googling this code up
<geist> no const! full mod heat. poke heat with pointed stick!
<heat_> hey that's not very google c++ of you
<geist> i have to admit after being forced to use the google style, as much as i dont like the inconsistency if it the _ suffix for member vars is... not too bad
<geist> it's like the least evil of all the other solutions
<heat_> _ prefix!
<geist> unless you go full hungarian and use mFooBar; but then you have to do a lot of camel case which i generally dislike
<heat_> _M_heat
* zid tips heat's fedora
<heat_> go full libstdc++
<geist> well, yeah except those are technically reserved, so you can fairly easily trip over a reserved thing
<heat_> WG14 is going to kick my ass
<heat_> i remember reading a take somewhere (here? or the osdev wiki) that said that since the kernel/libc is really part of the implementation you can probably just... use em
<heat_> in practice most reserved stuff is heavily namespaced in compilers anyway (__builtin, __atomic, __sync, etc)
<heat_> if GCC comes up with an __alloc_page i'll eat my shoe
<heat_> in fact, you *need* to use reserved identifiers when it comes to the libc anyway
<heat_> since that is literally part of the impl
<geist> yeah i remember having an argument with someone at a previous job about that. when building a system you have a bit more freedom to use the _ stuff, in my opinion
<geist> but then you also have to take responsibility for any collisions with other stuff, etc
<geist> since there's no higher authority in that case you have to take responsibility for it
<geist> there was a pattern in BeOs kernel that i picked up a while but got kinda dinged in zircon because of _ lawyers
<geist> if there was some public function like do_foo()... a lot of times within the same file there'd be some sort of internal version of it that do_foo() acted like a wrapper for
<geist> and in that case it'd be called static _do_foo()
<geist> which i used quite a bit as a general pattern. idea was yeah it's doing the _ prefix, but it's all private static stuff
<geist> ut in general we converted most of those in the zircon kernel to something like do_foo_internal, or do_foo_locked or whatnot, which is i guess cleaner
<geist> i just found it sort of logically cleaner to draw a very clean correlelation between foo and _foo and maybe eve __foo, but it's pretty minor
<sham1> Yeah, I do doubt that either C or C++ is gonna introduce identifiers like _M_foo into the official standards
<sham1> But those being reserved is still useful because, well, libstdc++ and the like can use those for identifiers
<heat_> geist, i agree, having __do_stuff is kinda lame
<heat_> even if it feels hackish
<heat_> internal is more descriptive
<heat_> or unlocked or whatever
<geist> yep. i didn't complain too much
<geist> just an old pattern i picked up. learning a lot of osdev on BeOS still shows up in patterns in code i write
<heat_> but in theory if you would ever want to write a compliant C implementation/C library, you'd need to make everything that's not the C symbol you're using _
<geist> actually another funny one that came up the other day at work was some internal discussion about 'cookie' as a term for some sort opaque token that you give some function that it gives back to you later, like a handle
<heat_> yeah
<heat_> you talked about that on discord?
<geist> folks were wondering why 'cookie' and i can't tell them precisely except i picked that up from beos
<geist> oh maybe i did
<geist> i dunno if it originated in beos, or probably from something previous to that
<heat_> yep, in #zircon-kernel IIRC
<heat_> i like cookie as a "argument thing"
<bslsk05> ​medium.com: Just a moment...
<heat_> vs handle which logically brings me right to "this points/represents some object"
<heat_> and arg which is just... arg
<geist> oh well, that is not much of a writeup, but it seems to indicate that the notion of cookies is in the original unix
<geist> then, and i didn't know this, it got codified into HTTP, which is probably where lots of folks hear about it
<geist> okay, mystery solved, at least as far as i'm concerned
<geist> i can rest today now
<heat_> lol
<geist> re: that discord i still *do* like the notion of the kernel IPC letting you associate a user space private cookie with a open connection to assist the local server/client/etc to disambiguate things
<geist> but that didn't fly in zircon, so got removed.
<geist> but it's less of a big deal with zircon channels, since ther'es a 1:1 relationship between channel handle and open connection. it's more useful when you're a server that has multiplexed connections over a single handle, the cookie then lets you instantly disambiguate which client is talking to you
<heat_> yeah but you kinda always want a 1:1 handle:connection right?
<geist> depends on the design really
<geist> it's fairly easy to have a N:1 connection scheme if you have something like a cookie, if you're okay with the connections being unidirectional. lots of synchronous IPCs work this way
<geist> you find the port to the server, connect to it, server has a single port with N connections coming into it
<geist> ou send it message, it replies, repeat.
<kof123> doesn't X use "auth cookies" or something?
<gog> m_heat
<kof123> *call them that, not sure if that is what they actually are
<heat_> m_gog and the m stands for mommy
<heat_> m_heat and the m stands for monke
<geist> i suppose if you want you could have the port system default to N:1 but have some sort of call that's like
<heat_> geist, i mean, its easy, but is it desirable?
<geist> new_port = peel_off_port(server_port, cookie);
<geist> and now you have disconnected it and have a separate one
<heat_> at the very least it's much harder to thread things
<heat_> and conceptually ends up feeling a bit off
<geist> ah that's where in <redacted> which was a previous µkernel i worked on we had a pretty powerful poll() like thing
<geist> that directly handled threads and lots of ports and whatnot
<heat_> REDACTED
<geist> you could do a M:N port/thread thing with some constraints per port
<geist> nptably you coulod set per port how many outstanding messages to allow. so depending on which port you could say 'this is single threaded, but allow any thread to receive it'
<heat_> conceptually i feel like it'd be something like having a UDP socket and building its own mini-TCP over it with connection concepts
<heat_> and then recvfrom/sendto'ing
<geist> we were following more of the QNX model, for what it's worth
yoyofreeman has quit [Read error: Connection reset by peer]
<geist> which is very much synchronous but much more powerful than L4 or whatnot at the primitive level
<geist> the <redacted> is it's just we worked on it at a company, based on LK, but the project was canned and the code never released
<geist> sads.
<heat_> QNX, L4, bah
<geist> but it was before google, so planted in my head the idea that you could take LK and build a µkernel out of it
<geist> but zircon is highly async design, so it's much closer to mach than L4 on the continuum of sync <-> async designs
<heat_> seriously though my knowledge on all the other designs is very limited
<heat_> i know UNIX, i know some bits of windows, and thats it
<geist> but i kinda share your opinion, i think it's ultimately more fun to write a unix and then run some stuff on it
<geist> at least as much as it's a hobby
<heat_> might not be only as a hobby
<geist> well i can tell you as much as it's neat to get paid to write oses, you dont really get to call the shots
<heat_> 1) write a fancy system that's very different and needs its whole custom software stack and software porting efforts
<heat_> or 2) unix almost always goes brrrrrrrr relatively quickly
<heat_> the real question may just be "if you're writing UNIX anyway why are you not using one of the other ones"
<geist> well again thats why i say 'as least as much as it's a hobby'
<heat_> yeah
<geist> ie, you do it because you want to, not because it's really *useful*
<geist> or maybe it is and you're delusional, good for you then
<geist> because that's how you really achieve greatness
<nortti> if it's information that you can share, how were the decisions about the kind of system zircon would be made?
<heat_> i dont know if thats really feasible these days, tho
<geist> well, much harder to answer that, because it's a ton of decisions over an 8 year period
<heat_> garage operating system project doesn't become a world dominating power
<geist> the very very initial design was to generally implement a thing called Mojo which was this whole IPC mechanism inside chrome at the time
<heat_> (sadly)
terminalpusher has joined #osdev
<geist> i'm sure they've moved past it, but that's where the bidirectional channels + handle transferall, etc comes from
<geist> and a handful of objects, at least IPC centric. what we did for zircon was 'hmm can we write a kernel that just directly implements this, and can we then also map kernel objects to handles and fit it into the model'
<geist> and it actually fit pretty nicely. most of the initial design pattern just fell out of that, pretty quickly, over a few months
<geist> but then mojo had some pretty anti-kernel patterns, like each channel is supposed to be infintely deep, and can transfer an infinite amount of handles. ie, designed like a user space API
<geist> if you ask for too much, or it gets screwed up, kill the process, start over
<geist> which is not so great for kernel
<heat_> yeah
<geist> so then over the course of a few years these sort of thins ould show up and we'd make decisions to add constraints to it, and it generally morphed into something specific to fuchsia
<heat_> did that mojo thing just fall out of scope?
<geist> i guess. i honestly dont really know how that changed
<geist> might be a better questio for the discord
<geist> also note all of my answers are highly kernel centric, there's of course lots more code above the kernel with its own design patterns and history
<geist> that i just dont know nearly as much about
yoyofreeman has joined #osdev
<heat_> kernel is the best anyway
<heat_> who cares about userspace lol not me
<nortti> is that why you're using linux-compatible APIs?
<heat_> im not /really/ linux compatible
<heat_> but yes i dont enjoy writing userspace, at least stuff that isnt the low level bits (libc, ld.so, init, whatever)
<heat_> i am as compatible as its worth it to be (to ease porting efforts)
<heat_> i wouldn't be surprised if most of my userspace code is utilities I wrote to test and profile/trace the kernel
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
<heat_> i have around 10KLOC userspace (of mine) vs 150+ in the kernel
<heat_> :p
heat_ has quit [Remote host closed the connection]
Valeria22 has joined #osdev
<geist> oh no we lost heat_!
<gog> hi
<gog> you still have a gog
heat has joined #osdev
<heat> who's that heat_ guy
m3a has quit [Ping timeout: 250 seconds]
<geist> heat: who is this heat_ you refer to?
<gog> what about gog
<gog> :<
<heat> gog
<gog> heat
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 246 seconds]
<mcrod> gog
<gog> mcgog
<gog> will you pet me
<heat> mcrod
<heat> will you marry me
<gog> not before he hugs me
<Cindy> hi
<zid> heat will you finally sign the divorce papers then?
<zid> I was drunk it shouldn't count
<heat> yes you're not marriage material anyway
<zid> you were the one holding out on the annulment
* mcrod hugs gog
<mcrod> heat: if we're going to get married then you must shower me with money
<Cindy> average relationship
<Cindy> in 2023
wblue has joined #osdev
<heat> but you're the rich american :(
<Cindy> i'm not rich, and i'm not american
<zid> heat is from eastern europe bro
<heat> im talking to mcrod not you
<zid> he's the mail order bride you pay for
CaCode has joined #osdev
<heat> yes
<heat> worst christmas gift
<heat> the disappointment on kids' faces is measurable
<Cindy> zid: but i typed male order bride
<mcrod> pffff
<mcrod> i'm far from rich
<mcrod> my salary is not great not terrible
<klange> I make millions!
<klange> (of yen)
<mcrod> i kind of want to go to japan for vacation one day
* gog prr
<mcrod> but I am fearful of flying
<mcrod> much less being in another country by my total lonesome
<klange> take a boat then
<gog> flying is safer than driving
<mcrod> i know
<gog> flying is waaaaay safer than boating
<mcrod> flying is objectively the safest way to get there
<gog> fly to me
<mcrod> but the thought of being suspended 10,660+ meters
<gog> <3
<mcrod> terrifying
<mcrod> gog only if you cook me chili
<zid> boating is a great way to become a millionaire
<gog> ok
<zid> step 1. is be a multi-millionaire, step 2. is to buy a boat.
<klange> You would not buy a boat for the journey, and pacific container shipping is quite safe.
<mcrod> plus, japan is REAAAAAAAALLY far
<zid> It's no wonder pirates were constantly seeking treasure
<Cindy> hey #osdev
<Cindy> i wanna ask you all a question
bgs has quit [Remote host closed the connection]
<Cindy> have you been too lazy to make a game engine
<Cindy> so you reverse engineer an existing game to steal it's game engine?
<mcrod> that seems silly
<Cindy> well it applies to anything
<Cindy> early chinese unlicensed devs reverse engineered games to take their sound driver, rather than making their own
<Cindy> i wonder what other examples exist of this
dude12312414 has joined #osdev
<mjg> heat: lmao you are so wrong
<mjg> heat: sapphire rapid is 104 threads
Turn_Left has quit [Read error: Connection reset by peer]
air has quit [Quit: cria 0.2.9cvs17 -- http://cria.sf.net]
wblue has quit [Quit: wblue]
dabios has joined #osdev
wblue has joined #osdev
dabios has quit [Remote host closed the connection]
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
goliath has quit [Quit: SIGSEGV]
<heat> *sapphire rapids
<heat> checkmate
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
wblue has quit [Quit: wblue]
terminalpusher has quit [Remote host closed the connection]
<mcrod> Cindy: I think the effort to reverse engineer something may be just as much effort as writing something on your own
<moon-child> no it's not fast enough for that
<moon-child> just one rapid
<heat> sapphire slows
<moon-child> hellow everyone please be aware that sapphire 'rapid' is VERY SLOW and will make all your other cpus slower. I offer a free sapphire rapid disposal service
<mcrod> god i love alan kay
<mcrod> I didn't know about this: https://www.youtube.com/watch?v=oKg1hTOQXoY
<bslsk05> ​'Alan Kay at OOPSLA 1997 - The computer revolution hasnt happened yet' by Jeff Gonis (01:04:33)
<mcrod> "I made up the term object-oriented, and I can tell you I did not have C++ in mind"
kpel has joined #osdev
Matt|home has quit [Quit: Leaving]
kpel has quit [Client Quit]
<moon-child> 'when I use a word,' Humpty Dumpty said in rather a scornful tone, 'it means just what I choose it to mean--neither more nor less'
<zid> Yea I've always had the understanding that what C++ does is not what OOP meant to people who cared about OOP
<zid> before "I just mean what C++ does" came to mean OOP, later, by programmers
<zid> and not language designers from the 70s
Burgundy has quit [Ping timeout: 246 seconds]
SGautam has quit [Quit: Connection closed for inactivity]