<zid>
sorry, I have software installed that protects me from other software that is written in awk
<heat>
#! /usr/bin/env -S gawk -f
<heat>
downvote
<heat>
not portable
<gog>
erhmagerd er wrert a bert in awk? erkwerrrrrrrrrrrrrrd
<zid>
No, that's my software, gog
<heat>
zid, is that software also written in awk?
<pounce>
heat: :(
<zid>
awkward? no
<pounce>
gawk has function pointers though
<zid>
awkward is written in C, like all good software is
<heat>
pounce, i'm not complaining about gawk
<heat>
but the env line
<heat>
that whole shebang is NOT PORTABLE
<heat>
REPORT
<gog>
good
<pounce>
well yeah because the program isn't portable
<gog>
portability is stupid
<pounce>
bc it uses function pointers
<gog>
imagine writing software that can be run on other platforms
<gog>
cringe
<heat>
sir
<heat>
i write java
<heat>
java java java java
<heat>
write once run anywhere
<pounce>
im not sure if the C api for awk is well defined anyway, so there's only so much you can do portably
<zid>
what is env -S gawk -f supposed to do
<pounce>
who knows really
<heat>
i do
Arthuria has joined #osdev
<zid>
like, I don't have an env var responsible for gawk
<gog>
who knows what any of these stupid symbols do
<zid>
it's not like EDITOR
<gog>
i just keep typing them until the red line goes away
<zid>
I chmod all my text files to +x and #!$EDITOR them
<pounce>
yeah what does /usr/bin/env sh even do
<heat>
shebangs can only parse your "#!/usr/bin/env gawk -f" as ["/usr/bin/env", "gawk -f"]
<pounce>
^^
<heat>
so -S takes "gawk -f" and reparses it as ["gawk", "-f"]
<heat>
-S is entirely a non-standard extension
<pounce>
:(
<heat>
and, i mentioned this above,
<heat>
<heat> that whole shebang is NOT PORTABLE
<heat>
<heat> REPORT
<maybemjg>
but is it OPTIMAL
<heat>
no
<maybemjg>
then ABORT
<heat>
OPTIMAL would be #!/bin/gawk
<maybemjg>
you gawk at people
<pounce>
you need a -f
<zid>
is it our problem that gawk doesn't know what files are?
<heat>
the current solution is PESSIMAL as you do LUL EXECVES AND STATS that HAVE A REAL COST
<zid>
I think no
<heat>
it is what one could categorize as a CRAPPER SOLUTION MON
<maybemjg>
ey heat
<pounce>
usually awk scripts are in an argument, not a separate file
<maybemjg>
kernel test robot noticed a 94.7% improvement of will-it-scale.per_process_ops on:
<pounce>
hence -f
<maybemjg>
(not my change :>)_
<maybemjg>
commit: 6e553c6bcb7746abad29ce63e0cb7a18348e88fb ("fork: use __mt_dup() to duplicate maple tree in dup_mmap()")
<heat>
dope
<maybemjg>
ikr
<pounce>
anyway you shouldn't be concerned about non-portable gawk. you should be concerned about how i connect both the stdin and stdout of awk to openssl s_client
<heat>
/votekick pounce
<maybemjg>
votekick?
<maybemjg>
how dyou know such a command
<maybemjg>
genz
<zid>
I wrote an irc bot in C
<heat>
votekick
<Cindy>
hey
<zid>
It supported PLUGINS
<zid>
using global bindings
<zid>
for dlopen
<Cindy>
i wanna ask a question, is that okay or not?
<heat>
were the PLUGINS any OPTIMAL
<pounce>
gawk can do that
<heat>
Cindy, yes
<Cindy>
this question is about asking a question
<zid>
well yea, that's what scripting languages are good for
<zid>
online modification
<zid>
eval(), done
<zid>
bit harder in C
<pounce>
no it supports dlopening them i think
joe9 has quit [Quit: leaving]
<heat>
gawk supports dlopen?
<heat>
fuckin
<heat>
fuck
<Cindy>
can i use a templating engine to generate a C source code file because i'm too lazy to Ctrl-C and Ctrl-V
<zid>
I thought you were going to say "smh, not ed?"
<maybemjg>
i don't edit files
node1 has joined #osdev
<maybemjg>
i cat > file
<maybemjg>
and get it right first time
<maybemjg>
git gud scrub
<heat>
zid, actually fair point
<heat>
you need to use either ed or vi
<heat>
for POSIX compat
<gog>
i heredoc everything
<maybemjg>
wtf you doing
stylefish has quit [Quit: stylefish]
<maybemjg>
heat, you don't concede on the internet
<maybemjg>
let alone with "actually"
<maybemjg>
try again
<heat>
Did you know "ed" is short for "edward"?
<node1>
Hi
<node1>
Is it possible to identify the specific segments of virtual and physical memory, as well as the components that constitute virtual memory in our system, using Linux commands?
<heat>
subscribe for more heat computing history facts
<gog>
like edward cullen, the shiniest vampire?>
<zid>
many shins
<heat>
gog, taylor lautner
<heat>
wolf boi
<pounce>
does red stand for redward then
<gog>
awooo
<gog>
node1: /proc/self/maps i think
<heat>
node1, yes? kinda? wdym?
<heat>
please explain better
<gog>
but it won't show you physical memory info directly
<heat>
you totally can
<gog>
because every virtual memory location may not correspond to a fixed page in physical space
<bslsk05>
github.com: musl/src/network/dns_parse.c at master · heatd/musl · GitHub
<heat>
show em this
<heat>
really good code
<node1>
heat Yes, but what i feel is vm is just abstraction
<heat>
it is
<heat>
that's what it makes it virtual
<gog>
virtue signalling
<gog>
SIGWOKE
<Ermine>
heat: is it new musl code (which includes dns over tcp)?
<heat>
no
<heat>
it's the same old shit code
Celelibi has quit [Quit: Quitte]
<Ermine>
Btw why do it multiply by 256 when it can << 8
<node1>
heat i feel it's using your RAM (frame) and backstore (swap area) to create virtua memory
<zid>
signed or unsigned
<node1>
like it uses the system's RAM (physical memory frames) and storage space (like a swap area on a hard drive) to simulate a large, contiguous memory space ???
<zid>
not that it really matters for left
<zid>
also, is it conceptually a shift, or is it conceptually a stretch?
<zid>
etc
<gog>
node1: basically
<gog>
it's very clever
<Ermine>
But this is hell of the code
<node1>
Is there any tools or program to confirm it ?
<gog>
confirm what
<zid>
I can confirm that gog.
Arthuria has quit [Ping timeout: 268 seconds]
<gog>
roger 10-4 affirmative
<node1>
Are there any tools or programs available to identify which portions of RAM and swap space are being utilized as virtual memory, and to determine the number of physical addresses in use ??
<bslsk05>
BurntSushi/ripgrep - ripgrep recursively searches directories for a regex pattern while respecting your gitignore (1815 forks/41391 stargazers/Unlicense)
<heat>
and it's also written in
<heat>
rost
<maybemjg>
big if true
<maybemjg>
but is it actually faster or is it THREADING
<heat>
both use threaden
<maybemjg>
has the same total real time in my test
<maybemjg>
i'm greppin' a word in a 1.5G real file
<heat>
maybe it just threadens better and it can't threaden a single file
<heat>
i don't know
<heat>
i use GNU grep
<maybemjg>
you dirty whore
<heat>
BSD grep ftw
<heat>
long options? more like dumb options
<heat>
am i right lads
<maybemjg>
ugrep came up because of poor perf of bsd grep
<maybemjg>
literally 4.5x the time
<heat>
cry
<maybemjg>
(2s vs 9s)
<maybemjg>
ugrep is bsd-licensed and in c++
<maybemjg>
so it can be included instead
<heat>
C++++++++++
<heat>
replacing BSD grep with some random grep is probably not happening
<heat>
because muh traditional BSD tooling
<maybemjg>
author of bsd grep is on board
<heat>
the fuck
<zid>
just get fuz to add avx to grep
<zid>
bsd grep
<heat>
yeah i wouldn't be surprised if the X factor is if it uses SIMD
<heat>
ripgrep does
<heat>
because the rust regex engine does SIMD by default
<maybemjg>
i would very much expect it to use simd
<heat>
RUSTRUSTRUSTRUSTRUST
<maybemjg>
but bsd grep suckage is not lack of simd
q3lont has quit [Read error: Connection reset by peer]
q3lont has joined #osdev
fluix has quit [Ping timeout: 268 seconds]
xenos1984 has quit [Ping timeout: 252 seconds]
fluix has joined #osdev
xenos1984 has joined #osdev
m3a has quit [Remote host closed the connection]
m3a has joined #osdev
virt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
virt has joined #osdev
netbsduser has joined #osdev
virt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
zetef has quit [Remote host closed the connection]
gog has joined #osdev
q3lont has quit [Read error: Connection reset by peer]
kpel has joined #osdev
q3lont has joined #osdev
<gorgonical>
Counting time on arm sbcs is weird
<heat_>
what time?
<gorgonical>
Like, time keeping and calculating performance, among other things
<heat_>
wdym
<heat_>
it's remarkably easy
<gorgonical>
I mean the gic/generic timer provides the nice cntpct_el0 that is very straightforward
<heat_>
cntpct_el0 is architectural i'm pretty sure, not even GIC
<gorgonical>
That's right, yeah. "Generic timer" that must always be available
<heat_>
have you seen x86? you need to use one of 2 timers to calibrate a timer and a clocksource
<gog>
hi
<gorgonical>
But correlating that timer to how many cycles a cpu has been through is not so easy
<heat_>
and you don't even know if that given clocksource is stable and monotonic
<heat_>
well, yes
<heat_>
you need PMUs for that
<gorgonical>
esp considering that the pmccntr pretty much tells you "this is not the number of cycles the pe has experienced"
<gorgonical>
which is what I wish it would be
<gog>
yo dawg i heard you like calibrating timers so i gave you a timer so you can calibrate your timers
<gorgonical>
so then the relationship between cntpct and your pe clock is not stable, obviously
<heat_>
gog, having like 3 timers and all of them secretly sucking is a gigabrain play
<gorgonical>
all this because poll was misbehaving and I thought my timers were fucked up
<gorgonical>
Just my notion of time itself
<gorgonical>
My kernel is on shrooms
<gog>
time, why do you punish me?
<heat_>
timetimetimetimetimetimetimetime
<heat_>
hey gorgonical
<heat_>
have you considered having a
<heat_>
timeout
<heat_>
hahaha
<heat_>
ha
<heat_>
ha
<gorgonical>
ba dum tss
<gorgonical>
the only good part of this is that my kernel lives on cores that linux lives near, so their clocks are tied. set linux to performance mode -> my kernel has max clock also
<gorgonical>
for clarification about operating points: the opp tables are just saying "if you tune the clock at this phandle to this frequency, you should set the voltage at this regulator to something in this range" right?
pounce has joined #osdev
virt has joined #osdev
<geist>
i think so yeah
pounce has quit [Read error: error:0A000119:SSL routines::decryption failed or bad record mac]
pounce has joined #osdev
<gorgonical>
does that imply that if your clocksource supports it you can smoothly slide the frequency/voltage up and down between points?
<heat_>
arm64? more like
<heat_>
leg64
<heat_>
am i right haha
<gorgonical>
too much silly juice in your coffee this day huh
<gorgonical>
in other words: how dare you enjoy things
<heat_>
i both answer your questions and shitpost
<heat_>
you can strike a nice balance
<gorgonical>
this is true
q3lont has quit [Ping timeout: 268 seconds]
q3lont has joined #osdev
q3lont has quit [Client Quit]
joe9 has joined #osdev
gbowne1 has joined #osdev
Left_Turn has quit [Ping timeout: 256 seconds]
pounce has quit [Ping timeout: 276 seconds]
kpel has quit [Quit: .]
<geist>
gorgonical: well, i think it generally means there isn't a lot of point running on any frequency other than the OPPS, but yeah you can switch between them
<geist>
but there's a time constant too: usually voltage regulators take some time to latch
<gog>
what's the frequency, geist?
<geist>
maybe in milliseconds, but it means you probably dont switch incredibly often
<geist>
gog: ooooh that's a deep cut
<gog>
:P
<zid>
x86 biosen have complicated tables of tau times for how long to wait between each power state transition
<zid>
for each multiplier and C state and P state
<heat_>
tablen
<zid>
tableaux
<geist>
yah at the bottom of it all modern x86s and modern arms and whatnot all look the same
<heat_>
tablii
<geist>
x86s just try to generally hide it behind a software abstraction
<heat_>
modern x86en and modern armen are literally the same
<heat_>
zen moment
<geist>
VAXEN
<heat_>
vax64 when
<geist>
i started re-reading the sparcv9 spec last night. last time i looked at sparc that closely was like 20-25 years ago and i remember being quite thoroughly confused with the register window and whatnot
<geist>
now it makes a lot more sense
<geist>
pretty straightforward WRT the way you spill registers in an exception handler, but i dont understand how the ABI works where you spill stuff *to*
<geist>
unless i guess it's literally just some secondary data structure the kernel maintains for you
<geist>
so your register window appears to be infinitely large
teqwve has joined #osdev
<nortti>
that's how itanium does it, iirc?
<geist>
itanium i think spills immediately, where the user code does an alloc instruction and the user code reserves a block of stack for it to spill into
<geist>
though good question
<geist>
in the case of sparc since you may have say 200 registers implemented, it may require that you cycle through quite a few register windows to finally overflow, throw an exception, and then the kernel has like 180 registers to spill *somewhere*
joe9 has quit [Quit: leaving]
<geist>
if it maintained say a per frame pointer where to spill too maybe that'd work, but seems like a nightmare
Left_Turn has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
joe9 has joined #osdev
<geist>
obviously the register window stuff is a dead end architecturally, but it seems neat anyway
Vercas3 has quit [Ping timeout: 240 seconds]
<heat_>
except for itanium
<heat_>
itanium is the least dead end architecturally
heat_ has quit [Remote host closed the connection]
<geist>
well, yeah, point is made
<geist>
there is that russian vliw thing thats still alive somehow
exec64 has quit [Ping timeout: 245 seconds]
jleightcap has quit [Ping timeout: 245 seconds]
yuiyukihira has quit [Ping timeout: 245 seconds]
listentolist has quit [Ping timeout: 245 seconds]
ddevault has quit [Read error: Connection reset by peer]
whereiseveryone has quit [Read error: Connection reset by peer]
lh has quit [Read error: Connection reset by peer]
listentolist has joined #osdev
ddevault has joined #osdev
whereiseveryone has joined #osdev
exec64 has joined #osdev
jleightcap has joined #osdev
yuiyukihira has joined #osdev
lh has joined #osdev
agent314 has joined #osdev
gjn has quit [Read error: Connection reset by peer]
patwid has quit [Write error: Connection reset by peer]
alethkit has quit [Write error: Connection reset by peer]
sm2n has quit [Read error: Connection reset by peer]
listentolist has quit [Read error: Connection reset by peer]
rselim has quit [Write error: Connection reset by peer]
tom5760 has quit [Read error: Connection reset by peer]
asymptotically has quit [Read error: Connection reset by peer]
ddevault has quit [Read error: Connection reset by peer]
vismie has quit [Write error: Connection reset by peer]
pitust has quit [Remote host closed the connection]
alecjonathon has quit [Write error: Connection reset by peer]
lh has quit [Read error: Connection reset by peer]
exec64 has quit [Read error: Connection reset by peer]
noeontheend has quit [Read error: Connection reset by peer]
whereiseveryone has quit [Read error: Connection reset by peer]
staceee has quit [Read error: Connection reset by peer]
hanemile has quit [Read error: Connection reset by peer]
yuiyukihira has quit [Read error: Connection reset by peer]
jleightcap has quit [Read error: Connection reset by peer]
tommybomb has quit [Read error: Connection reset by peer]
Ram-Z_ has quit [Ping timeout: 256 seconds]
listentolist has joined #osdev
pitust has joined #osdev
jleightcap has joined #osdev
yuiyukihira has joined #osdev
tom5760 has joined #osdev
whereiseveryone has joined #osdev
alecjonathon has joined #osdev
staceee has joined #osdev
patwid has joined #osdev
tommybomb has joined #osdev
hanemile has joined #osdev
exec64 has joined #osdev
asymptotically has joined #osdev
lh has joined #osdev
Ram-Z has joined #osdev
netbsduser has quit [Ping timeout: 268 seconds]
Vercas has joined #osdev
goliath has quit [Quit: SIGSEGV]
[itchyjunk] has joined #osdev
Vercas has quit [Ping timeout: 240 seconds]
xvmt has quit [Ping timeout: 256 seconds]
<gorgonical>
These pmccnt reads make no sense to me
<gorgonical>
How can the average cycles between 1s timer ticks be 43,166 cycles? That implies a PE clock rate of ~43KHz, which is definitely wrong
<geist>
probabl doesn't count if the cpu is halted
<geist>
try spinning it with some sort of workload that keeps it going
<geist>
you might be getting a count of effective cycles
<gorgonical>
hmm
<gorgonical>
that may be
<geist>
which is actually great, becaus eyou can use that to determine how much work was done
xvmt has joined #osdev
<gorgonical>
What I'm trying to really establish is the ratio between the PE clock and the timer clock
<gorgonical>
I suppose having a counter that tells me how many cycles were actually spent non-halted is also very useful
<gorgonical>
But without that ratio I can't accurately benchmark anything, really
<geist>
exactly, that's the sort of thing that a pm counter is for
<geist>
the timer clock is not high enough resolution?
<geist>
usually if it's fairly low you can just run the thing you're doing more times
<gorgonical>
It's 24MHz so that should be good enough
<geist>
or, time oesn't matter, and you use the cycle counter independent of clock cycle
<geist>
you just count it took N cycles to do a thing
<geist>
though that depends on what you're doing
<gorgonical>
A benchmark could determine this by asking for a wallclock time of xs and counting how many times a loop y executes if we know how many cycles that loop takes to execute
<gorgonical>
at least approximately
<geist>
seems like yo ujust busy loop for a second and then count the cycles
<geist>
seems easy enough
<geist>
dont even need to calibrate the loop, just keep waiting until a second elapses on the timer counter and read the cycle counter
<geist>
mostly accurate
<gorgonical>
that's true
<gorgonical>
i suppose that's about the semantics of what a benchmark application expects
<gorgonical>
is whatever your OS defines at rdtsc expecting that to be precisely the processor cycles, or just *some* clock that ticks up?
<gorgonical>
I would guess that, to be safe, you would always have to expect a wall clock capability so you can do this busyloop calibration
<gorgonical>
calibration/measurement
<gorgonical>
and wouldn't you know it, busylooping gives me an average that's +- 42 cycles of an opp label
<gorgonical>
Thanks for unsticking me
<geist>
👍
<maybemjg>
yo
<maybemjg>
can someone name wired headphones
<maybemjg>
which are reasonably priced and sensible
<maybemjg>
for home use
<gorgonical>
sony mdr-v6
<gorgonical>
unless you meant in-ear headphones
<gorgonical>
for over-the-ears the mdr-v6s are widely considered a reference pair of headphones and are not expensive
<maybemjg>
aigh
<maybemjg>
i'll look into it
<maybemjg>
thank you
Vercas has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
virt has quit [Ping timeout: 276 seconds]
Vercas has quit [Quit: Ping timeout (120 seconds)]