<Ermine>
I wonder why did it become a meme if it is so easy
<gog>
because it wasn't for a long time
<gog>
i've never really put a serious effort into understanding html layout and stuff but i do remember it was basically a thing you had to do pixelwise or emwise
<klange>
For reference, flex was invented _because_ things like centering a div vertically were so hard they had become a meme.
<Ermine>
Ah, now I get it
CalculusCats is now known as CalculusCat
frkzoid has quit [Read error: Connection reset by peer]
frkazoid333 has joined #osdev
_xor has joined #osdev
_xor has quit [Client Quit]
[itchyjunk] has quit [Remote host closed the connection]
Jingwiw has joined #osdev
gog has quit [Ping timeout: 260 seconds]
Jingwiw has quit [Remote host closed the connection]
Jingwiw has joined #osdev
heat_ has quit [Ping timeout: 248 seconds]
tiggster has joined #osdev
<sham1>
Then we got grid, which does tabular layout but actually well
<sham1>
One most likely wants grid as opposed to flex nowadays. Centering in grid is just as easy if not even easier than in flex
<zid`>
html bros got hooked on "tables are bad"
<zid`>
(sort of like 'goto is evil' for bad C programmers)
<zid`>
you know what vertically aligns shit real great? tables.
<sham1>
Tables are bad for anything but tabular data
<zid`>
see
<sham1>
They're semantically incorrect
<zid`>
boo hoo
<zid`>
You know what layouts are often shaped like? tables.
<zid`>
You know what HTML has specifically for rendering layouts that are table shaped? Tables.
tiggster has quit [Quit: Leaving]
tiggster has joined #osdev
<sham1>
You know what CSS3 specified for it? Grid
<zid`>
Which is just a table
<moon-child>
some people told me not to use <center>
<moon-child>
still havent heard a good reason for it
<moon-child>
if I wanna center something, I put it in a <center> :P
<sham1>
<marquee>
<zid`>
web dev is very cargo-culty is all
<zid`>
and some things are holdovers from like, IE4
<zid`>
where certain things were broken
<sham1>
<marquee>Marquee</marquee>
<zid`>
<blink><marquee>
<zid`>
looks like <blink> is gone from ff :(
bgs has joined #osdev
deflated8837 has quit [Read error: Connection reset by peer]
deflated8837 has joined #osdev
slidercrank has joined #osdev
remexre has quit [Read error: Connection reset by peer]
remexre has joined #osdev
<geist>
that was fun. implemented some simply unaligned memcpy paths for 1-7 source/dest unalignedness
<geist>
for riscv. turned out to not be as bad as i thought
<geist>
moon-child: you asked me for a duffs device for the jump into the various unaligned. couldn't really come up with anything but a little delta jump table
pmaz has joined #osdev
<moon-child>
wait did I
<geist>
oh i think you asked me some trick
<geist>
oh it wasn't duffs device, you were talking about the barrel shifter that you get on arm32
<geist>
alas, you dont even get a rotate on riscv without some isa extensions
<moon-child>
I think I said: if (ptr & 1) *(char*)ptr = whatever, ptr+=1; if (ptr & 2) *(short*)ptr = whatever, ptr += 2; if (ptr & 4) *(int*)ptr = whatever; ptr += 4
<geist>
yah hang on i'll show you the mess i came up with :)
<zid`>
self-modifying relative jump is clearly the solution
<bslsk05>
github.com: stringtest/asm-riscv64.S at master · travisg/stringtest · GitHub
<geist>
actually performs pretty good. like 10% behind glibc here. i know why, glibc is unrolling this loop 8 times as well (64 bytes at a time)
<geist>
and there's probably some better ways to schedule some of that code
<moon-child>
cool
<moon-child>
btw there is a trick to handle the overreading/writing
<geist>
yeah?
<geist>
i have to look to see if it's valid to technically read outside the bounds of the source
<moon-child>
which is to check if you're near the end of a page and divert to slow path if so. If not near the end of a page, oob access is fine
<moon-child>
glibc does this for at least one thing iirc
goliath has joined #osdev
<geist>
the problem i'm trying to avoid there in that nasty set of byte and halfword and word loads to prime it is reading up to 7 bytes before the start address on the source
<geist>
but still within the same 8 byte alignment. that's *probably* technically illegal, but valid
<moon-child>
oh right yes I see
<moon-child>
yeah I would go wild
<geist>
scheduling the instructions for this derpy computer (visionfive 2) is pretty simple and hard. basic 2 issue rules:
<geist>
2 instructions can be scheduled at the same time if they dont have any data deps
<geist>
and only one can be a load/store, or a mul/div/etc
<geist>
so usual rules of trying to keep things far away
<moon-child>
tbh simple and predictable seems nicer in some respects than fast and unpredictable
<geist>
oh sure. it's actually kinda fun, because you actuaklly *can* do it
<moon-child>
geist: you have a bunch of load a5; load a6; shift a6--should probably be a6 first
<geist>
yes, you're right. i even made a mental note to make a pass over it and reschedule those instructions after i wrote them
<moon-child>
haha fair enough
<moon-child>
getting it working is definitely a higher priority than optimal scheduling!
<geist>
some of those it's just painful you cant do anything
<geist>
oh the other tweak on this core is you want to .balign 4 any branch target
<geist>
because a 32bit instruction that's not 4 byte aligned as a branch target is a 1 cycle penalty
<moon-child>
I'm surprised they don't have pack/unpack instructions (dst = src1 << n | src2 or whatever); wouldn't you want that for immediates?
<geist>
yah this is riscv. sooo simple
<geist>
though i was just looking at Zba and Zbb extension to see if there was anything i could use
<geist>
that adds rotate, among other things
<geist>
but not really much i can use here
<moon-child>
well, then look on the bright side. Maybe they'll fuse your shift+or
<geist>
just wish i could do something with less instructions on that shift and or logic in the core loop
<geist>
but i can't figure out any faster way to do it
<geist>
and it's scheduled optimally too
<geist>
kk, rescheduled a few of them
<geist>
that seems enough for tonight
<geist>
next step to optimize would be to unroll it some number of bytes
<geist>
though i'm not really sure it's worth it at this point
<geist>
er unroll it number of registers
<geist>
but glibc is still doing about 20% better for the unaligned cases. for the main 8 byte aligned path this beats it by a little bit. probably just because the glibc implementation is in C and the compiler isn't scheduling as cleanly
pmaz has quit [Read error: Connection reset by peer]
Jingwiw_ has joined #osdev
pmaz has joined #osdev
Jingwiw_ has quit [Remote host closed the connection]
Jingwiw has quit [Remote host closed the connection]
Vercas696 has joined #osdev
Vercas69 has quit [Remote host closed the connection]
<bslsk05>
cgit.freebsd.org: src - FreeBSD source tree
<ChadGPT>
> glibc fixed the overflow issue while optimizing the function in April 1995.
<ChadGPT>
loller
epony has joined #osdev
slidercrank has quit [Ping timeout: 276 seconds]
bgs has joined #osdev
goliath has joined #osdev
CompanionCube has quit [Ping timeout: 250 seconds]
Stary has quit [Ping timeout: 265 seconds]
<heat>
ChadGPT, u didnt answer my kernel header question mofo
<ChadGPT>
heat: i see. they are includable du to a mess with ifdef _KERNEL
<ChadGPT>
heat: which sugests it would be better if real kernel headers were straight up separate
Stary has joined #osdev
<ChadGPT>
there is nasty userspac which defines _KERNEL just to get to some of the internals
* ChadGPT
glares at zfs
<heat>
does libc straight up include them?
CompanionCube has joined #osdev
<heat>
linux libcs have to basically include straight up copies of that shit due to funny problems with linux headers *and* really poor namespacing violations
dude12312414 has joined #osdev
<ChadGPT>
it rolls with /usr/include/sys which are copies of /usr/src/sys/sys
dude12312414 has quit [Remote host closed the connection]
gog has joined #osdev
danilogondolfo has quit [Remote host closed the connection]
wootehfoot has joined #osdev
wlemuel has quit [Ping timeout: 252 seconds]
wlemuel has joined #osdev
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kfv has joined #osdev
bauen1 has quit [Ping timeout: 250 seconds]
<zid`>
Gotta make your code 32bit compatible
wootehfoot has quit [Quit: Leaving]
xenos1984 has quit [Ping timeout: 248 seconds]
drakonis has joined #osdev
Halofreak1990 has joined #osdev
xenos1984 has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
[itchyjunk] has joined #osdev
[itchyjunk] has joined #osdev
[_] has joined #osdev
[itchyjunk] has quit [Ping timeout: 250 seconds]
[_] has quit [Ping timeout: 250 seconds]
bauen1 has joined #osdev
[itchyjunk] has joined #osdev
goliath has quit [Quit: SIGSEGV]
bgs has quit [Remote host closed the connection]
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
goliath has joined #osdev
Halofreak1990 has quit [Ping timeout: 264 seconds]
dude12312414 has joined #osdev
wlemuel has quit [Ping timeout: 252 seconds]
wlemuel has joined #osdev
eau has quit [Ping timeout: 255 seconds]
eau has joined #osdev
amine has joined #osdev
Halofreak1990 has joined #osdev
Jingwiw_ has quit [Remote host closed the connection]
slidercrank has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
biblio has joined #osdev
wlemuel has quit [Ping timeout: 255 seconds]
wlemuel has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
slidercrank has quit [Ping timeout: 240 seconds]
Halofreak1990 has quit [Ping timeout: 248 seconds]