vinc has quit [Read error: Connection reset by peer]
awita has joined #osdev
netbsduser has joined #osdev
GeDaMo has joined #osdev
vinc has joined #osdev
gog has joined #osdev
nyah has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
nur has quit [Remote host closed the connection]
nur has joined #osdev
[itchyjunk] has joined #osdev
<mcrod>
hi
* gog
hug mcrod
* mcrod
hug gog
<sham1>
hi
<sham1>
My socks are wet :(
<mcrod>
eat them
<sham1>
No
<mcrod>
:(
<gog>
meow
<Ermine>
gog: may I pet you
zxrom has quit [Ping timeout: 246 seconds]
<zid>
finally my curse is starting to manifest, sham1
Left_Turn has joined #osdev
<zid>
Next up, stubbing your toe
<gog>
Ermine: yes
vinc has quit [Read error: Connection reset by peer]
zxrom has joined #osdev
* Ermine
pets gog
<zid>
It is very rain today
MiningMarsh has joined #osdev
* gog
prr
netbsduser has quit [Ping timeout: 246 seconds]
vinc has joined #osdev
<ddevault>
I'm going to have to write a debugger soon, I suppose
<sham1>
Does hare emit DWARF metadata
<sham1>
Because that already makes it way easier because you know what to expect when you look at the code from gdb or lldb
<ddevault>
only a small amount
<ddevault>
line number details are there
<ddevault>
the main reason I might have to do a proper debugger soon is that userspace is getting crowded and it's hard to get gdb attached to a single process when debugging the whole OS via qemu
<sham1>
You could always make a gdb stub for userspace and have the debugger connect to that
<sham1>
But a debugger would be a fun challenge I reckon
<ddevault>
yeah, thought about it
<ddevault>
I'm just going to start with a command that dumps the state of a process, I think
<ddevault>
that may be enough to debug this specific problem I'm looking at
netbsduser has joined #osdev
Burgundy has quit [Ping timeout: 245 seconds]
netbsduser has quit [Ping timeout: 260 seconds]
kpel has joined #osdev
mhall has quit [Quit: Connection closed for inactivity]
ajunior has joined #osdev
kpel has quit [Quit: Leaving]
sinvet has quit [Remote host closed the connection]
zxrom has quit [Quit: Leaving]
<gog>
nya
sinvet has joined #osdev
awita has quit [Remote host closed the connection]
awita has joined #osdev
m3a has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 244 seconds]
[itchyjunk] has quit [Read error: Connection reset by peer]
awita has quit [Remote host closed the connection]
lg has quit [Ping timeout: 245 seconds]
goliath has quit [Quit: SIGSEGV]
nanovad has quit [Ping timeout: 246 seconds]
<zid>
mcrod: Did you ever go get some armour and/or occult club?
alexander has quit [Ping timeout: 252 seconds]
nanovad has joined #osdev
gareppa has joined #osdev
heat has joined #osdev
alexander has joined #osdev
<heat>
hi
<gog>
hi
<zid>
geagoth
<gog>
mow
<zid>
The forgotten beast spokest thus
<gog>
i'm like the big sword wolf except i'm a cat
<zid>
sif
<gog>
yes
<zid>
When is your dark souls let's play
<zid>
If you start now you can have it done by monday, ahead of mcrod
<gog>
whenever my wife is done playing skyrim again so i can have my steam account back
<zid>
2025?
<gog>
or new vegas or whatever it is she's doing
<zid>
new vegas will be 2028
<gog>
yeeahhh
<heat>
if you start now you can get it done in 20 minutes
<heat>
it's that ez of a game
<zid>
I'm not trying to be rude here, but I don't think gog can beat dark soul in 20 minutes
<zid>
she isn't john dark souls
<gog>
i am probably not good at dark soul
<heat>
joanna dark soul
<gog>
i only played a little
<zid>
joanna is the perfect dark lead, heat
<zid>
joanna dark, infact
<heat>
anyway dark souls in 20 minutes is EZ
awita has joined #osdev
<zid>
what's yoru best tie?
<zid>
time*
<heat>
get a bkh, do the 2 bells, glitch into sens, do O&S, get to the altar and WW
<heat>
erm
<heat>
i don't know, i don't speedrun
<zid>
presumably heavily sub 20
<zid>
because it's so easy
<heat>
yeah 10mins without trying really
<zid>
(dark souls is 20m48s WR, ds:r is two people sub 20)
<heat>
any% wrong warp is the true category
<zid>
so, any%
<heat>
100% is crap, all achievements is crap
<heat>
no, any% in dark souls does not have wrong warp
<heat>
IIRC
<zid>
that's literally wht any% means
<zid>
anything goes
<zid>
any% no-wrong-warp would be the other category
zhiayang has quit [Quit: oof.]
<heat>
ah i see
<zid>
I like ocarina of time any% no-gim no-ww no-rba :p
<heat>
ohhh force quit was the thing that got banned
<heat>
yeah you have any%, any% no ww, any% force quit
<zid>
ah yea that sounds reasonable, that's not legit
<zid>
any% hexeditor
<zid>
how fast can you edit your save game to put you at gwyn
<heat>
i forgot the OG ds1 has the moveset swap glitch so all of these any% are just big ass weapons with rapier moves lol
<zid>
yea, the two hit dash
<zid>
from the.. estoc?
<zid>
swapped with dragon tooth
<zid>
was the NEW TECH last time I was paying attention to ds
<bslsk05>
preview.redd.it: Reddit - Dive into anything
<heat>
the fuck are lfence and sfence for?
<heat>
they don't seem to be used anywhere?
<zid>
load fence, store fence
<heat>
thank you
<heat>
x86's memory model seems to cover those already
<heat>
such that linux kernel/C11 barriers do not have codegen for x86 apart from seq cst in C11
<zid>
lfence is infact useless, as far as I know
<zid>
maybe you might need it for cache attacks?
<zid>
helpful that they added it if so
<heat>
lfence is required for serialization (sometimes?)
<heat>
i.e lfence; rdtsc or lfence; wrmsr for non-serializing MSRs
<zid>
yea it's been supereceded by mfence/sfence now though afaik?
[itchyjunk] has quit [Read error: Connection reset by peer]
<zid>
you could theoretically use it for adding ordering to unordered memory.. but I don't think working around your MTRRs being set wrong is useful? :p
leitao has joined #osdev
<heat>
why would they superseed lfence?
<heat>
supersede? probably
<heat>
anywya
<heat>
mfence does lfence + sfence
<zid>
cede
<zid>
as in, to cede
<zid>
why is it supersede
<zid>
what the fuck is a sede
<zid>
sedere from latin, to sit
<zid>
fuck you french
leitao has quit [Ping timeout: 245 seconds]
vinc has quit [Read error: Connection reset by peer]
<zid>
libopengl32 does the actual gl parts, and just does ioctls or whatever into nvidia.ko
<zid>
which supports.. everything it supports on windows
<sham1>
what if I don't have nvidia
<zid>
I pity you
<zid>
even I have nvidia and I'm a bum
<sham1>
I choose not to have nvidia
vinc has joined #osdev
nvmd has joined #osdev
<SGautam>
https://www.youtube.com/watch?v=DtfhVjshN8w I really really like my own terminal at this point to Windows terminal. But the big issue of Unicode/TrueType support remains.
<bslsk05>
'CRTerm Vim Editor Test (0.2.8, curvature and reflection shader)' by Siddharth Gautam (00:08:29)
<zid>
link against freetype
gog has joined #osdev
<zid>
why is your terminal in a wind tunnel
<gog>
hi
<zid>
oh it's your mic
Burgundy has joined #osdev
<SGautam>
I was thinking of first doing something like a tiling WM integrated within the terminal itself, I'm sure it has been done before.
<zid>
I'd be surprised if screen couldn't splitscreen
[itchyjunk] has joined #osdev
<heat>
zid: gcc isn't default PIE, only if you opt in when configuring
<zid>
yea I know
<zid>
but every gcc worth using is default pie
<zid>
ergo gcc is default pie
<heat>
is it? i dunno
<heat>
no idea how things look in mainstream distros
<heat>
arch has had default pie for super long
<zid>
and so is gentoo
<zid>
ergo every gcc is pie
<SGautam>
bruh
<SGautam>
screen already implements that functionality without requiring anything from terminal side
<zid>
that's what I just said
<SGautam>
yeah I didn't know this
<zid>
screen is job control + display manager for tty programs, afterall
<zid>
if it couldn't do it I'd be surprised
<SGautam>
I used to think screen does some terminal specific magic sequences.
<SGautam>
But nah its just standard VT220
<zid>
I assume it uses ncurses
<SGautam>
Yea
<zid>
and can emit whatever will work
<zid>
if it's emitting vt220, then you ran screen with TERM=vt220
<SGautam>
I'm reporting as xterm-256color.
<zid>
(or better, but maybe it didn't need anything else)
<SGautam>
While obviously not having like 40% of features.
* gog
eats pie
* gog
performs a self-relocation
ajunior has joined #osdev
<heat>
performing self-relocation is poggers
gog is now known as poggers
zxrom has joined #osdev
<mjg>
eyy wat ap
[itchyjunk] has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
netbsduser has joined #osdev
<sham1>
Bass up
<mjg>
RAISE THE CEILING MOTHERF^w
<mjg>
lol @ at a guy who commits with "Dr. " in front of his real name
vinc has quit [Read error: Connection reset by peer]
<bslsk05>
'Man left housebound by potentially deadly meat allergy triggered by tick bites' - 'Part-time dog walker Christopher Goldman, 28, now only wears vegan approved clothing and uses household products that are guaranteed animal free.'
<zid>
I heard there's a cure for lyme disease, as of a week ago
<mjg>
touch /proc/foo
<mjg>
who can guess the error
<poggers>
ENOENT
<GeDaMo>
Invalid socks
<mjg>
EDOOFUS?
<poggers>
i was right
<sham1>
ENO
<zid>
return -NO;
<zid>
my new favourite line
<zid>
success shall be return YESHOMO;
<mjg>
so pparently the error is progress anyway, it used to panic when used with lolms named tomoyo
<mjg>
shipped by default with debian
<mjg>
according to magic codez the error comes from trying to match the pid
poggers is now known as gog
<SGautam>
zid: Do you have any great idea on how would a terminal implement graphics I/O?
<zid>
provide an api for it
<SGautam>
I'm thinking things like implementing beizer curves, lines, planes, etc.
<SGautam>
Yeah, how?
<SGautam>
ANSI seems too slow, no?
<zid>
stdout/stdin are very fast
<SGautam>
Is something like this ever done yet?
<zid>
if I wanted to be unixy about it I'd probably make something open a new fd
<zid>
STDGFX
<geist>
though it's probably too old, there were some graphical terminals in the 80s or whatnot that you could try to emulate
<zid>
that took graphical command packets
<geist>
some were a bit more sophisticated even, having a processor on the terminal that you could upload code to
<SGautam>
I think such terminals were probably used by engineering companies kept inside a giant room where you'd need some permission to enter and do you CAD stuff and leave.
<zid>
yea there's a sick IBM
<zid>
that was even more expensive
<zid>
maybe the 2250
<geist>
yah probably for graphical displays, maps, etc
<geist>
charts
<zid>
I watched a video but I don't remember the name of the guy
<zid>
just what he looks lik
<geist>
i gues you could compute how many vectors it could draw per second, i assume was limited by the buad rate
<SGautam>
Sun seems to have been such a giant part of software history that exists no more.
<geist>
unless you also have to delay sending it new vectors based on the distance it had to move the beam
<CompanionCube>
wasn't there also a vector graphics thing
<bslsk05>
'1981 CAD Monster - HP Series 200 9836C' by Tech Tangents (00:38:49)
<CompanionCube>
also sixel
<geist>
i think it was inevitable that sun/sgi/dec/etc all would die out. they didn't know how to react to cheaper, commodity hardware
<geist>
which was not msfts doing
<geist>
they saw it coming and didn't know/couldn't deal with it
<zid>
DIGITAL BUSINESS MACHINES turned into "software for PCs"
<zid>
$25000 in 1981, so like $100k+
<zid>
sick ass machine though :p
<kof123>
"a whole different timeline that went in the Sun direction" you mean "the network is the computer" ? this what happened? see cloud, shoving everything in browser, ....
<kof123>
*isn't this what
<zid>
SGautam: These machines imo are still relatively cheap, for business gear, imagine how much a 5 axis mill costs, or die set for injection moulding, etc
<zid>
You stick it on the depreciation register anyway so who cares
<SGautam>
hm yeah
<SGautam>
kof123: Yes, but imagine if the 2000s was all about Solaris instead of Windows XP
* geist
waits for the triggering to happen
<heat>
YES SIR
<heat>
LETS GOOOOOOOOOOO
<heat>
SOLARIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<heat>
sun microsystems beats FreeBDSM every day of the week
<geist>
hello heat
<heat>
hi geist
<zid>
we'd still be in 2015 if we had to use solaris
<zid>
cus it's so slow
<geist>
SLOWLARIS harhar i just invented that
<zid>
zomg, what a zinger
<heat>
surely we'd be in 2035 because its so blazingly fasttttttttttt
<geist>
right?
<SGautam>
what's a usecase for freebsd?
<SGautam>
I'm trying to figure out the niche appeal of BSDs.
<SGautam>
As opposed to Linux
<zid>
so you can go to freebsd meets
<zid>
The appeal is whatever the appeal is in making model railways using only cheese
<geist>
i kinda like the fact that a plain freebsd install is the same as another. ie, no distros
<SGautam>
oh I can see that.
<zid>
freebsd is a bsd distro
<zid>
fite me irl
<geist>
well, yes but it's not kernel + some other stuff
<geist>
it's an OS where the kernel + basic user space is the same repo, etc
<SGautam>
Plus I'm guessing it has little licensing issues due to the liberal nature of BSD
elastic_dog has quit [Ping timeout: 245 seconds]
<SGautam>
So some closed source corporates might be using their own version of itwithout disclosing the src
<heat>
yeah
<heat>
like the ps4 and 5
<heat>
they have disgusting forks
<heat>
with horrendous syscalls
<geist>
honestly the thing that generally turned me away from it was lack of good nvidia/amd drivers, last i checked
<geist>
which sucks, because its not their fault
<heat>
amdgpu is well supported though?
<heat>
i think
<SGautam>
The GPU industry being practically a duopoly is lowkey sad tbh
<geist>
but my firewall is freebsd though
<heat>
they have the same drivers as linux
<SGautam>
I saw a Chinese GPU
<heat>
but with a horrendous shim over it
<SGautam>
And even that sucked at even running something like CS:GO despite claiming to implement DX11.
<geist>
haven't tried in a while though, to be honest
<bslsk05>
www.theregister.com: Oracle's revised Java licensing terms 2-5x more expensive • The Register
<geist>
but really like i said those workstation companies were never going to survive in the long run. they built their entire business off of high margin expensive hardware and it just dissapeared
<sham1>
Java good. Oracle bad
<geist>
to survive they would hve had to scale back too far and they wouldn't have done it
<bslsk05>
wiki.osdev.org: Accelerated Graphic Cards - OSDev Wiki
<zid>
computer bad
<geist>
the only one that kinda survived that era was IBM but they had enough other businesses to prop over it
<SGautam>
IBM is a software company now I guess
<sham1>
(Even though it really was Oracle that really started pushing Java into evolving after it had began to stagnate under Sun)
<SGautam>
but they do some cutting edge hardware stuff I think
<SGautam>
like Quantum computing
<sham1>
Watson
<geist>
they still have a lot of hardware, though i haven't looked at their finances to see how much of it is there
<heat>
SGautam: no one does that
<geist>
but probaby the outlier
<heat>
because it's simply too hard to write a proper gpu driver
<SGautam>
Have noveau guys ever compiled their findings into a document?
<geist>
ie, POWER and s390 stuff
<heat>
then you need a shader compiler, an opengl/vulkan impl
<heat>
at that point its haha
<heat>
nouveau is absolutely useless btw
<geist>
yah that' why i only really use proprietary drivers for my vid cards in linux
<SGautam>
Right I forgot
<geist>
as much as i dont like it, that is the only thing that solidly works for me
<kof123>
and, in a way, staroffice -> openoffice/libreoffice. that "happened" and "exists" i guess too, re: "imagine solaris instead of xp"
<SGautam>
Shader compilation is entirely done by the GPU driver.
<heat>
well, not the driver but the userspace bits
<kof123>
so that was maybe a bit later than xp time
<heat>
not only do you need to figure out how to drive the hardware registers, you need to figure out a whole new ISA
<heat>
and then write a compiler for that shit
<heat>
and then it needs to optimize?
<geist>
side note i picked up one of those i ntel gpus back when they were first released, and i'm pleasantly surprised as the drivers have matured
<geist>
it's not a bad card
<SGautam>
And all that stuff probably changes between GPUs as per whims of the manufacturer.
<heat>
and then with all that you write an opengl impl
<heat>
of course
<gog>
meow
<heat>
and AMD gpus are not more open than "here's a bunch of source code, have fun"
<zid>
geist I'm taking your A750 once you die btw
<zid>
shouldn't be long now, you're super old right
<geist>
the main thing holding it back now is 8GB vram and some not so great memory management
<heat>
does it run well now?
<SGautam>
A750 looks like a decent card from the games I saw
<geist>
it seems to run out of vram faster than other vendors at 8GB, so there's some evidence that they dont manage memory as well
<SGautam>
Ran Days Gone on my university's computer at ~90 fps
<geist>
heat: it's getting better every release of the driver, and less and less weird outliers
<geist>
so i'd say it's pretty competitive for the price bracket
<heat>
noice
<geist>
it was *not* when it was first released, so buggy it would crash left and right
<heat>
may be a solid choice for new builds
elastic_dog has joined #osdev
<SGautam>
Also it managed to hit CP2077 at an average of 55 FPS
<zid>
What about the important benchmark
<zid>
how fast does it run dark souls
<geist>
i think it hurts with ray tracing though, but then so does AMD in general
<SGautam>
not into soulslikes sir
<zid>
I didn't ask if you were a good person or not
<sham1>
I know that you mean "cyberpunk 2077", but the abbreviation is quite unfortunate
<zid>
I asked what fps it gets
<SGautam>
CPU was an i7 11th gen, 32 GB RAM and 8GB VRAM
<SGautam>
sham1: oh my
<heat>
how fast does it run csgo
<SGautam>
lol
<heat>
less than 900fps is GARBAGE
<SGautam>
heat: 120
<geist>
not sure i've ever seen a dark souls benchmark
<heat>
GARBAGE
<SGautam>
that was the screen refresh rate
<zid>
geist: DS benchmarks are binary
<zid>
you either get 30fps or you don't
<geist>
probably being silly, but you can actually find all of this information if you want
<kof123>
rightly or wrongly, there was still a perception linux wasn't a real os for a long time, versus Real UNIX. see "have you ever kissed a girl?" lol
<SGautam>
anyways I got a notice for doing that
<zid>
If you do, your GPU is perfect
<SGautam>
cuz they said running games and other software on university computers are not allowed and subject to disciplinary action D:
<geist>
but i dont think i've seen darksouls as a usual benchmark though
sortie has joined #osdev
<zid>
yea it doesn't have a benchmark mode and it's too old
<kof123>
this is to say, i don't see any indication sun *wanted* "the desktop market" or commodity hardware
<zid>
so it's not surprising
<gog>
i think that was clear with how bad the x86 port of solaris was
<gog>
they had no interest
<SGautam>
but yeah A750 is a good GPU I think
<heat>
i have no interest in non-solaris
<sham1>
I mean why would they. They had SPARC
awita has quit [Remote host closed the connection]
<sham1>
OpenIndiana!
<gog>
ILLUMOS
<SGautam>
Here it costs around ₹25000 which is US$ 300.
<geist>
it's not bad. i bought one on a whim to laugh at how bad it was
<zid>
heat should I play the dark
<zid>
soul
<heat>
sure
<gog>
dark soul
<zid>
what should I do
<gog>
i am a dark soul
<zid>
rando, certain build, etc
<sham1>
danksoul
<heat>
no shield run?
<heat>
or is that too ez?
<zid>
when do I ever
<geist>
hmm, interesting 22.04-hwe bumps to 6.2 kernel
<zid>
use a shield
<zid>
except for gwyn I guess
<zid>
but unarmed parry is fine
<heat>
geist: 6.1 is a bit of a cursed kernel
<geist>
oh?
<sham1>
Do tell
<heat>
many many issues
<sham1>
Well that's just Linux
<zid>
Is that the one with the weird kvm problem
<heat>
mm issues, CVEs (stackrot, etc)
<heat>
xfs data corruption!
<geist>
i forget, was it declared a long term one?
<heat>
yep
<geist>
or is that 6.2?
<geist>
maybe that's why ubuntu skipped it
<geist>
5.15 to 5.19 to 6.2 it seems
<heat>
xfs doesn't backport many changes due to lack of, well, people
<geist>
right,t hat's also a new thing, the xfs guy stepped down
[itchyjunk] has quit [Read error: Connection reset by peer]
<heat>
did he?
<geist>
saw some articleon it a day or two ago
<heat>
dave chinner?
<heat>
oh, darrick wong
gareppa has quit [Quit: WeeChat 3.8]
<geist>
it was fairly interesting, he said that basically spends all his time now trying to fix bugs generally reproduced by fuzzing and not real user bugd
<geist>
and interesting scenario: though fuzzing may find something, is it 'real' if you can only reproduce that way?
<geist>
it is, but...
<heat>
well, it's "real", it's just that no one ever found it yet
<geist>
it's easy to get lost swamped in those sort of things
<geist>
yah
<heat>
the problem with the fs fuzzing stuff is that kernel people need to decide if root is privileged or not
<heat>
i.e if ring 0 is "safe"
<geist>
certainly doesn't have the same feeling of accomplishment fixing things that for te most part people haven't seen
<nortti>
or alternatively, someone found it but it was not caught in a way that could be reproduced
<zid>
lots of bugs exist but are untriggerable in practice
<zid>
just due to how layers above them operate
<heat>
secure boot and kernel_lockdown(7) would suggest that ring 0 is indeed safe from root
<heat>
but...
<geist>
right. so if yo uhave say 10 bugs, 9 of which were only seen by fuzzing and are really really hard to reproduce, which one should you fix first?
<zid>
"if you try to rename this while doing this thing it fails" but the fs layer never issues that because the locks in the code won't a llow it, or whatever
<heat>
geist: depends on the nature of the bug(s)?
<geist>
it's easy to get pretty depressed about it when you get a cosntant stream of possible bugs discovered by fuzzing, and the onus is on you to try to understand it enough to decide if it's serious or not
<zid>
yea it's defo a matrix
<zid>
of severity vs triggerability
<geist>
and as a maintainer its responsibility to deal with that
<zid>
CVEs also take this approach, and give a class and a severity and stuff afaik?
<zid>
remote ddos vs privledge ecal, and both can be out of 10
vinc has joined #osdev
<heat>
oh yeah 6.4 also got released with per-vma locking and it's completely busted
<mjg>
> Memory-management maintainer Andrew Morton went into ""wait-a-few-days-mode"" in the hopes that a proper fix for the problem would emerge. Greg Kroah-Hartman, meanwhile, said that nothing could be done for the stable kernels until some patch landed in the mainline kernel. As a result, the 6.4 kernel lacked any sort of workaround for this serious bug.
<mjg>
lmao
<mjg>
you would think cases like this would be sorted out
<mjg>
very corp-like
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<mjg>
lol
<mjg>
> In theory, avoiding subtle locking problems is one of the advantages of using a language like Rust. Whether, say, a VMA abstraction written in Rust could truly ensure that accesses use proper locking while maintaining performance has not yet been proven in the kernel context, though.
<mjg>
this literally would not happen
<mjg>
> An immediate idea to mitigate this: keep a process-global mmap lock until the first thread is created, switch to per-VMA locking only then.
<mjg>
lol
<zid>
needs a good wipe down with some bleach
bliminse has quit [Ping timeout: 246 seconds]
[itchyjunk] has joined #osdev
bliminse has joined #osdev
<kof123>
he next lines of that: Many many standard Unix tools don’t use any threads at all, while the standard workflow uses loops and pipes and is therefore fork-heavy is that still true? is that what kernel devs consider? I don't know, but <points at "what unix cost us" video to make heat happy>
goliath has joined #osdev
ajunior has quit [Remote host closed the connection]
<heat>
mjg: a VMA abstraction written in rust or C++ could very well work while maintaining performance
ajunior has joined #osdev
<zid>
remember heat, learning rust takes a lifetime
<zid>
so the sooner y ou start, the longer it will take
<heat>
is rust emacs now?
<zid>
might as well be
<heat>
why is rustc not written in lisp and how can we change that
dude12312414 has joined #osdev
<sham1>
Because we're trapped in the dialectic of C
<nortti>
need to add rustc as part of GNU mes
<sham1>
On that note, Hegel is wrong. About everything
<gog>
hi
<kof123>
please expand on hegel, and tie into osdev/c/programming
<kof123>
not being sarcastic, ppl seem to throw him around a lot (not accusing you of that) i wish to learn more
<heat>
i'm not familiar with hegel's ideas either
<gog>
i only care about bagel
<kof123>
my interpretation is ppl are just going to get trapped into c unless they make a clean break and refuse to submit lol
<kof123>
and even then, would have to be careful not to "oppose" lest they create a mirror image
<zid>
What about borsuk-ulam
<zid>
borsuk-ulam is my favourite oppenhimer anime boss
<gog>
if C had anonymous functions
<gog>
it would be perfect
<zid>
how would
<zid>
you call them
<gog>
idk haven't thought that through
<gog>
i don't actually know how a closure would be implemented in c
<gog>
i don't think it's even possible
<zid>
Through faith in rust all things are possible
<gog>
maybe i should just rust
<gog>
give up on c
<gog>
move forward
<gog>
i'm a competent-ish programmer
<gog>
i still have a programming job one year later
<zid>
remember gog, learning rust takes a lifetime
<zid>
so the sooner you start, the longer it will take
<gog>
maybe i'll put it off then
<gog>
my best years are still ahead of me
<gog>
if i don't die of my mystery ailment
<nortti>
< gog> i don't actually know how a closure would be implemented in c < gog> i don't think it's even possible ← gcc implements it by putting executable code on stack
* sham1
whispers in ear
<gog>
nested functions aren't actually closures though
<sham1>
*closure conversion*
<gog>
if they capture any variables that go out of scope they become UB
<zid>
yea the way gcc did it was fucking *insane* though
<zid>
why the fuck did it do that?
<gog>
idk but i also don't want an executable stack
<sham1>
Because it's GNU plus C
<zid>
yea that's why nobody uses it
<zid>
I'd use locally scoped functions
<zid>
I would not use gnu nested functions
<heat>
gog: C with lambdas and closures is C++
<gog>
it's probably possible, but only with a runtime library
<heat>
welcome to Cee plus plus
<heat>
have fun
<gog>
no
<heat>
why
<gog>
because i don't like fun
<heat>
ok
<heat>
have a shit time
<gog>
thanks i will
<sham1>
You don't need CppLanguage
bgs has quit [Remote host closed the connection]
<gog>
how does c++ implement them
<heat>
objects
<gog>
of course
<heat>
lambdas are anonymous objects with an operator() and some local state
<gog>
i thought as much actually
<sham1>
Yeah, so it's closure conversion
<gog>
whisper in my ear again i liked that
<heat>
if your lambda captures by reference "[&]() {foo = 10;}", they use refs, else they copy
<zid>
I never understood the point of them
<heat>
it's pretty nifty
<gog>
i use them all the time at work in c#
<gog>
c# is good shut up
<zid>
I think they're a hack to work around shitty designs C++ people end up with.
<zid>
Cus I never wanted one
<sham1>
All you need is lambdas. And to implement lambdas properly as in lambda calculus, you need closures
<zid>
pretty sure I don't need them
<gog>
it's the only kind of closure i'm gonna get in my life
<sham1>
That's not true, unless you plan on being immortal
<zid>
*sings the mash theme*
<gog>
death is closure for everybody else
<mjg>
heat: rust ideas about fearlezz concurrency are not fit for delivering high perf in areal-world setting
<gog>
but really it's just going out of scope
<mjg>
heat: and rust adds nothing for these cases
<heat>
i don't know what rust idea they had in mind
<sham1>
If only Rust had taken cues from Erlang
<heat>
but a simple vma_guard class in C++ that forced you to lock before it gave you the vma pointer would be effective
<mjg>
rust concurrency boils down to having to obtain a lock to mess with an object
<sham1>
You could actually do fearless concurrency
<heat>
and transparent
<mjg>
and having a read-locked rwlock meaning you don't modify it in any way
<heat>
well the point here is that locks were not being held right?
<heat>
because bad semantics
<gog>
maybe i should learn lisp
<gog>
what if i learned lisp
<sham1>
Please do
<mjg>
they were not held because someone forgot or they thought they can get away without them
<heat>
right
<sham1>
Learning Lisp is both good and bad for you. It's good for you as a programmer, but it's bad for you because you'll never truly be satisfied using other languages ever again
<heat>
so if you add a language construct to force you to take them....
<sham1>
Other programming languages are always lacking in some way
<mjg>
mate
<mjg>
do you understand the question
<gog>
sham1: which lisp dialect do you think i should start with
<zid>
lol, apparently it's so hot this year because we banned high sulphur fuel in ships
<zid>
the sulphur dioxide was seeding clouds
<zid>
I actually read a book where they did that on purpose, infact
<zid>
sulphur burning rockets
<sham1>
Now that's a more complex (and a tad controversial) question. Usually Common Lisp or Racket tend to be good starting points
<heat>
mjg: i understand the problem. handwavy locking without any sort of formal checking
<heat>
if you forget to lock you're fucked, and the only person that can catch that is the reviewer
<heat>
clearly didn't work did it?
<mjg>
mate
<mjg>
the question is if they *decided* to not lock for perf reasons
<mjg>
or literally forgot to lock
<mjg>
the latter would be helped, the former would not
<mjg>
and blindly forcing locking is not feasible
<mcrod>
zid: going to
<mcrod>
also I have linker questions which I shouldn't ask because it's humiliating
<zid>
going to what
<zid>
oh
<mcrod>
occult club
<zid>
go back and grab stone or havel's and or occult club
<mcrod>
however
<mcrod>
I must ask questions
<zid>
binutils, -no-pie
<mcrod>
that doesn't help me.
<mcrod>
so, a linker controls where code is placed
<zid>
use a script
<mcrod>
and linkers have sections
<heat>
mjg: if you want to avoid locks for perf reasons, you can avoid locks
<mjg>
and if i do, rust gives me nothing
<zid>
first thing true, second thing true for ELF, yes
<mcrod>
so for example, I could say "section high_performance_funcs", and those end up in a special fast RAM
<mjg>
it could, but it does not
<mcrod>
"those" being functions
<zid>
I'd use a dot, and yes that is common
<zid>
for fastram
<mcrod>
ok so
<mcrod>
how would I say "I don't give an absolute flying fuck about that, place code appropriately and I want the stack to be 256 bytes"
<zid>
gba, playstation, etc
<heat>
mjg: but the big idea here is that default-locked-and-you-must-find-reasoning-for-exceptions is a lot safer than the opposite
<zid>
linker doesn't knowwhat a stack is
<mcrod>
I know
<zid>
and if you don't give a fuck, don't inform it of the memory layout being special
<zid>
and it won't know that it's special
<zid>
{mem (rwx) : origin = 0, length = 4G}
<mcrod>
I know that you have to say "ok this memory range is in RAM space, and 256 bytes of it is the stack"
<heat>
mjg: C people just fucking wing it (particularly linux people that don't even try to formalize any sort of locking), and in this case it fucked them when converting large swaths of code that particularly expected to be under a single, "big" mmap_sem
<zid>
I mean, no you don't
<mcrod>
well remember
<zid>
linker doesn't care about stack
<mjg>
i agree it is safer
<mcrod>
here, one second
<mcrod>
I will share with you some pain
<mjg>
i just don't agree it would make a difference *if* not locking there was a deliberate choice
<mcrod>
no not the pain I've been bitching about
<mjg>
and more importantly most of the time you have to devise a scheme where you dodge locking
<zid>
if you want your stack to be accounted for in compile-time processes that add things up and see if they fit etc
<mjg>
and for that rust adds 0 benefits, even though it could
<bslsk05>
embeddedprog.blogspot.com: Embedded World: Programming and Practices: IAR STM8 Linker file
<mcrod>
first off, I find that to be more readable than any GNU bullshit thing, but that's besides the point
<zid>
you're getting distracted
<zid>
the fuck am I supposed to do with that?
<sham1>
Things
<sham1>
And stuff
<zid>
Actually that applies to both things
<mcrod>
the question is I actually don't really know how to write a linker script
<mcrod>
for this MCU
<mcrod>
and I am trying
<sham1>
Marvel Cinematic Universe xd
<zid>
The fuck am I supposed to do with "this will be easier", and what am I supposed to do with "unknown dialect of unknown linker to rsolve unknown problem"
<zid>
it's your linker, read its help files
<mcrod>
right, but I need to understand the general idea
<mcrod>
that's why I'm here
<mcrod>
I can figure out IAR's linker if I understand the general idea
<mcrod>
note that I have never written a lick of linker script in my life
<zid>
It just maps file bytes to memory bytes
<mcrod>
yes
<mcrod>
that much I know
<zid>
That's it
<zid>
ld has syntax to figure out where in the file things go (LMA) and syntax to figure out where in memory the things in the file go (VMA)
<mcrod>
I think I'm getting confused with relation to stuff like .rodata/.data/.bss etc
<zid>
linkers don't need to know what's in any sections
<zid>
just what you told it to put into them and what they're called
<zid>
so that it can generate .shshrtab
<zid>
so that debuggers etc stay working
<mcrod>
all right
<zid>
everything except the program headers (PHDRS in ld) are irrelevent to actually running an ELF
<zid>
does your little MCU even load ELF files
<mcrod>
i doubt it.
<mcrod>
doesn't seem to be documented anywhere in the datasheet
<zid>
because the mcu doesn't do it
<zid>
the software does
<mcrod>
oh you mean does the _linker_ handle ELF files?
<zid>
dumb things just run from their reset vector and you stick some ROM there
<mcrod>
ok ok
<zid>
smarter things also do that, but run an ELF loader
<zid>
to chain load over an SD card or whatever
<zid>
(rpi)
<zid>
or a wii
<zid>
or a playstation
<geist>
for the mcu it's probably just copying some data out of the ro section in flash to .data and initializing it
<geist>
as is the case commonly with cortex-ms and whatnopt
<mcrod>
so basically, 0x008080-0x00FFFF is IFLASH
<mcrod>
that's where the _firmware code_ would be stored
<mcrod>
the linker organizes everything in a way such that shit ends up in the appropriate places in RAM, for example
<mcrod>
e.g., functions that have to fit in a fastmem location
<geist>
yah, mcu stuff tends to have compluicated linker scripts
<mcrod>
our linker script is 30 lines
<mcrod>
and a google result
<mcrod>
heh
<zid>
I'd just.. look at the binary
<mcrod>
but the STM8L0R52R8 isn't crazy complicated
<mcrod>
it's the linker stuff that scares me
<zid>
if it starts \x7FELF it's an elf
<mcrod>
yeah I'll look monday
<zid>
and you can readelf -a --wide it
<zid>
otherwise it's *probably* a flat binary, but possibly not
<mcrod>
"the linker organizes everything in a way such that shit ends up in the appropriate places in RAM, for example"
<mcrod>
now the thing is, that code has to come from IFLASH and then be copied into RAM
<zid>
all linkers do that, yea, but it's less "ends up"
<zid>
as
<zid>
"picks numbers out of its arse"
<mcrod>
the linker doesn't handle that automatically
<zid>
Like, if I do 'int a;' in some C file, the linker picks a random number for &a to be
<mcrod>
or does it
<mcrod>
it's not like it's going to generate a routine to copy shit over to a specific area of RAM
<zid>
right, that would be .rodata
<zid>
and usually you bundle it with .text
<mcrod>
i see
<zid>
99% of rom/firmware/etc situations you have a linker script that is basically .text : { * (.text); * (.rodata); } > rom; .data : { * (.data) } >mem .bss : { * (.bss); } >mem
<zid>
data and bss don't 'exist' in the file, they're just numbers the linker made up and wrote into .text
<zid>
mov rax, a linker decides 'a' is at 0x80080 because of my linker script, rewrites that instruction to 0x800080 and gives the next object 0x800084 instead, etc
<mcrod>
so just for my clarity: the linker doesn't know shit about a stack, and `declare that memory range [$F00D - $FFFF] in RAM is the stack` is bullshit
<zid>
well, data might need to be copied actually
<zid>
idk what your linker is capable of, it might be inserting a _start
<zid>
that loads the stack pointer
<mcrod>
there is a low_level_init thing that IAR provides
<mcrod>
so probably that's _start
<geist>
and probably copies some data around
<mcrod>
right
<zid>
usually you do like _data_start = .; _data_size = sizeof(.data);
<mcrod>
I just have a strong impression in my mind that our linker script is mostly bullshit
<zid>
then _start memcpys it to RAM
<zid>
if you don't have a proper ELF loader to use
<mcrod>
because we don't explicitly say "you can't place code where the data EEPROM is, or any reserved memory area, or MMIO"
<zid>
it's vaguely annoying with ld
<zid>
cus you need it to end up in ROM but address like it's in RAM
<mcrod>
i also don't exactly quite know what near/far code is supposed to be in an STM8 context
<zid>
I assume your jumps are limited
<mcrod>
i think so
<zid>
so you need far pointers to go between your two rom banks
<zid>
which is slower
<zid>
so you care about locality
<mcrod>
right
sortie has quit [Remote host closed the connection]
<mcrod>
i'm not sure why I find linkers so odd, but i think i'll figure it out
<sham1>
Well linkers are odd
<zid>
oh >RAM AT > ROM
<zid>
that's less hassle than I remember it being
<zid>
(I looked up the .data thing for ld)
<zid>
and then LOADADDR(.data) to get the rom offset for your memcpy
<heat>
mjg: everybody gangsta until Mateusz Fucking Guzik comes around and necros threads