Search logs:

channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched

#osdev2 = #osdev @ Libera from 23may2021 to present

#osdev @ OPN/FreeNode from 3apr2001 to 23may2021

all other channels are on OPN/FreeNode from 2004 to present


http://bespin.org/~qz/search/?view=1&c=osdev2&y=21&m=11&d=19

Friday, 19 November 2021

01:20:00 <klange> I know I'm stealing designs from Gnome here, but working on some window switcher improvements: https://klange.dev/s/Screenshot%20from%202021-11-19%2010-19-18.png
01:21:00 <klange> slight alignment issue on those icons ;)
02:03:00 <eryjus> shit. osdev.org is having problems again.
02:04:00 <kazinsal> yep
02:04:00 <geist> :(
02:23:00 <geist> nice, security bug in my code which has been copied to N places. trying to track down all the users to inform them to fix it
02:23:00 <geist> yay :)
02:23:00 <geist> osdev FTW
02:24:00 <geist> though... it was actually submitted externally
02:25:00 <heat> lk?
02:25:00 <geist> yah
02:25:00 <heat> tell them to use upstream :D
02:26:00 <kazinsal> "today's email is an example of why git submodules are a thing"
02:27:00 <geist> well, i havent fixed it upstream yet
02:28:00 <heat> submodules don't help because they don't track branches
02:30:00 <geist> hmm, i thought they can? or maybe that's soe sort of new feature that never made it in?
02:30:00 <geist> or perhaps that's precisely why things like repo or whatnot exist
02:30:00 <heat> i heard they can but I never got it to work
02:37:00 <heat> how deep do you need to go into leetcode to comfortably pass a FAANG interview?
02:37:00 <heat> i've heard some scary shit
02:38:00 <heat> can't I just wave around my OS and hope the interviewer passes me?
02:38:00 <kazinsal> gotta be able to write an NFTCollisionSolverSolverFactoryFactoryFactory
02:41:00 <heat> you need to be able to write is-odd
02:45:00 <heat> writing a memory allocator is easy, reversing a linked list is hard :((
02:46:00 <Affliction> is-odd is intense, surely someone has written a library for that!
02:49:00 <kingoffrance> the secret is dont include ms in faang, and ironically pretend you want to work for "faang" you're hired!
02:50:00 <geist> MAMAA
02:50:00 <geist> or whatever you have to call it now because meta
02:50:00 <Affliction> Or start a company called 'faang'
02:50:00 <kingoffrance> yes, they will ruin that word
02:51:00 <heat> maang sounds cooler
02:54:00 <heat> tbh I totally forgot about microsoft. when I think of microsoft, I think of C# and that's a huge huge no
02:54:00 <klange> Microsoft's all web services now.
02:54:00 <klange> Azure, GitHub, NPM...
02:55:00 <kingoffrance> well i mean ibm or whoever too. faang just seems like companies trying to smear other companeis TBH
02:55:00 <kingoffrance> *companies
02:55:00 <kingoffrance> https://en.wikipedia.org/wiki/Mung_(computer_term)
02:55:00 <bslsk05> ​en.wikipedia.org: Mung (computer term) - Wikipedia
02:55:00 <moon-child> at some point they were hiring people to work on msvc. Never called me back though ¯\_(ツ)_/¯
02:56:00 <kingoffrance> you guys are "big tech" but im not neener neener neener
02:56:00 <moon-child> kingoffrance: sometimes it seems like more people in this channel work on fuchsia than not!
02:56:00 <heat> moon-child, whew!
02:57:00 <heat> i'm on the hunt for an internship and I'll take whatever I can get
02:58:00 <heat> still waiting for google to get back to me though
02:58:00 <kingoffrance> meta crossed the line for me......
03:03:00 <kingoffrance> maybe i'm kind of "i thought that was the big unfriendly thing about foss all these weird acronyms" don't mainstream that :/
03:04:00 <kingoffrance> when weird acronyms go mainstream, i don't know how to interpret that....it's not just programmers, now journalists want in on this?
03:04:00 <kingoffrance> dear god
03:05:00 <heat> LLVM is the worst acronym possible
03:05:00 <geist> well, ot be fair FAANG was just invented by some silly TV pundit (according to the web)
03:05:00 <geist> i dont think folks that work at FAANG are particular proud or interested in FAANG
03:06:00 <heat> in the acronym or the companies?
03:06:00 <geist> acrynym
03:09:00 <klange> quick dumb video of the new window switcher: https://www.youtube.com/watch?v=UkRCySESU4A
03:09:00 <bslsk05> ​'ToaruOS: New window switcher' by K Lange (00:00:56)
03:10:00 <heat> i'm not sure anyone is interested in acronyms really (except the media of course)
03:13:00 <heat> klange, have you thought about making the taskbar's icons smaller? the windows' titles are sometimes hard to read
03:17:00 <kingoffrance> i actually do have is odd function -- for big ints. saves having to divide by 2 or shift -- just check mask, done. its more of a case of encapsulation, i would be curious why/when there would be need for a function in other situations
03:17:00 <kingoffrance> if someone is using a lang that does have big ints, then i would wonder...
03:18:00 <heat> why would you have to divide by 2?
03:19:00 <kingoffrance> because oop-style stuff caller does not need internal representation
03:19:00 <kingoffrance> what else can they do?
03:19:00 <heat> any decent compiler would optimise that to a "and $1, %rax"
03:19:00 <kingoffrance> yes, any oop language with big ints
03:19:00 <kingoffrance> compiler should do that
03:19:00 <kingoffrance> s/oop//
03:19:00 <heat> if you have a big ints that are not a part of the language it should have a function like that, yes
03:20:00 <kingoffrance> yeah, thats why i wonder who else is doing that...
03:20:00 <kingoffrance> why?
03:21:00 <heat> doing what?
03:21:00 <kingoffrance> writing is_odd() function
03:22:00 <kingoffrance> sieve a list or something maybe
03:22:00 <heat> for javascript it's because the standard library is crap and the language is crap such that there are no types
03:23:00 <heat> well, there are types, but not for arguments
03:25:00 <kazinsal> typescript attempts to rectify this but no one adopted it because 99% of the modern backend stack is built around typeless javascript
03:33:00 <heat> tbf I've had a decent amount of fun using javascript for a cloudflare workers backend
03:33:00 <heat> although autocomplete *sucked*
03:34:00 <klange> heat: I have received... competing feedback and requests for the panel that I can't reconcile
03:34:00 <heat> :D
03:42:00 <zid> If I make an ISA it's going to have a 'reverse bits' instruction, just to make the traces really silly
03:42:00 <zid> but also, you could use to implement &1 using the OF flag
03:46:00 <klange> heat: I am working on turning all the panel widgets into plugins, which should make it a lot easier to have different designs for the window list...
06:38:00 <geist> zid: hmm, reverse which bits? new instructions or whats in a register?
06:48:00 <zid> the reg, hence the jo trick
06:49:00 <geist> ah was gonna say arm as the `rbit` instruction
06:49:00 <geist> always a blast
06:49:00 <kazinsal> I think you need a loop to do it efficiently in x86 which is kind of annoying
06:50:00 <zid> you can do it without a loop by continually swapping things around
06:52:00 <zid> I usually just use an 8bit lut
06:52:00 <zid> You can do it with a multiply and a divide though
06:52:00 <zid> it's a weird multiply to distribute the individual bits into a larger reg into different positions
06:53:00 <zid> then a modulo to pack them back together
07:01:00 <geist> huh. just looked, there's no gcc intrinsic for rbit. best you can get is __builtin_bswapNN()
07:01:00 <geist> there's some patch to add an arm intrinsic for it, but i dont see it in the gcc docs
07:01:00 <zid> Is it.. ever actually useful to reverse some bits?
07:01:00 <zid> It'd explain why neither x86 nor gcc have the ability, and I can't think of one
07:01:00 <geist> the few times i've used it it was for precisely clocking data into and out of a SPI port
07:02:00 <zid> wire your spi backwards, gg :P
07:02:00 <geist> depending on the direction of the shift in the fifo, and the bit order of whatever you're shoving out, sometimes you gotta reverse the bits first
07:02:00 <zid> I'm not saying of course that it could never be useful
07:02:00 <geist> but that's about it. maybe some similar stuff in audio world
07:02:00 <zid> just.. not in the practical sense, is it ever a bottle neck for anything
07:02:00 <zid> or used commonly
07:03:00 <geist> yah dunno. i suppose if youwere trying to cram al ot of data out it could be a bottleneck, since it's hardish to implement quickly
07:03:00 <kingoffrance> yeah, i think "bit endian" is mostly invisible until you want to send or receive something over a wire (or equivalent) and then it magically matters
07:03:00 <zid> I mean, it's trivial to implement /physically/ though
07:03:00 <geist> on some embedde thing maybe, where piddling with hardware directly like that is a thing, and you might not have a ton of mhz to play with
07:04:00 <zid> so it probably just doesn't come up as a required software implementation often
07:04:00 <geist> that's the only time i've seen it used, on a cortex-m class machine
07:04:00 <zid> It takes a whopping 0 gates
07:04:00 <geist> depends. to be honest. 0 gates if it just so happens you have a mux set up that way
07:04:00 <geist> otherwise it's a mux
07:04:00 <zid> why a mux or anything of the sort, it's just phsically wiring the bits backwards
07:05:00 <geist> sure bit you have to select it
07:05:00 <zid> you may have to, you might not have to, same with any other operation
07:05:00 <zid> I wouldn't consider a mux to be part of a nop, or a mul
07:05:00 <geist> either straight through or reversed. that's either an ALU op (which effectnively ends up being a mux) or an explicit mux
07:06:00 <zid> I know of a bit reverser that physically exists, gateless ofc
07:06:00 <geist> right, so either it's semi free as a result of some other path, or its an explicit pile of gates to select. maybe you already have a huge mux so having one extra selector isn't a big deal
07:06:00 <zid> famicom and NES are wired back to front relative to each other
07:06:00 <zid> so the cart adapter reverses all the pins
07:06:00 <geist> ah wonder if thaty did that to be hard to transfer between, or they simply reused the schematic and put the plug on the other side of the board
07:07:00 <geist> or both i guess
07:07:00 <zid> happy little accident? :P
11:03:00 <graphitemaster> I'm absolutely amazed that there are no standard command line tools for doing literal text replacement in a file (not regex)
11:03:00 <j`ey> why cant you just use literals in the regex?
11:04:00 <graphitemaster> sed is good if you can represent your thing as a valid regex, but if you want to replace a regex test in a file, escaping a regex in a regex is non-trivial and actually impossible in some circumstances
11:04:00 <graphitemaster> Plus it's not just regex you need to escape, there's also the shell you have to escape too and that's where the impossibility arises
11:25:00 <kingoffrance> https://en.wikipedia.org/wiki/EDIFACT i found that one day
11:25:00 <bslsk05> ​en.wikipedia.org: EDIFACT - Wikipedia
11:25:00 <kingoffrance> which i think will fill most ppl with horror
11:25:00 <kingoffrance> The UNA segment is optional. If present, it specifies the special characters that are to be used to interpret the remainder of the message
11:25:00 <kingoffrance> i actually do something like that, but i would not recommend it
11:25:00 <kingoffrance> it does let you quote and nest to your heart\'s content though
11:26:00 <kingoffrance> just kind of chatty/verbose
11:28:00 <kingoffrance> i just wanted something charset-independent...so, inline the quote char and such basically
11:51:00 <MiraCat> Is it possible to write a C library like glibc for when I want to compile a C program, in assembly?
11:52:00 <klange> yeah but usually you write a C library in C
11:52:00 <MiraCat> I can't decide if I should make a Pure assembly OS or almost pure C.
11:53:00 <klange> I think there was a brief period in the 90s through the very early 2000s when writing a pure assembly OS for x86 PCs made some degree of sense.
11:53:00 <klange> Then the Opteron was released.
11:55:00 <j`ey> MiraCat: yesterday you wanted to write no asm
11:55:00 <j`ey> now you want to write a whole OS in it?
11:56:00 <MiraCat> I'm sorry, I get very bi-polarish and go through mood swings.
11:56:00 <MiraCat> So whatever my latest manic episode is, I'm doing.
11:56:00 <gog> same
11:56:00 <GeDaMo> If you write any large program in asm, you tend to use a lot of macros so you're basically writing another language on top anyway
11:59:00 <MiraCat> Again, my apologizes for such intensive changes in my opinions, my manic episodes can be difficult to control at times.
12:04:00 <kingoffrance> i think setjmp is the famous thing has to be written in asm
12:04:00 <kingoffrance> maybe newer than c89 has some more
12:04:00 <kingoffrance> i mean, some c library likely has to too.
12:12:00 <klange> GeDaMo: at which point it's probably better to just outright write a new language :D
12:13:00 <klange> though I did that in C...
12:19:00 <GeDaMo> Pretty easy to write a Forth in asm :P
15:06:00 <sonny> what does virtualbox use for it's bios?
15:59:00 <sham1> There's a reason why macro assemblers are a thing
16:11:00 <vdamewood> sham1: I didn't know macros could be assembled.
17:33:00 <heat> the interviewer was impressed by my OS
17:33:00 <heat> this thing pays off eh
17:34:00 <heat> it wasn't a colossal waste of time, it was colossal waste of time with some added benefits
17:36:00 <j`ey> heat: is it a company we would know?
17:38:00 <heat> cloudflare
17:38:00 <j`ey> nice, run onyx on their servers
17:39:00 <heat> >internet goes down
17:39:00 <heat> oopsie it panic'd with the error message "fuck"
17:39:00 <j`ey> :D
17:40:00 <heat> i have an interview with facebook on the 29th AND IM STILL WAITING FOR THE GOOGLE WHY ARE YOU LEAVING ME ON READ
17:40:00 <heat> hopefully it goes as well as this one
17:46:00 <heat> why did Onyx get cloned 179 times by 2 people in _one day_
17:47:00 <j`ey> o_O
17:51:00 <sham1> They tried to DoS GitHub. The problem is that they failed
17:53:00 <heat> i have a feeling microsoft is replacing the nt kernel with onyx
17:53:00 <heat> we're going c o m m e r c i a l baby!
17:53:00 <sham1> It's the only explanation!
17:53:00 <j`ey> i hope it's GPL
17:54:00 <heat> hahahaha
17:54:00 <heat> it's MIT :)
17:54:00 <j`ey> noo
17:54:00 <zid> maybe someone was adding it to a build system
17:54:00 <zid> and couldn't get it working right
17:54:00 <heat> it never works right
17:54:00 <sham1> Mayhaps
17:55:00 <heat> i think i'm going to beat sortie to space
17:55:00 <heat> onyx can into space
19:43:00 <geist> oh hey grats heat
19:43:00 <geist> ah they're gone. but grats on the OS paying off at interviews
19:43:00 <geist> thats sort of the unspoken other advantage to hobby os stuff
20:08:00 <[itchyjunk]> :o
20:57:00 <geist> i guess it's less unspoken and more of a thing you shouldn't rely on, but if you make progress doing osdev, learn some things, produce something interesting, then it certainly wont hurt on job interviews
21:20:00 <mjg> what job interviwe though
21:20:00 <mjg> or to put it differently, i'm curious how many people here do kernel-level work at work
21:21:00 <mjg> i'm sure there are several, but i strongly suspect it's less than 1/3rd
21:21:00 * j`ey does
21:48:00 <jimbzy> ahoy
21:49:00 <jimbzy> TGIF
21:49:00 <gog> howdy
21:51:00 <jimbzy> How's it going, gog?
21:52:00 <gog> its goin
21:52:00 <gog> did some coding today
21:53:00 <jimbzy> Nice.
22:00:00 <geist> noice
22:00:00 <jimbzy> I have some plans to work on a few projects this weekend.
22:00:00 <geist> re osdev i finally started years later than i should have writing another PCI bus enumerator and fixer
22:04:00 <jimbzy> Fixer?
22:17:00 <heat> geist, thanks!
22:17:00 <gog> :o
22:21:00 <heat> having an OS to show off is definitely a unique project
22:28:00 <gog> i have a new hypothesis that i'm working on
22:28:00 <j`ey> oh?
22:29:00 <gog> yes. i don't like coupling my kernel to firmware nonsense so i'm chaning the way bootup happens
22:29:00 <gog> and UEFI nonsense in particular is going to be contained in its own service
22:30:00 <j`ey> how can it be a service?
22:30:00 <gog> like the code that deals with it
22:30:00 <gog> and exposes it to userspace
22:31:00 <gog> because from what i'm reading there's no reason runtime services can't be called from ring 3
22:31:00 <j`ey> oh runtime services
22:31:00 <moon-child> that sounds ... interesting
22:31:00 <gog> you seem unconvinced :P
22:33:00 <moon-child> i just don't really see why you would care about any uefijunk at runtime
22:34:00 <j`ey> you can reset the system!
22:34:00 <j`ey> get variables, get the time etc
22:34:00 <moon-child> also you would have to carve out the memory where efi is loaded and make sure not to erase it
22:36:00 <gog> yeah i have it all worked out in theory
22:36:00 <gog> working on merging in my rewrite of the loader and getting it to build today
22:36:00 <gog> much less code in the loader now too which is nice
22:37:00 <heat> gog, you can't call runtime services from ring 3
22:37:00 <gog> oh
22:37:00 <gog> really?
22:37:00 <heat> it will crash
22:37:00 <gog> hm
22:38:00 <heat> treating firmware as here be dragons is a good idea
22:38:00 <heat> just like treating the compiler as here be dragons
22:38:00 <heat> dragons do be everywhere
22:38:00 <gog> well that only changes some details about my changes anyway
22:39:00 <gog> sort of
22:39:00 <gog> god damn it
22:47:00 <heat> the uefi runtime in certain versions of tianocore barely ran in kernel mode lol
22:47:00 <heat> such that linux has workarounds for old firmware so that it doesn't crash
22:48:00 <heat> I think SetVitualAddressMap() was so broken that it used old addresses, it was something like that
22:49:00 <gog> iirc it was that if you didn't maintain the relative offsets of the runtime areas it would fuck up
22:50:00 <gog> i read a lot of LKML stuff about uefi
22:50:00 <gog> that's where i got the idea to run uefi runtime services in ring 3 :p
22:51:00 <gog> if not ring 3, find some way to keep its filth out of my pristine system-agnostic kernel core
22:52:00 <gog> the Based Kween of the System
22:53:00 <heat> i think executing uefi firmware in ring 3 might be a great idea or a really really bad idea
22:54:00 <gog> there's gotta be a way to make it work
22:54:00 <heat> depends on how you emulate accesses I guess
22:54:00 <heat> the thing is firmware is very here be dragons
22:55:00 <gog> it's after exitbootservices(), because it still has to tell the kween she's alive and where to find memory
22:55:00 <gog> then it leaves the room until called
23:00:00 <heat> you can't find runtime services bugs if you never leave the boot services
23:00:00 <heat> based uefi kernel
23:00:00 <gog> lmao
23:00:00 <heat> compiled with vs2008
23:01:00 <heat> a PE kernel sounds like an interesting experiment tbh
23:01:00 <heat> or a Mach-O
23:01:00 <gog> i don't know enough about PE or MachO hm
23:01:00 <heat> exactly
23:01:00 <heat> learn by doing
23:02:00 <gog> i know way too much about ELF
23:02:00 <j`ey> not much need to know about PE or MacO
23:02:00 <j`ey> abart from the PE header :P