<bslsk05>
'ToaruOS: New window switcher' by K Lange (00:00:56)
<heat>
i'm not sure anyone is interested in acronyms really (except the media of course)
<heat>
klange, have you thought about making the taskbar's icons smaller? the windows' titles are sometimes hard to read
mimmy has quit [Ping timeout: 240 seconds]
<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
<kingoffrance>
if someone is using a lang that does have big ints, then i would wonder...
mimmy has joined #osdev
<heat>
why would you have to divide by 2?
<kingoffrance>
because oop-style stuff caller does not need internal representation
<kingoffrance>
what else can they do?
<heat>
any decent compiler would optimise that to a "and $1, %rax"
<kingoffrance>
yes, any oop language with big ints
<kingoffrance>
compiler should do that
<kingoffrance>
s/oop//
<heat>
if you have a big ints that are not a part of the language it should have a function like that, yes
<kingoffrance>
yeah, thats why i wonder who else is doing that...
<kingoffrance>
why?
<heat>
doing what?
<kingoffrance>
writing is_odd() function
<kingoffrance>
sieve a list or something maybe
<heat>
for javascript it's because the standard library is crap and the language is crap such that there are no types
<heat>
well, there are types, but not for arguments
<kazinsal>
typescript attempts to rectify this but no one adopted it because 99% of the modern backend stack is built around typeless javascript
<heat>
tbf I've had a decent amount of fun using javascript for a cloudflare workers backend
<heat>
although autocomplete *sucked*
<klange>
heat: I have received... competing feedback and requests for the panel that I can't reconcile
<heat>
:D
wgrant has quit [Ping timeout: 268 seconds]
<zid>
If I make an ISA it's going to have a 'reverse bits' instruction, just to make the traces really silly
<zid>
but also, you could use to implement &1 using the OF flag
mahmutov has joined #osdev
<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...
srjek has quit [Ping timeout: 264 seconds]
mimmy_ has joined #osdev
mimmy has quit [Ping timeout: 268 seconds]
heat has quit [Ping timeout: 260 seconds]
mahmutov has quit [Ping timeout: 260 seconds]
mimmy has joined #osdev
mimmy_ has quit [Ping timeout: 240 seconds]
mimmy_ has joined #osdev
mimmy has quit [Ping timeout: 240 seconds]
wgrant has joined #osdev
mimmy has joined #osdev
ElectronApps has joined #osdev
mimmy_ has quit [Ping timeout: 268 seconds]
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` has joined #osdev
Burgundy has joined #osdev
X-Scale` is now known as X-Scale
mimmy has quit [Quit: WeeChat 3.3]
dude12312414 has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
chartreuse has quit [Ping timeout: 265 seconds]
c2a1 has quit [Ping timeout: 264 seconds]
<geist>
zid: hmm, reverse which bits? new instructions or whats in a register?
<zid>
the reg, hence the jo trick
<geist>
ah was gonna say arm as the `rbit` instruction
<geist>
always a blast
<kazinsal>
I think you need a loop to do it efficiently in x86 which is kind of annoying
<zid>
you can do it without a loop by continually swapping things around
<zid>
I usually just use an 8bit lut
<zid>
You can do it with a multiply and a divide though
<zid>
it's a weird multiply to distribute the individual bits into a larger reg into different positions
<zid>
then a modulo to pack them back together
<geist>
huh. just looked, there's no gcc intrinsic for rbit. best you can get is __builtin_bswapNN()
<geist>
there's some patch to add an arm intrinsic for it, but i dont see it in the gcc docs
<zid>
Is it.. ever actually useful to reverse some bits?
<zid>
It'd explain why neither x86 nor gcc have the ability, and I can't think of one
<geist>
the few times i've used it it was for precisely clocking data into and out of a SPI port
<zid>
wire your spi backwards, gg :P
<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
<zid>
I'm not saying of course that it could never be useful
<geist>
but that's about it. maybe some similar stuff in audio world
<zid>
just.. not in the practical sense, is it ever a bottle neck for anything
<zid>
or used commonly
<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
<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
<zid>
I mean, it's trivial to implement /physically/ though
<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
<zid>
so it probably just doesn't come up as a required software implementation often
<geist>
that's the only time i've seen it used, on a cortex-m class machine
<zid>
It takes a whopping 0 gates
<geist>
depends. to be honest. 0 gates if it just so happens you have a mux set up that way
<geist>
otherwise it's a mux
<zid>
why a mux or anything of the sort, it's just phsically wiring the bits backwards
<geist>
sure bit you have to select it
<zid>
you may have to, you might not have to, same with any other operation
<zid>
I wouldn't consider a mux to be part of a nop, or a mul
<geist>
either straight through or reversed. that's either an ALU op (which effectnively ends up being a mux) or an explicit mux
<zid>
I know of a bit reverser that physically exists, gateless ofc
<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
<zid>
famicom and NES are wired back to front relative to each other
<zid>
so the cart adapter reverses all the pins
<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
<geist>
or both i guess
<zid>
happy little accident? :P
xenos1984 has quit [Quit: Leaving.]
air has quit [Ping timeout: 268 seconds]
xenos1984 has joined #osdev
xenos1984 has quit [Client Quit]
xenos1984 has joined #osdev
elastic_dog has quit [Ping timeout: 268 seconds]
jess has quit [Quit: Lost terminal]
jess has joined #osdev
elastic_dog has joined #osdev
_whitelogger has quit [Ping timeout: 264 seconds]
_whitelogger has joined #osdev
CryptoDavid has joined #osdev
air has joined #osdev
adachristine has joined #osdev
gog has quit [Quit: byee]
adachristine is now known as gog
dormito has quit [Quit: WeeChat 3.3]
GeDaMo has joined #osdev
bauen1 has quit [Remote host closed the connection]
<graphitemaster>
I'm absolutely amazed that there are no standard command line tools for doing literal text replacement in a file (not regex)
<j`ey>
why cant you just use literals in the regex?
<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
<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
<kingoffrance>
which i think will fill most ppl with horror
<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
<kingoffrance>
i actually do something like that, but i would not recommend it
<kingoffrance>
it does let you quote and nest to your heart\'s content though
<kingoffrance>
just kind of chatty/verbose
<kingoffrance>
i just wanted something charset-independent...so, inline the quote char and such basically
[itchyjunk] has joined #osdev
anon16_ has joined #osdev
MiraCat has joined #osdev
<MiraCat>
Is it possible to write a C library like glibc for when I want to compile a C program, in assembly?
<klange>
yeah but usually you write a C library in C
<MiraCat>
I can't decide if I should make a Pure assembly OS or almost pure C.
<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.
<klange>
Then the Opteron was released.
<j`ey>
MiraCat: yesterday you wanted to write no asm
<j`ey>
now you want to write a whole OS in it?
<MiraCat>
I'm sorry, I get very bi-polarish and go through mood swings.
<MiraCat>
So whatever my latest manic episode is, I'm doing.
<gog>
same
<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
<MiraCat>
Again, my apologizes for such intensive changes in my opinions, my manic episodes can be difficult to control at times.
<kingoffrance>
i think setjmp is the famous thing has to be written in asm
<kingoffrance>
maybe newer than c89 has some more
<kingoffrance>
i mean, some c library likely has to too.
xenos1984 has quit [Quit: Leaving.]
<klange>
GeDaMo: at which point it's probably better to just outright write a new language :D
<klange>
though I did that in C...
<GeDaMo>
Pretty easy to write a Forth in asm :P
MiraCat has quit [Quit: Leaving]
CryptoDavid has quit [Quit: Connection closed for inactivity]
wikan has joined #osdev
nyah has joined #osdev
xenos1984 has joined #osdev
dude12312414 has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
EtherNet has joined #osdev
wikan has quit [Quit: Client closed]
sprock has quit [Ping timeout: 256 seconds]
xenos1984 has quit [Quit: Leaving.]
mimmy has joined #osdev
qookie has joined #osdev
nvmd has joined #osdev
sonny has joined #osdev
<sonny>
what does virtualbox use for it's bios?
srjek has joined #osdev
the_lanetly_052 has joined #osdev
mimmy has quit [Ping timeout: 268 seconds]
mimmy has joined #osdev
abbix has joined #osdev
qookie has quit [Ping timeout: 260 seconds]
<sham1>
There's a reason why macro assemblers are a thing
ElectronApps has quit [Remote host closed the connection]
gog has quit []
gog has joined #osdev
<vdamewood>
sham1: I didn't know macros could be assembled.
dormito has joined #osdev
the_lanetly_052_ has joined #osdev
the_lanetly_052 has quit [Ping timeout: 260 seconds]
sonny has quit [Quit: Going offline, see ya! (www.adiirc.com)]
sm2n_ has quit [Read error: Connection reset by peer]
sm2n has joined #osdev
dutch has joined #osdev
rustyy has quit [Quit: leaving]
sprock has quit [Ping timeout: 256 seconds]
rustyy has joined #osdev
qookie has joined #osdev
mimmy has quit [Ping timeout: 256 seconds]
gog has quit [Quit: byee]
gog has joined #osdev
mimmy has joined #osdev
<geist>
oh hey grats heat
<geist>
ah they're gone. but grats on the OS paying off at interviews
<geist>
thats sort of the unspoken other advantage to hobby os stuff
srjek_ has quit [Ping timeout: 260 seconds]
anon16_ has quit [Ping timeout: 256 seconds]
Oli has joined #osdev
Oli has quit [Client Quit]
Oli has joined #osdev
<[itchyjunk]>
:o
mimmy has quit [Ping timeout: 264 seconds]
anon16_ has joined #osdev
anon16_ has quit [Client Quit]
mimmy has joined #osdev
dude12312414 has joined #osdev
sprock has joined #osdev
GeDaMo has quit [Remote host closed the connection]
tacco has joined #osdev
sprock has quit [Ping timeout: 240 seconds]
<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
sprock has joined #osdev
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #osdev
<mjg>
what job interviwe though
nvmd has quit [Quit: Later, nerds.]
<mjg>
or to put it differently, i'm curious how many people here do kernel-level work at work
<mjg>
i'm sure there are several, but i strongly suspect it's less than 1/3rd
* j`ey
does
kaitsh has quit [Quit: WeeChat 3.1]
dormito has quit [Quit: WeeChat 3.3]
nyah has quit [Ping timeout: 260 seconds]
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #osdev
<jimbzy>
ahoy
<jimbzy>
TGIF
<gog>
howdy
<jimbzy>
How's it going, gog?
<gog>
its goin
<gog>
did some coding today
<jimbzy>
Nice.
sprock has quit [Ping timeout: 264 seconds]
<geist>
noice
<jimbzy>
I have some plans to work on a few projects this weekend.
<geist>
re osdev i finally started years later than i should have writing another PCI bus enumerator and fixer
<jimbzy>
Fixer?
srjek_ has joined #osdev
heat has joined #osdev
<heat>
geist, thanks!
<gog>
:o
mimmy has quit [Ping timeout: 256 seconds]
<heat>
having an OS to show off is definitely a unique project
<gog>
i have a new hypothesis that i'm working on
<j`ey>
oh?
Burgundy has quit [Ping timeout: 268 seconds]
<gog>
yes. i don't like coupling my kernel to firmware nonsense so i'm chaning the way bootup happens
<gog>
and UEFI nonsense in particular is going to be contained in its own service
<j`ey>
how can it be a service?
<gog>
like the code that deals with it
<gog>
and exposes it to userspace
<gog>
because from what i'm reading there's no reason runtime services can't be called from ring 3
<j`ey>
oh runtime services
<moon-child>
that sounds ... interesting
<gog>
you seem unconvinced :P
mimmy has joined #osdev
<moon-child>
i just don't really see why you would care about any uefijunk at runtime
<j`ey>
you can reset the system!
<j`ey>
get variables, get the time etc
<moon-child>
also you would have to carve out the memory where efi is loaded and make sure not to erase it
<gog>
yeah i have it all worked out in theory
<gog>
working on merging in my rewrite of the loader and getting it to build today
<gog>
much less code in the loader now too which is nice
<heat>
gog, you can't call runtime services from ring 3
<gog>
oh
<gog>
really?
<heat>
it will crash
<gog>
hm
<heat>
treating firmware as here be dragons is a good idea
<heat>
just like treating the compiler as here be dragons
<heat>
dragons do be everywhere
<gog>
well that only changes some details about my changes anyway
dormito has joined #osdev
<gog>
sort of
<gog>
god damn it
<heat>
the uefi runtime in certain versions of tianocore barely ran in kernel mode lol
<heat>
such that linux has workarounds for old firmware so that it doesn't crash
<heat>
I think SetVitualAddressMap() was so broken that it used old addresses, it was something like that
<gog>
iirc it was that if you didn't maintain the relative offsets of the runtime areas it would fuck up
<gog>
i read a lot of LKML stuff about uefi
<gog>
that's where i got the idea to run uefi runtime services in ring 3 :p
<gog>
if not ring 3, find some way to keep its filth out of my pristine system-agnostic kernel core
<gog>
the Based Kween of the System
<heat>
i think executing uefi firmware in ring 3 might be a great idea or a really really bad idea
<gog>
there's gotta be a way to make it work
<heat>
depends on how you emulate accesses I guess
<heat>
the thing is firmware is very here be dragons
<gog>
it's after exitbootservices(), because it still has to tell the kween she's alive and where to find memory
<gog>
then it leaves the room until called
<heat>
you can't find runtime services bugs if you never leave the boot services
<heat>
based uefi kernel
<gog>
lmao
<heat>
compiled with vs2008
<heat>
a PE kernel sounds like an interesting experiment tbh
<heat>
or a Mach-O
<gog>
i don't know enough about PE or MachO hm
<heat>
exactly
<heat>
learn by doing
<gog>
i know way too much about ELF
<j`ey>
not much need to know about PE or MacO
<j`ey>
abart from the PE header :P
wootehfoot has joined #osdev
mimmy has quit [Ping timeout: 256 seconds]
nyah has joined #osdev
c2a1 has quit [Ping timeout: 264 seconds]
sprock has joined #osdev
[itchyjunk] has quit [Ping timeout: 264 seconds]
Oli has quit [Ping timeout: 256 seconds]
[itchyjunk] has joined #osdev
Oli has joined #osdev
wootehfoot has quit [Read error: Connection reset by peer]
tacco has quit [Remote host closed the connection]