klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
vdamewood has joined #osdev
Arthuria has quit [Ping timeout: 268 seconds]
oldgalileo has joined #osdev
<gog> cha ching
* vdamewood dispenses fishy
* gog chomp
<gog> tim curry was the best part of RA3
<vdamewood> Also HA2
<bl4ckb0ne> and gina carano
ZombieChicken has quit [Remote host closed the connection]
gildasio has quit [Read error: Connection reset by peer]
foudfou_ has quit [Remote host closed the connection]
chiselfuse has quit [Read error: Connection reset by peer]
foudfou has joined #osdev
<Ermine> Tim Curry tried hard to not to laugh on that space line
chiselfuse has joined #osdev
ZombieChicken has joined #osdev
gildasio has joined #osdev
navi has quit [Ping timeout: 246 seconds]
navi has joined #osdev
<geist> hm, cygwin. have not heard that in some time
<Ermine> I used it only once
gog has quit [Quit: byee]
oldgalileo has quit [Ping timeout: 246 seconds]
gildasio has quit [Ping timeout: 260 seconds]
gildasio has joined #osdev
netbsduser has quit [Ping timeout: 246 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
mctpyt has quit [Remote host closed the connection]
mctpyt has joined #osdev
wlemuel has joined #osdev
navi has quit [Ping timeout: 240 seconds]
voidah has joined #osdev
oldgalileo has joined #osdev
ZombieChicken has quit [Remote host closed the connection]
oldgalileo has quit [Ping timeout: 268 seconds]
belisarius has joined #osdev
<immibis> I think I got that on a magazine bonus CD around 2004
<belisarius> Can someone tell me what they're asking in the second part? [ https://imgur.com/u8F5lcn ]
<bslsk05> ​imgur.com: Imgur: The magic of the Internet
<belisarius> > What must be the smallest number of instances of each resource type the system originally has to be in a safe state?
<belisarius> Included my answer to the 1st part
<belisarius> question:
<bslsk05> ​imgur.com: Imgur: The magic of the Internet
mctpyt has quit [Ping timeout: 246 seconds]
<Ermine> I believe this is a wrong place to ask for help with howework, and the right thing is to ask your course supervisor
matrice64 has joined #osdev
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
matrice64 has quit [Quit: leaving]
GeDaMo has joined #osdev
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
belisarius has quit [Ping timeout: 250 seconds]
rustyy has joined #osdev
Yoofie has quit [Read error: Connection reset by peer]
Arthuria has quit [Ping timeout: 268 seconds]
wlemuel has quit [Ping timeout: 246 seconds]
wlemuel has joined #osdev
oldgalileo has joined #osdev
oldgalileo has quit [Ping timeout: 240 seconds]
bitoff__ has quit [Ping timeout: 260 seconds]
MrCryo has joined #osdev
gbowne1 has quit [Quit: Leaving]
Matt|home has quit [Quit: Leaving]
node1 has joined #osdev
spare has joined #osdev
node1 has quit [Quit: Client closed]
belisarius has joined #osdev
belisarius has quit [Ping timeout: 250 seconds]
netbsduser has joined #osdev
gog has joined #osdev
kfv has joined #osdev
navi has joined #osdev
Left_Turn has joined #osdev
immibis has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
MrCryo has quit [Remote host closed the connection]
immibis has joined #osdev
tanto has quit [Quit: Adios]
vancz has quit []
pie_ has quit []
tanto has joined #osdev
vancz has joined #osdev
pie_ has joined #osdev
oldgalileo has joined #osdev
kfv has quit [Quit: Textual IRC Client: www.textualapp.com]
navi has quit [Ping timeout: 264 seconds]
navi has joined #osdev
spare has quit [Remote host closed the connection]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
belisarius has joined #osdev
frkzoid has quit [Ping timeout: 260 seconds]
theyneversleep has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
Arthuria has joined #osdev
belisarius has quit [Quit: Client closed]
gaxar77 has joined #osdev
<gaxar77> I can't build a cross-compiler.
<gaxar77> I can't get the source code for binutils.
Matt|home has joined #osdev
<gaxar77> Also, is it impractical to use the code-as-design approach to building an operating system?
<gaxar77> Also, how many people at a minimum would I need working with me, to compete with other OSes?
<zid> how hard are you suggesting you tried btw?
<gaxar77> How big a team is necessary to write enough code.
<zid> like, it definitely wouldn't be the first link on google if I typed binutils source?
<gaxar77> I tried to get the soorce from a repository with some command-line tool, but I got 404.
<gaxar77> I did not want to follow the OS dev tutorial as that wasn't working, so I tried to follow a cygwin cross-compiler building tutorial, and that didn't work either. I got a 404 error.
<gaxar77> What do I need binutils for? to build disk images?
<nikolar> Are you on windows
<gaxar77> yes, but I want to use cygwin.
<gaxar77> I don't have a lot of disk space, so I'm trying not to install a large guest OS on my machine.
<gaxar77> An emulator like VB or VMWare will already take up a lot, and I haven't even installed either yet.
<gaxar77> What was Microsoft Singularity? What did it do?
<Mutabah> That's a lot of questions at once my friend
<gaxar77> sorry.
gog has quit [Quit: byee]
<Mutabah> If you think VBox/VMWare are big - wait until create a disk image for a VM :D
<Mutabah> Re compiling on windows, you _can_ get some luck using mingw
<gaxar77> It would take some for my OS grew that large, wouldn't it?
<Mutabah> I think you can build gcc/binutils with mingw to get a usable cross-compiler
gog has joined #osdev
<gaxar77> ok.
<gaxar77> With git-clone/
<gaxar77> ?
<gaxar77> to get the source?
<Mutabah> No, download the release tarballs
<gaxar77> oh.
<Mutabah> from gnu.org or a mirror
<gaxar77> Ok.
Jari-- has quit [Read error: Connection reset by peer]
<gaxar77> I don't like the picture on gnu. What is that?
<gaxar77> Is it supposed to be a devil?
<gaxar77> oh okay.
<gog> belial, behemoth, beelzebub
<gaxar77> It says on the GNU site that I can actually use git clone.
<gaxar77> To get the source.
<gaxar77> source code.
<gaxar77> oh, nevermind, that's the docs.
<gaxar77> I did not need to see that.
<zid> GeDaMo: kek
<kof673> i am reading 24 page pdf "code as design" but what would you consider the other options?
<GeDaMo> That was for gog :P
<gaxar77> You mean like top-down design?
<gog> GeDaMo: i have to listen to year zero by ghost now
<zid> "GNU logo is actually just a cropped-down baphomet, you fools!"
<zid> no gog, this week we're playing zombie by the cranberries on repeat
<kof673> binutils is linker, assembler, and programs to deal with objects/binaries/libraries/etc. ; you will surely want that or equivalent (depending on language you use)
<GeDaMo> gog: have you ever seen "The Devil Rides Out"?
<gog> i haven't
<gog> sorry i'm derailing
* gog slinks back to her factory
<zid> As long as it's not a FactoryFactory
<gog> factorio, not C# today
<gaxar77> What is Singularity?
<gaxar77> Is that a managed OS?
<GeDaMo> MS Singularity was an experimental OS built on a version of C#
<gaxar77> Did Microsoft publish their research docs for reading online/
<nikolar> Singularity is in the center of a non rotating black hole
<gaxar77> ?
<nikolar> If it's a rotating black hole, then it's a ring
<gog> there's also COSMOS
<gaxar77> But, did the kernel run in a a managed environment?
<bslsk05> ​www.microsoft.com: Singularity: Publications - Microsoft Research
<gog> i've been planning on playing with bflat and zerolib but i don't have any nenn to do programming that i don't get paid to currently
vai has joined #osdev
heat has joined #osdev
vai is now known as Jari--
<zid> I prefer TRON, which is when you're an OS that's been teleported into a computer simulation of reality
<gog> that sounds awful tbh
<zid> Master control program doesn't care what you think, get in the silicon mines
<gaxar77> If I make a VM run in the kernel, so that I could write most of the kernel and user mode apps in a managed language, would that be bad?
<gaxar77> What's the other thing I need besides binutils/
<gaxar77> Can mingw build cross-compile like?
<heat> 14:27 <gaxar77> Also, how many people at a minimum would I need working with me, to compete with other OSes?
<heat> 200+ full time
<heat> HTH
<gaxar77> What's a good free c and asm code edit for windows.
<gaxar77> Oh.
<gaxar77> Okay, thank you.
<gaxar77> What's HTH?
<heat> hope that helps
<gaxar77> Oh okay. Thank you.
<heat> if you replace the T with a G it's human growth hormone
<gaxar77> lol
<heat> if you want to get RIPPED and JUICED
<gaxar77> lol
<gaxar77> Can I build a managed kernel.
<heat> which is way more likely than competing with linux or windows or macOS or whatever
<gog> what manages the manager
<gaxar77> Like a microkernel whose services run as managed code?
<gaxar77> In the kernels VM process environment?
<gaxar77> And whose user mode apps run as managed code as well?
<GeDaMo> There have been OSs built on virtual machines in the past
<gog> look into COSMOS
<gaxar77> I could skip a lot of CPU steps and more stuff.
<gaxar77> I thought cosmos translates to the machine?
<gog> you'll need CPU-bound code at some level
<gog> IL2CPU can keep your codebase in, say, c#
<gaxar77> Yes, the very basic part of the kernel.
<gog> and you can use that to port the CLI
<gog> but at some level you'll need to work with unsafe, unmanaged code
<gaxar77> ok
<gaxar77> I'll need to write a compiler.
<gaxar77> Is it possible to implement the CLR as part of the kernel?
zxrom has quit [Quit: Leaving]
theyneversleep is now known as Guest7863
Guest7863 has quit [Killed (platinum.libera.chat (Nickname regained by services))]
<gaxar77> I never did anything of that scale. The OS will be the first project.
<gaxar77> of that scale.
<gog> the compiler exists, you'll have to figure out how to glue them together
spareproject has joined #osdev
<gog> all the pieces of what you're proposing more-or-less exist
<Ermine> <heat> 200+ full time -- and a billion dollars or two, and that all is likely an underestimation
<heat> yes
<heat> basically take the number of people working on fuchsia, and double it, and that might work
<Ermine> and convince one vendors to pre-install your os, and others to write drivers
<GeDaMo> Don't forget the extinct volcano to build your base under :P
gaxar77 has quit [Quit: Leaving]
Arthuria has quit [Ping timeout: 260 seconds]
MrCryo has joined #osdev
<Ermine> Also you can't just pick random people, you need some specific expertise for e.g. wi-fi, bluetooth, audio stuff
<gog> i'm building my base in snæfellsjökull
<gog> although idk how extinct that volcano is
<gog> maybe more dormant
node1 has joined #osdev
<kof673> $##@$$@# they left but i think "code as design" is somewhat the norm...outside of military and "old fashioned" places maybe (that is, embedded, airline, hospitals...things that need strict testing)
<kof673> the article was from like 1992...when "waterfall" was still a thing
<kof673> *strict design documents, and strict testing, more separation between stages
<kof673> it does not argue against testing, just more agile...anyways...
<kof673> the most interesting thing maybe is the article argues that is simply the "economics" of the situation...which, if that is the case...one will be forced to adapt to whatever :D and then a good question is how were the "Economics" of waterfall different, how could it survive if it was against normal "economics"...anyways...
<Ermine> what is even code as design
<kof673> i just found an article a c++ person wrote in 1992
node56 has joined #osdev
<kof673> it was just arguing more "agile" -ish .... code ASAP perhaps, or earlier than "waterfall" anyways.....try to get same people "designing" and "coding" ....that is why i think it is the norm now...
<kof673> and the exceptions (military, hospitals, airlines...) .....have different "economic" concerns in all senses of the word IMO :D
node1 has quit [Ping timeout: 250 seconds]
<kof673> and flowcharts, CASE tools, UML, whatever else, is not "code" ...so somewhat argues against those. i agree though, perhaps makes little sense without knowing whatever the 1960s/70s/80s waterfall stuff was at the time
<kof673> i'd say the real "debate" is whether the same person writing code should be doing the "thinking" of the "design" ...the rest is just disagreement on that it seems
node56 has quit [Quit: Client closed]
osdev199 has joined #osdev
osdev199 has quit [Remote host closed the connection]
osdev199 has joined #osdev
<osdev199> Hi, did anyone ever come up with a totally different OS design which doesn't resemble to Unix at all and is both practical and simple?
<GeDaMo> Smalltalk?
<GeDaMo> Lisp machines
spareproject has quit [Remote host closed the connection]
spareproject has joined #osdev
<osdev199> GeDaMo: did they made their way out of the universities and research labs?
<GeDaMo> I htink Lisp machines did for a while
<GeDaMo> I'm not sure if the Smalltalk system did, the language was used for some things
<osdev199> What is it's fundamental truth - Everything is a file i.e everything can be found somewhere in the filesystem?
<osdev199> I'm talking about Lisp machines.
<Ermine> Windows!
<GeDaMo> I don't know if they had that beyond "everything is a list"
zxrom has joined #osdev
<osdev199> List means?
<GeDaMo> A sequence of atoms or lists
<GeDaMo> A Lisp list is really a binary tree
<osdev199> Ermine: I think it's a complex OS with a lot of complexity. Don't know about its internal design exactly.
<GeDaMo> There was Pick a system built on a database
<Ermine> Actually, I'm wrong. Openvms is the way to go!
<Ermine> "OpenVMS = Reliability, Security, and Integrity... Windows = .... Well, you can guess." (c)
<osdev199> GeDaMo: A binary tree! How can you represent a hard disk partition as a list? From Unix, being a sequence of bytes i.e. a file is obvious.
<GeDaMo> More likely to be a B-tree
<GeDaMo> "An SQLite database is maintained on disk using a B-tree implementation found in the btree.c source file. Separate B-trees are used for each table and each index in the database. All B-trees are stored in the same disk file." https://www.sqlite.org/arch.html
<bslsk05> ​www.sqlite.org: Architecture of SQLite
<GeDaMo> A file system is basically just a database
<Ermine> sqlOS
<Ermine> Your syscalls are SQL queries
<gog> NO
* Ermine gives gog a piece of cheese
<osdev199> GeDaMO: I have a doubt - In Unix, we can do 'echo "Hello World" > /dev/nvme0np2' as a root user to write a string to a partition but how can we perform the same action in case of Lisp machine?
<heat> Ermine, no sir nuh uh
<heat> i use mongOS
<heat> nosql goated webscale
<Ermine> Do you use Redis as page cache?
<heat> oh shit i accidentally slurred
<heat> yes
<heat> mongoOS
<heat> it's way worse of a name but less offensive
<GeDaMo> osdev199: you need some function which copies data to an output device
<Ermine> goated but NOT OPEN SOURCE
<heat> what
<GeDaMo> I linked something about building an OS on a database recently but I can't remember the name :/
<heat> is their new license not OSS approved or whatever
<Ermine> yes
<dostoyevsky2> GeDaMo: Linus said that the most difficult thing is to find the right data structures. So: Build OS on a SQL database -> everythig becomes easypeasy
<GeDaMo> Everything is a table :P
<Ermine> Binbows is simpler in this regard: everything is an object
<GeDaMo> There's never just one of anyuthing
<dostoyevsky2> GeDaMo: Real OSes are written in ABAP
<nikolar> The heck is abap
<GeDaMo> SAP Basic?
<Ermine> SAP language
<GeDaMo> OK< it's not as nice as Basic :P
<heat> Ermine, what's binbows?
<heat> are you talking about macroshit wincrap
<heat> macrocrapper loseshit
<bslsk05> ​knowyourmeme.com: Michaelsoft Binbows | Know Your Meme
<GeDaMo> Yikes :| "Code in ABAP is whitespace-sensitive." https://en.wikipedia.org/wiki/ABAP#Spaces
<heat> if michael's soft why am i hard rn
<gog> ( ͡° ͜ʖ ͡°)
<Ermine> There's another thing
<bslsk05> ​learning.sap.com: Working with Expressions in ABAP SQL
<Ermine> Michaelsoft is what you get if you spell 'r' as 'l' in microsoft (and this is what Japanese do)
<heat> brb voting for the european electionz
<dostoyevsky2> GeDaMo: Yeah, you can have update-customer as a function name but then `update - customer' would be substraction
<osdev199> GeDaMo: interesting links. I'm just not getting how to represent an output device (a HDD partition or linear framebuffer) as a binary tree?
<GeDaMo> The output device is a name or object which can respond to particular messages
<GeDaMo> You can think of it as a file if you want but many devices don't occupy space on a storage device
<GeDaMo> A Unix file responds to open, close, read, write
<kof673> ^^^ and a c89 file has fopen fclose fread fwrite lol
<Ermine> heat: which kind of elections is that? European Parliament elections begin on 6th of June
<osdev199> GeDaMo: but you told me that everything is a list in a Lisp machine. I'm just with this idea that everything is a file in Unix so it makes sense everything is a sequence of bytes...
<osdev199> One can access them using the fundamental syscalls but what will be the same analogy in the case of Lisp machines?
<GeDaMo> I said that because everything (more or less) in the Lisp language is a list (or atom)
<dostoyevsky2> GeDaMo: I guess traditionally Databases and Filesystems were different because filesystems only need a couple of queries to work and e.g. seek minimization was often very important with physical disks and it worked well as you only had a couple of queries. But nowawadays filesystems have journals, snapshotting and many other complex features and also you usually work on SSDs where seek optimization
<dostoyevsky2> is not that critical, so the usual SQL optimizations like indexes, or maybe stored procedures can get you quite far
Yoofie has joined #osdev
<osdev199> GeDaMo: Thank you. I just feel that the Lisp machines and the DB OSes are complex in design. I'm not sure of it but a quick guess :P
<Ermine> no osen are simple in design
<osdev199> Unix philosophy = everything is a file and anything that does anything is Unix is a process.
<dostoyevsky2> osdev199: I want to be able to `cat /dev/sda1 | ls'
<osdev199> Then it talks about Unix is clean and beautiful. (Small is beautiful)
<Ermine> then you get bloody mess in the kernel
<Ermine> just to keep this abstraction for you
<Ermine> and that bloody mess includes signals and ioctls
<Ermine> oh, and ttys and job control
<osdev199> Ermine: :)
<dostoyevsky2> Ermine: I think Lisp and Forth have OS implementations that are quite small... e.g. bootsector size
<GeDaMo> There are bootsector Lisp, Forth, Basic and C but I don't know that I'd call any of them an OS
<Ermine> And do they have any semblance of practicality?
<GeDaMo> osdev199: the point about the "everything is a file" abstraction is that everything responds to open,close,read,write
<GeDaMo> You can have things like stdin and stdout which are not devices but they can be connected to other things which respond to open,close,read,write
<osdev199> GeDaMo: I think of it as everything can be represented as a sequence of bytes. The input and output devices from the stored program concept.
<osdev199> And the turing machine is the same. Tape == file.
<GeDaMo> That seems like a stretch to me :|
<osdev199> I think instead of UNIX philosophy for the fundamental ideas, it should have been called the OS/Computer philosophy
<osdev199> GeDaMo: yes I also think so :)
<GeDaMo> A Turing machine is a theoretical construct, not a practical computing device
<osdev199> But somehow the Unix design is based on that. And yes, every modern computer OS is based on it. That's how we do the C programming too!
<osdev199> I feel that they have left no room for other simpler and practical OS design to be created!
<bslsk05> ​'A Turing Machine - Overview' by Mike Davey (00:05:09)
<GeDaMo> The computers we have today are not based on the Turing machine
<osdev199> I don't know. Sorry. I'm just read about it during my university days and maybe I'm mixing things together!
<zid> GeDaMo: maybe yours isn't, peasant
<zid> I'll send you a picture as soon as the tape is done rewinding
<osdev199> Thanks all for the discussion
<zid> Right, it's rewinded for the first pixel, sadly the next pixel is a few gigabytes along, brb again
Arthuria has joined #osdev
osdev199 has quit [Ping timeout: 256 seconds]
MrCryo has quit [Remote host closed the connection]
oldgalileo has quit [Ping timeout: 256 seconds]
oldgalileo has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
geist-sdf has quit [Remote host closed the connection]
<heat> Ermine, early voting
<Ermine> Ah
gaxar77 has joined #osdev
<gaxar77> Does anyone hear know how to use Cosmos OS that can help me understand how to use it?
<gaxar77> There's not much documentation at all.
<FreeFull> First time I've seen that
<heat> Ermine, seriously signals and ioctls and tty and job control slander
<heat> smh
<heat> signals and ioctls and ttys and job controls are PERFECT
<heat> i like when unix tries to everything is a file but then doesnt but then does but then doesn't but then half-asses it
<heat> and then everything is text except the things that are not
<FreeFull> signals are a pain to handle properly
<heat> signals are what if interrupts but userspace
<heat> which is a genius idea, thank you, very cool!
<gaxar77> I can't download VMWare Workstation
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
gaxar77 has quit [Read error: Connection reset by peer]
spareproject has quit [Remote host closed the connection]
<kof673> > When designing an operating system, the programmer seeks the simplest harmony between machine and ideas. This is why an operating system is easier to design." The warlord of Wu nodded and smiled. "That is all good and well, but which is easier to debug?" The programmer made no reply.
<bslsk05> ​www.mit.edu: The Tao of Programming
op has joined #osdev
gaxar77 has joined #osdev
<gaxar77> Can I write a kernel in HLA?
<dostoyevsky2> gaxar77: why not?
<gaxar77> Then I won\t need a cross-compiler.
<gaxar77> But how do I create the disk images?
<gaxar77> And put files and folders on it.
<gaxar77> Does anyone know what utilities there are for creating disk images?
<gog> at the risk of sounding rude and uncooperative, there are plenty of articles on the osdev wiki with instructions on creating bootable images
<gaxar77> ok sorry.
<gog> i recommend going through and understanding a bare bones or meaty skeleton article
<gog> and it may require further research on your part in order to use the tools necessary
<gog> especially since developing on windows is a little less straightforward than on unix-likes
<dostoyevsky2> Is an e1000 a well-documented network card and easy to write drivers for? (qemu's default network card I think)
<gog> does qemu have a ne2k-type virtual card?
<gog> ne2k cards are everywhere and very old and well-documented
<gog> e1000 is probably well-enough documented, it has linux and bsd drivers
<dostoyevsky2> https://computernewb.com/wiki/QEMU/Devices/Network <- ne2k_pci and ne2k_isa
<bslsk05> ​computernewb.com: QEMU/Devices/Network - Computernewb Wiki
<dostoyevsky2> but only 10MB/s
<gog> hmm i thought they were 10/100
<gaxar77> uhm, I can't find any HLA tutorials.
<clever> dostoyevsky2: do you just want network in qemu, or do you want to target real hw with an e1000 card?
<gaxar77> And I can't find that book for free either.
<dostoyevsky2> clever: My idea would be: boot linux into qemu and then run my OS from there via qemu... and qemu paravirtualizes any network card into e.g. a e1000 and I only need to ever write one driver
<clever> dostoyevsky2: i would recommend you look into virtio then
<clever> virtio has a common framework, where you can then get network, input, gpu, and disk
<clever> so you only have to write 1 driver instead of 4
<dostoyevsky2> clever: I guess htat is even easier than writing hardware drivers
Chinese_soup has left #osdev [WeeChat 3.0]
<heat> dostoyevsky2, e1000 is relatively well documented and usable
<clever> dostoyevsky2: https://docs.oasis-open.org/virtio/virtio/v1.2/cs01/virtio-v1.2-cs01.html is the document ive been following
<heat> rtl8139 is also a really stupid simple NIC, but probably way lower performance
<bslsk05> ​docs.oasis-open.org: Virtual I/O Device (VIRTIO) Version 1.2
<dostoyevsky2> clever: Could I even use Linux's nvidia drivers from my os, like virtio-opengl virtio-cuda?
<clever> the only real trap ive ran into, is that i implemented the new virtio, but qemu defaults to virtio legacy
<clever> dostoyevsky2: virtio-gpu includes both 2d and 3d modes
<clever> i think 3d is a standardized api, where qemu then translates it for you
<gog> gaxar77: the C bare bones/meaty skeleton are good starting points that use well-understood tools
<gog> i don't know anybody here that uses HLA
<bslsk05> ​docs.oasis-open.org: Virtual I/O Device (VIRTIO) Version 1.2
<gog> will the real HLA user plase stand up?
<mcrod> hi
<clever> dostoyevsky2: section 5.7.6.9 Device Operation: controlq (3d)
<heat> gog, what's HLA?
<gog> high-level assembler
<dostoyevsky2> gaxar77: I remember some people usin hla in ##asm
<mcrod> i need a new brain
<heat> mcrod, linux fucken kernel mcrod
<heat> linux fucken kernel
<dostoyevsky2> mcrod: amazombie.com
<mcrod> huh
<kof673> https://en.wikipedia.org/wiki/High_Level_Assembly there was an older unrelated HLA ...also do not think i have ever seen anyone mention it :D
<kof673> You enter what seems to be an older, more primitive world. </nethack>
<dostoyevsky2> Aren't C/C++ the real HLA?
<kof673> it was until, they started unit8_t etc. j/k
<kof673> *was, until
<Ermine> signals are hard to implement and hard to use correctly, and they serve only few cases
* geist yawns
<geist> good afternoon folks
<geist> clever: FWIW there's a 1.3, for some reason 1.2 comes up in searches
<geist> just replace the v1.2 in the path with 1.3
<bslsk05> ​docs.oasis-open.org: Virtual I/O Device (VIRTIO) Version 1.3
<Ermine> what's high level assembly
<Ermine> is it C?
<gaxar77> I think I'm going to try using FreeBasic.
<Ermine> goodluck and goodspeed
<kof673> hla is a thing for cosmos, was just mentioning another older unrelated thing with the same name, yes
<kof673> and it is an old joke that C is all the power of assembly, with all the maintainability/readibility/portability/etc. of assembly as well :D
<dostoyevsky2> Ermine: Like an answer to the question of whether you really need another language to generate assembly or just could add high-level constructs to existing assembly languages
<kof673> tcc (tiny? turbo? tendra?) with hla seems the way to go for maximum confusion
<Ermine> dostoyevsky2: MASM already has such constructs
<geist> back in the day when folks wrote a ot more assembly there were a lot of various powerful macro assemblers
<geist> with enough macros you can write somewhat abstracted assembly, even cross-architecture portable stuff
<geist> a good example of this is the particular dialect that CP/M was written in
<gaxar77> I don't understand the binutils code box of the c++ cross-compiler building tutorial.
<geist> do you have any context?
<gaxar77> what is ../
<geist> i dont kjow what tutorial you're talking about
<gaxar77> Is?
<dostoyevsky2> Ermine: GCC also already implements C (according to the standard even...) But MSVC still does their own thing
<gaxar77> That is not a command.
<bslsk05> ​wiki.osdev.org: Just a moment...
<Ermine> There are many some books about assembly, and they all consider dos or win32, so this is either TASM or MASM
<geist> ../ is a path specifier
<geist> if you want to run something in the parent directory you do something like `../foo`
<geist> in posix (and dos) . is current directory, .. is parent directory
<gaxar77> But that directory does not exist.
<dostoyevsky2> Ermine: HLA comes with libs for FreeBSD/Linux etc... I don't think MASM has a lot of relevance these days
<geist> they're just magic directory entries
<geist> gaxar77: of course it does, unless you're in the root directory
<gaxar77> I'm in the user directory, I think.
<geist> sounds like you're just completely screwed up. what OS are you running on?
<gaxar77> Windows
<geist> also that page is not super clear what's going on
<gaxar77> lol
<geist> what it's probably trying to say you should be doing is creating a build directory *next to* your binutils and gcc dir
<geist> then cd into it, and run the configure script from the parent and over one
<geist> ie ../binutils-1234/configure from a directory called build-binutils or whatnot *next to* binutils-1234
<Ermine> At risk of being rude, unwelcoming, undendorsing, uncooperative and snobbish, you have to study a lot before engaging into osdev. And your first articles should be https://wiki.osdev.org/Required_Knowledge and https://wiki.osdev.org/Beginner_Mistakes
<bslsk05> ​wiki.osdev.org: Just a moment...
<bslsk05> ​wiki.osdev.org: Just a moment...
<dostoyevsky2> The bestest thing is always to go to any programming-related channel and ask why their code isn't running for your on your self-written OS
<geist> what flavor of windows are you running?
<gaxar77> 11
<gaxar77> What is flavor?
<geist> so are you trying to build all this stuff in powershell or something?
<gaxar77> cygwin
<geist> ooh.. oh gosh please run far away
<geist> use something like WSL2. it gets you a proper linux environment
<Ermine> dostoyevsky2: they still include masm with their build tools, but I guess nobody uses it on itself, except maybe driver devs
<geist> and if you do that you can use a prebuilt toolchain without needing to build it
<gaxar77> Okau.
<gaxar77> Okay.
<geist> but as others have been stating, you really need to understand a lot more basics
<gaxar77> Which linux do I need to install in WSL/
<geist> you're kinda diving into the deepend
<Ermine> geist: I think building one manually is a good thing from education point of view
<geist> up to you
<geist> Ermine: yeah but as the very very first step? dunno
<Ermine> not the very first I guess
<geist> but then i honestly dunno what the very very first step should be nowadays
<geist> but generally i suggest doing something like getting some basic hello world working so you can get a taste
<Ermine> in this case the first step would be learning to use Unix command line
<geist> and then go back and build some more infrastructure for going
<Ermine> and tools
<gaxar77> I'm installing WSL now.
<gaxar77> How were OSes built and put on machines before we had these tools?
<geist> and what linux you have shouldnt matter. i usually use ubuntu personally. but debian is basically the same thing etc
<Ermine> I've built my first toolchain in circa 2017-2018, and it seemed much harder to me
<geist> completely specific to the machine. manually
<Ermine> And I had much less understanding of what's going on
<clever> dostoyevsky2: i glanced at the qemu source, it does have support for virgl, its gated behind CONFIG_VIRGL and the gui side having a working opengl (so in headless mode, its a no-go for ex)
<clever> oh, but spice in headless mode, might have virgl
<geist> clever: my only push back on virtio for first driver is on PC it's pci, and then pci is complicated
<Ermine> But anyway, learning programming by osdeving is like learning to ride a bike by taking part in the Tour De France
<dostoyevsky2> clever: Yeah, but is it like opengl passthrough or just mesa on a canvas?
<geist> so even finding the virtio apterture and figuring out where things are mapped requires somewhat more knowledge than a basic rtl8139 or whatnot
<clever> geist: ah yeah, id be interested in if virtio-mmio could be forced on x86
<gaxar77> The WSL Powershell cmdlet is installing Ubunutu.
<gaxar77> I don't know much PowerShell at all.
<clever> dostoyevsky2: i think virgl is a completely custom 3d gpu, that is designed to be easy to translate to a host api
<gaxar77> I should learn it.
<geist> also keep in mind that even if a ne2000 or rtl8139 are 10 or 100 mbit in real world, when being emulated in qemu the speed is as fast as you can drive it
<clever> dostoyevsky2: and i believe mesa does support it, but then you have to port mesa or duplicate it
<dostoyevsky2> clever: I am not sure what needs to be "translated" there...
<gaxar77> I wanted to use Cosmos OS but it is poorly documented.
<geist> what the heck is cosmos os
<clever> dostoyevsky2: every gpu does things differently, and mesa deals with that within the 3d client (games for example)
<gaxar77> And cosmos does stuff its own way.
<dostoyevsky2> https://github.com/Androthi/HIDE <- an IDE for HLA written in HLA... I wonder if MASM has something similar to this
<bslsk05> ​Androthi/HIDE - IDE for the HLA language, written in HLA. Self compiles using HIDE (1 forks/18 stargazers)
<geist> oh i see, C#, etc. that's why i've never heard of it
<Ermine> geist: I guess thisone https://github.com/CosmosOS/Cosmos
<bslsk05> ​CosmosOS/Cosmos - Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more! (543 forks/2860 stargazers/BSD-3-Clause)
<gaxar77> It's for building OSes with .NET.
<geist> yah you'll find that most folks here are not doing things in .NET or whatnot. at least not osdev work
<gaxar77> And it hasn't been updated in 2 years.
<gaxar77> I have to reboot my system.
gaxar77 has quit [Quit: Leaving]
<dostoyevsky2> what would `w.SendDlgItemMessage( optProject, IDC_MANAGERPROJ_FOLDERS, w.LB_RESETCONTENT, 0, 0);' look like in MASM?
<gog> geist: it's on my TODO list to investigate bflat and zerolib for bare metal environments
<gog> there are some EFI prrof of concepts
<gog> it's not exactly .net, but more like freestanding c#
<gog> i'm leaning into the microsoft brainworms
<heat> hello geist
op has quit [Remote host closed the connection]
<geist> hello heat
<Ermine> Now I wonder if it's possible to osdev under windows directly without cygwin and whatnot
<geist> hello gog
<dostoyevsky2> clever: Not sure, normally when you use Vulkan/OpenGL every gpu works similarly, they might be slow to run your code though... but any differences are usually hidden by nvidia's drivers (e.g.)
<gog> hello geist
<heat> Ermine, yes
<heat> see: windows
<geist> Ermine: oh i've seen people over the years use MSVC directly sure
<heat> also EDK2
<heat> most bioses are built on windows
<gog> BIOSen
<Ermine> biosen
<heat> windowen
<gog> heaten
<geist> you are just sort of on your own, but as long as you are okay dealing with PE binaries you can do a lot of the same thing as wth gcc/clang/elf toolchains
<Ermine> well, new question is 'how hard'
<heat> goggen
<heat> if you know the toolchain it's about as hard as in GCC
<geist> yah. i dont know if the MSVC linker is quite as flexible as the others, so you may be stuck with more strict layouts of things
<heat> the big problem is that more or less no one in #osdev circles knows the toolchain
<geist> maybe less section trickery, but then nowadays you can mix and match clang and whatnot
<heat> so as soon as you're using MSVC you're on your own
<clever> dostoyevsky2: thats only because the libraries (mesa) understand what makes the gpu a special snowflake
<gog> bflat can spit out ELF object code
<gog> it's a stripped-down version of csc for native AOT
<geist> yah it's possible that now vs 10 or 20 years ago it's just a lot more flexible
<Ermine> msvc can produce only PEs, but the only thing that can boot PE is... efi itself, or windows loader
<clever> dostoyevsky2: and the problem then, is that you would need the nvidia compatible mesa installed in the guest
<Ermine> I guess grub can't
<geist> Ermine: yeah but you can generally flatten a thing to a raw binary, use multiboot, etc
<heat> grub can boot whatever
<gog> anything is possible if you're persistent and weird enough
<geist> so it's possible to just few PE (or mach-o if on mac) as a middle stage
<heat> multiboot is flexible in that regard
<FreeFull> I wonder if there's a list of operating systems that support qemu's virgl
<heat> it doesn't actually require ELF
<Ermine> ah, indeed actually
<FreeFull> FreeBSD has partial support only (2d), Linux supports it fully, and I think there's a Windows driver
<heat> now objectively speaking PE is an awful format
<heat> mach-o is a lot saner
<heat> ELF is both the least sane sane format and most sane insane format
<Ermine> so, "Bare bones with MSVC" is entirely possible
<dostoyevsky2> > try; mov(fileio.open(pathwordlist, fileio.w), hFile); exception(ex.FileOpenFailure); exit StoreWord; endtry;
<Ermine> gotta try this one day
<FreeFull> By virgl I meant virtio-gpu
<gog> ELF is cool if you want to do weird things
<gog> i always want to do weird things
rustyy has quit [Ping timeout: 268 seconds]
<heat> full virgl support more or less depends on mesa
<Ermine> Ah, btw there's no msvc targetting weird archen
<heat> which windows doesn't have, freebsd should have it, linux has it
<dostoyevsky2> heat: I think those MZ relocation headers where insane... and in ELF you can just dump your raw binary after the header
<Ermine> freebsd can run kde, so it must have mesa
<heat> the relocations are weird, they have a standard-ish format and they also directly patch .text
<heat> PE is full of weird legacy options that make no sense, weird headers that make no sense
<FreeFull> FreeBSD does have mesa, but the kernel part of the virtio-gpu driver is only half-done (and disabled by default)
* Ermine also thinks of self-relocations
<dostoyevsky2> Doesn't mesa also always rely on something like llvmpipe to compile whatever they are doing into something native?
<heat> no
<FreeFull> llvmpipe is software rendering
<dostoyevsky2> yeah, so mesa can do without software rendering? Because I wasn't aware of that...
<Ermine> If it fails to detect hardware, it needs fallback I guess
<heat> of course?
<dostoyevsky2> But if you gpu supports opengl/vulkan why not just use that? I think that's how firefox/chromium use the gpu... not through mesa
<heat> wrong
<heat> mesa is THE opengl and vulkan implementation
<Ermine> mesa implements opengl and vulkan
<heat> for all drivers except nvidia proprietary
<gog> nvidia is an AI company now
<Ermine> mesa has opencl just for that
<dostoyevsky2> gog: nvidia invented AI
<gog> no, i did
<heat> WHAT
<gog> i'm so sorry
<Ermine> Actually, you can use gpu without mesa
<heat> opencl sucks
<heat> everyone uses cuda
<Ermine> yes
<Ermine> but it's not in mesa
<dostoyevsky2> heat: I think Adobe Premiere still uses OpenCL
<Ermine> Also, I need to check out vulkan compute extensions
<Ermine> You can go through libdrm directly
<bslsk05> ​juniorprincewang/virtio-cuda-module - cuda-supported qemu front-driver and test case (0 forks/5 stargazers)
<Ermine> It's not going to be easy, and it's going to be vendor-specific code
<dostoyevsky2> are virtio drivers easy to write... so you can add more paravirtualized hw to qemu that you can still interface with from your OS with your one driver?
oldgalileo has quit [Ping timeout: 260 seconds]
gaxar77 has joined #osdev
vin has joined #osdev
<gaxar77> On https://wiki.osdev.org/GCC_Cross-Compiler#Linux_Users_building_a_System_Compiler, how does the Gentoo Shell Code for generating a cross compiler work. I don't understand it.
<bslsk05> ​wiki.osdev.org: Just a moment...
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<heat> do not use gentoo
m5zs7k has quit [Ping timeout: 268 seconds]
<gaxar77> oh sorry.
<heat> if you're stumped at the sight of ../ you're not ready for the gentoo
Turn_Left has quit [Remote host closed the connection]
<gaxar77> It doesn't say how to build a cross-compiler on linux.
<gaxar77> Linux*
<heat> yes it does
Turn_Left has joined #osdev
<nikolapdp> look, if you don't understand what ../ works, you aren't even remotely ready to build a cross compiler
<heat> see "The Build"
<heat> >Your distribution may ship its own patched GCC and Binutils that is customized to work on your particular Linux distribution. You should be able to build a working cross-compiler using the above source code, but you might not be able to build a new system compiler for your current Linux distribution. In that case, try a newer GCC release or get the patched source code.
<heat> what the fuck does this mean
<heat> ???
<gaxar77> ubunutu didn't come with anything/
<gaxar77> I had to write a shell script calling apt-get many times to install the necessary software.
<Ermine> ubuntu has gcc in its repositories
<nikolapdp> lol why would you want to build a system compiler when you are on the page for the cross-compler
<heat> i don't know. the osdev wiki is full of weird fucking advice
<Ermine> you didn't have to write any scripts to install software
<geist> right, keep in mind that the wiki is just community advice. so you'll get weird, conflicting, sometimes good, sometimes bad pages in it
<geist> it's free, but you get what you pay for
<gaxar77> Well, I tried to run gcc and it said it wasn't a command.
<nikolapdp> apt install build-essential
<dostoyevsky2> heat: system compiler -- what system?
<nikolapdp> there you go, that's gcc
<gog> i think this means "system compiler" targeting the OS
<geist> yep
<geist> what nikolapdp said
<gaxar77> But how do i get the cross-compiler.
<geist> this is where you should probably know your way around linux a bit
<Ermine> the one that is not a cross-compiler
<nikolapdp> system compiler is the one for your current system
<geist> here i did it for you: https://newos.org/toolchains/
<bslsk05> ​newos.org: Index of /toolchains
<nikolapdp> like the one from your distro's repos
<nikolapdp> lol also just take geist's toolchains, it's way easier
<Ermine> I guess not a lot of people there are interested in updating those instructions
<geist> i built that with https://github.com/travisg/toolchains
<bslsk05> ​travisg/toolchains - Shell script to build gcc for various architectures (33 forks/76 stargazers/MIT)
<heat> Ermine, blind leading the blind
<dostoyevsky2> I'd just use zig which has all the compilers
<geist> it's is low key why i was pushing you towards WSL2, then you're on a plain linux distro and push comes to shove you can use standard things
<dostoyevsky2> zigOS
<geist> (also WSL2 will be hecka faster than cywgin)
<Ermine> But, anyway, I've got my cross-compiler by following the very same instruction
m5zs7k has joined #osdev
<heat> i would kind of recommend clang but clang has its caveats in general
<gog> clang clang clang
<heat> like, their libgcc/compiler-rt won't work at all if you pass a --target
<nikolapdp> gcc gcc gcc
<gaxar77> So, there's already a cross-compiler on ubuntu?
<dostoyevsky2> tcc tcc tcc
<geist> the wiki page doesn't seem to be really wrong per se, it just isn't a 'follow this line by line' sort of tutorial you probably want it to be
<gog> you don't need compiler-rt if you're freestanding
<nikolapdp> you know what c compiler is easiest to build as a cross compiler
oldgalileo has joined #osdev
<heat> gog, you do
<geist> it's more like 'here's the necessary info to get you to build it on your own'
<Ermine> gog: you do
<gog> what
<gog> how does my shit even work then
<heat> try to divide a 64-bit number in a 32-bit arch, or use __atomic in riscv or arm64
<Ermine> by the chance
<heat> it'll instantly shell out to compiler-rt
<gog> why would i use a 32-bit arch
<nikolapdp> asme with libgcc
<geist> gog: +1
<nikolapdp> *same
<gog> but that would explain why i'm doing none of that
<gog> so it works fine
<gog> but i guess it could break inexplicably someday
<heat> you need to be careful of the 10 trillion footguns
<Ermine> or it uses libgcc somehow
<geist> but yeah libgcc/compiler-rt tedn to not be needed as much on 64bit arches
<geist> but you'll eventually hit a call to something, but then you can choose to just emit it manually
<heat> i ship my own with the kernel
<geist> we dont use it on fuchsia, for example, we just avoud things that need it
<gaxar77> Do I even need to build a cross-compiler?
<heat> my own = compiler-rt from a random LLVM
<gog> my job involves pointing footguns at myself and pulling the trigger every day i am very comfortable with the footguns
<gaxar77> If I am target the same machine?
<gaxar77> platform*
<geist> need? not now. no
<heat> highly recommended to do so
<geist> should? yes
<gaxar77> oh ok
<dostoyevsky2> gaxar77: what even is a cross compiler, is it a christian thing?
<Ermine> you're targeting only the same arch
<geist> and you're on well trodden starting platform, linux-elf
<gog> hey now let's not blaspheme
<Ermine> you don't target the same os
<gaxar77> so, I can generate pure executables not for an OS with the regular gcc compiler and linker?
<gog> you can yes
<heat> cross-compiler is haram brother
<geist> gaxar77: to be precise, on linux-elf you can generally do it, yes
<geist> if you were still on cygwin we would have said no or who knows
<gog> but at some point the compiler might emit a call to something you won't be able to ship with the binary
<gog> and you'll have a Really Fun TIme trying to debug it
<geist> an ELF based OS like linux, any of the bsds, etc you can generally drive the host toolchain easily using schemes that are well documented
<heat> you can do it but i'm telling you straight up that *you* don't know how to do it
<heat> and you should just embrace the x86_64-elf
<geist> right
<gog> clang clang clang
<heat> seriously, steal one from geists' link
<heat> it's easy
<heat> it Just Works
<gaxar77> Does thread switching happen based on a timer/
<gaxar77> ?
<nikolapdp> literally
<heat> you don't need to pass like 20 options carefully
<dostoyevsky2> gog: just implement those ~300 linux syscalls in your kernel
<geist> having a simple plain toolchain helps because it gets rid of a bunch of extra variables you dont know yet
<gog> geist is OG OSDEV
oldgalileo has quit [Ping timeout: 264 seconds]
<gaxar77> or based on number of instructions executed?
<geist> geist is getting dragged into teh 21st century
<heat> timer
<gaxar77> oh ok.
<geist> here's an admission: i started using vscode the last few weeks
<geist> and.... it's kinda good
<heat> HAH!
<gaxar77> Doesn't that slow down the system.
<gaxar77> The smallest timer unit is a millisecond.
<heat> why would it?
<gaxar77> seems kind of slow.
<gog> i use vscode too
<gog> with vim bindings
<heat> 10ms is generally what's used, 100ms for servers
<nikolapdp> geist what were you using before that
<dostoyevsky2> geist: Just ask copilot to write you an OS
<gaxar77> unless it's something called a tick which is even smaller.
<gaxar77> is it/
<gaxar77> ?
<geist> gog: heh actually it was the vim bindins that are giving me a lot of trouble, since it turns out the vim extension overrides a lot of useful ctrls
<geist> like ctrl-p
<gog> what does ctrl p do
<heat> a tick is whatever you define it to
<geist> but once i figured that out and selectively unmapped those keybingins
<heat> ctrl-p helps you switch files
<gog> oh
<geist> ctrl-p is where it really shines
<geist> or at leas ti had an equivalent on vim
<gog> i write everything in one file
<geist> nikolapdp: vim, or gvim
<heat> ctrl-t helps you switch symbols
<geist> that *other* oroblem i have wih the vim extension is that i type too fast
<nikolapdp> lol
<geist> i can actually overrun it and it loses keystrokes. and this is apparently well know
gaxar77 has quit [Quit: Leaving]
<geist> no solution
<heat> ew
<gog> ooops
<heat> see, should've used emacs
<geist> on big files where it is chewing on it hard
<dostoyevsky2> geist: Maybe get a faster computer?
<geist> i already have a fast computer. it's vscode
<heat> yes geist ONLY 40 CORES?
<geist> it's written i javascript
<heat> LAPTOP SCALE
<nikolapdp> geist just stick with vim :P
<geist> heh my workstation at the office is 64 cores 128 threads
<geist> there's a complicated reason i am pushed to use it, mostly involving work
<heat> fwiw vscode is generally fast
<nikolapdp> is it a threadripper or a server cpu lo
<geist> and then once i grokked it it's pretty good
<geist> nikolapdp: threadripper
<nikolapdp> heat it's litereally not
<heat> it literally is
<dostoyevsky2> geist: I have one of those mac books max m2 laptops... firefox still renders about the same speed/fps as on my 2012 macbook
<heat> clangd sometimes sucks, but it sucks everywhere
<gog> good enopugh for WEBDEV
<heat> many-thousand-line files work fine
<geist> heat: yep, it's clangd generally chewing away that lags it
<geist> especially on large fuchsia files with lots of C++
<nikolapdp> geist: is it one of the consumer threadriuppers or the new pointless pro ones
<geist> for my LK work it's not so bad
<geist> nikolapdp: good question. it's a lenovo P620, maxed out
<geist> whatever that is. look it up!
<geist> AMD Ryzen™ Threadripper™ PRO 5995WX Processor (2.70 GHz, up to 4.50 GHz Max Boost, 64 Cores, 128 Threads, 256 MB Cache) probably
<nikolapdp> lol looks like it's a pro
<geist> though i think it's the 3995WX
<dostoyevsky2> geist: I find the real problem with JavaScript performance is that setTimeout()/setInterval() don't work any faster on a faster computer
<geist> rip on it all you want it THREADRIPS and tears
<geist> to be specific the case where it loses keys is ESC sometimes
<heat> geist, i *usually* find it tolerable once you let clangd process its backlog and cache everything
<geist> sometimes i type something in and just as i go to ESC and drop out of insert mode, which is like automatic to me, i dont think about it, it's at that instant chewing away with clangd and start to pop something up and there's a tiny window where the pop up eats the ESC
<geist> yah it's usually if i add some new thing, like what it is interpreting as a function call
<heat> but i don't work with super-C++y codebases very often, maybe that's just a chronic c++ problem
<geist> yah
<dostoyevsky2> ESC is the wierdest key combination to use in a terminal
<heat> in which case SHOULD'VE USED RUST
<heat> C++ DEVELOPERS OWNED BY CHAD RUST ENJOYER
<geist> but frankly it's the large C++ codebases which i haven't found a great vim solution for
<geist> and vscode works pretty well
<heat> do you get the same clangd slowdowns in vim?
<geist> i have a clangd plugin for vim (YouCompleteMe) but it only really helps with completions, doesn't let you navigate around like 'go to the definition of this'
<geist> no, with vim the clangd stuff seems to be completely decoupled from the editor itself
<geist> so it can lag but it never ever slows down the editor itself
oldgalileo has joined #osdev
<geist> but yeah the gist is if you can tolerate that the editor can lag a bit (which is diffuclt for me but i'm working on it) then the features you get are pretty slick
<geist> but is till want to use vim bindings, if nothing else because i can switch back and forth between editors based on the file, the situation, etc
<heat> btw here's a must add for the clangd cmdline: -header-insertion=never
<heat> auto-header-insertion does the wrong thing most often
<geist> ah yeah i need to add that to my workspace
<geist> also clang tidy with a nice set of switches is pretty helpful
<nikolapdp> heat what does that do
<heat> auto header insertion just auto-includes stuff if it sees you're using a symbol without including
<heat> the problem is that it screws up very often
Gordinator has joined #osdev
oldgalileo has quit [Ping timeout: 268 seconds]
<geist> eyah on a nonstandard codebase like a kernel or your os
<geist> i see that happen in fuchsia code reviews too
<Ermine> youcompleteme is le cringe
<Ermine> also i failed to set it up under windows
<heat> using vim under windows is like
<heat> one of the ideas
<heat> of all time
<heat> at least you're not trying to use emacs i guess
Gordinator has quit [Remote host closed the connection]
<Ermine> I tried
<Ermine> It was 4Gb laptop, and that's not enough for vscode
<Ermine> so vim
<heat> oh yeah you might struggle with 4G
<heat> but that's the case with like, any sort of web browsing too
<geist> anyway back to work. my mission for today: risc-v SSTC support
<dostoyevsky2> Ermine: How many GB does vscode need? 40G?
<geist> and then onto MSI-X so's i can use it in virtio
<heat> what's Sstc again?
<geist> supervisor mode timer (so you dont have to call SBI)
<heat> ah great
<geist> new stuff tends to have it, and i betcha it'll be in RVA23
<Ermine> dostoyevsky2: 1G or something like that. But windows and stuff already consume 2G
<heat> i support no extensions, because i'm based
<geist> yeah i've seen the code process get close to 1GB, and then if it's running clangd or so in the background it chews up a bunch
<Ermine> So I was hitting page file actually all the time
<geist> oh way i figure it is if i'm gonna have to use code then by golly i'm gonna min/max this shit
<geist> get the most utility out of it as i can
<heat> actually i support... imacfd and the other two extensions that were taken away from g
<Ermine> Maybe I should learn rust and contribute to Lapce
<heat> i've been learning rust on and off lately
<geist> heat: yah last night i added reading the feature string out of the FDT and then passing that up to the arch/riscv layer so it can pick out a feature
<dostoyevsky2> Rust gives you a lot time to read documentation while your code compiles
<Ermine> I'm on academic leave so I can allocate some time I guess
<Ermine> and then leave go behind probably
<dostoyevsky2> Write your OS as a quine
<heat> geist, do you match strings or assign bits to features?
<heat> matching strings sounds annoying
<geist> match strings to assign features to a bit
<heat> yeah
<geist> basically just some tossed together code to start picking shit out of the string: https://github.com/littlekernel/lk/blob/master/arch/riscv/feature.c
<bslsk05> ​github.com: lk/arch/riscv/feature.c at master · littlekernel/lk · GitHub
<heat> oh this was for lk? i was assuming zircon
<geist> oh no we've had it for zircon for a while
<heat> oh yeah zicsr and zfencei
<geist> oh i picked those out more as a test of long things
<geist> eeyooo!
<heat> { "zfencei", RISCV_FEAT_ZIFENCEI },
<heat> you oopsied it?
<heat> should be zifencei
<geist> oh yeah that explains why it doesn't match :)
<geist> fwiw qemu is currently matching passing rv64imafdch_zic64b_zicbom_zicbop_zicboz_ziccamoa_ziccif_zicclsm_ziccrse_zicntr_zicsr_zifencei_zihintntl_zihintpause_zihpm_za64rs_zawrs_zfa_zca_zcd_zba_zbb_zbc_zbs_ssccptr_sscounterenw_sstc_sstvala_sstvecd_svadu
<geist> honestly i wrote the whole thing yesterday so i could match SSTC
<geist> but figured i'd at least get the basics
<heat> yummy lettersoup
<heat> no svnapot yet :(
<geist> zicsr and zifencei are pretty much always there too. honestly i should just remove it
<geist> zicsr we'd blow up in an instant and zifencei i think there's no fundamental change of anything
<heat> you might need zifencei, although i guess you're not needing it for lk atm at least
<geist> yah
<Ermine> zbs
<geist> it's really a matter of how complete need to be or not
<heat> i have fun fence.i usage because IM A LOW LEVER HAXXOR and i do things like writing to .text
<heat> did you know iretq is a serializing instruction? it's hilarious
<geist> why wouldn't it be?
<heat> right, everything serializes in x86
<Ermine> heat: are you doing riscv stuff?
<heat> there's a fun trick in linux where they use iretq instead of cpuid, which is the traditional "serializing" instruction
<geist> well, what i generally mean is ltos of arches generally default to serializing when crossing priviledge layers there
<geist> otherwise you're prefetching from different contexts and that's a bad idea
<heat> yeah but it also serializes on e.g a normal jump
<geist> oh sure, but how does the cpu know until it groks it
<heat> and it turns out it's a lot faster than cpuid, because cpuid does a vmexit and iretq does not :)
<heat> Ermine, not atm
<geist> ARM has a bunch of verbiage in their docs bout precisely when it serializes when dealing with exceptions and whatnot
<geist> heat: oooooh cute. that makes sense
<geist> though also isn't one of the TSCs serializing? i guess those trash two registers while they're at it
<geist> of course cpuid trashes 4
<heat> yes rdtscp or lfence;rdtsc
<heat> i haven't microbenched but i assume its still slower
<heat> and those allegedly vmexit sometimes according to mjg
<heat> probably if you have no TSC_ADJUST msr
goliath has quit [Quit: SIGSEGV]
<geist> yah that's probably the reason
<geist> to not generically use it
basil has quit [Remote host closed the connection]
basil has joined #osdev
<heat> oh nvidia is involved in the riscv specs too
<heat> i guess this is because of the falcon co-processor thing in their gpus
basil has quit [Remote host closed the connection]
basil has joined #osdev
<geist> yeah
<Ermine> unsurprisingly
basil has quit [Remote host closed the connection]
basil has joined #osdev
<geist> heh well SSTC ended up at the end of the day being a one line feature change
<geist> instead of calling sbi_set_timer(ticks) you just write to `sstimecmp` CSR
<geist> thought there was more to it
<heat> that's the kind of patches we enjoy
<heat> hope you did it with a ternary expression for a literal one line patch
<geist> and you can kinda lazily switch to it, since the spec says that on a machine with SSTC the SBI implementation will just basically set the STIMECMP register for you, so there's no handoff or whatnot
<geist> heh no a test because the 32bit fallback needs to do it with two registers
<geist> lo siento
<geist> desculpe
<geist> oh hey i got a new riscv board too
<heat> mierda
<bslsk05> ​docs.banana-pi.org: Banana Pi BPI-F3 | BananaPi Docs
<geist> of course no docs at all
<geist> though it seems pretty straightforward at least in the run on the cpu sense
<heat> AI COMPUTING POWER!!
<geist> but it's a completely new core i hadn't seen before
<heat> yo no tiengo un ordenador riscv :(
<geist> SpacemiT K1
<geist> riscv esta primero cpu!
<heat> what
<heat> sorry, que
<geist> ¡no!
<geist> riscv é a primeira CPU
<geist> there, you happy?
<heat> that still makes no sense
<heat> riscv is the first CPU?
<geist> like in first place!
<geist> it's the best cpu
<heat> oh haha
<geist> you were reading a bit much into it
<heat> riscv es el mejor cpu
<heat> maybe
<heat> i dunno i haven't spanished properly for like 6 years
<geist> there's this sick family joke where my sister had a bunch of chickens that hatched and we made the mistake of naming them
<geist> primero was the first
<geist> and then it got sick and died, but the rest did fine
<geist> so now it's like a family cautionary tale about being the first
<geist> esta primero!
<heat> lol
<heat> is spanish that widespread in texas?
gbowne1 has joined #osdev
<geist> it's pretty widespread yeah
<geist> but mostly just my brother in law's mom is from mexico, and he speaks it fluently
<geist> so we generally try to ironically use spanish for lulz
<heat> yo tiengo alguna dificultad de hablar español
<geist> especially since i know i suck at it
<heat> it's similar enough to portuguese that i find it real easy to start speaking portuguese with a spanish accent
<geist> yah probably written it's pretty straightforward to figure out right?
<heat> eu tenho alguma dificuldade a falar espanhol
<geist> i'd think pronounciation would be the harder part
<heat> uh yes
<heat> there are a bunch of false friends
gbowne1 has quit [Remote host closed the connection]
<heat> the rest is just a bunch of different spellings of the same root word
gbowne1 has joined #osdev
<geist> thats what i was just wondering, if there are a bunch of false cognates between spanish and portuguese
<geist> english to a latin language of course has tons of those, depending on what was borrowed and what wasnt
<heat> this is pretty common in most romance languages
<heat> i can *kind of* with some time read romanian, even though it's very far away
<heat> italian too-ish, french i find harder
<Ermine> taco!
<geist> i guess an interesting quetion is how far the different romance languages have divered from latin, and in what direction
<geist> i've generally read that romanian is closest to original latin
<Ermine> now i want taco
<geist> though that may be spoken, not written, or both
<heat> romanian was really slavicized (is this a word?) until the 19th century where they reapproached latin
<heat> and added a lot of of latinized stuff
<geist> interesting
<heat> there was a guy on youtube that started speaking latin with italians (around rome i think) and they could kind of understand each other
<geist> yeah i think i either found that independently or you linked it, was really interesting
<Ermine> triarii!
<geist> and at that he spoke multiple dialects of latin
<geist> tried it on some of the clergy and most couldn't really understand it
<heat> Ermine, ~voice cracks~
<geist> around the vatican
<netbsduser> osdev199: a misconception
<netbsduser> "everything is a file" really means everything is accessed through some handle that represents all capabilities a process can have
<heat> geist, i've heard theories that the words most intelligible between e.g a 15th century speaker and now would be swear words
<heat> which is funny and probably true
<geist> hmm, they'd probably be more biblical
<netbsduser> called the "file descriptor" (it was a trend for a time to call fds "object descriptors", see the 4.4bsd man page for `dup` or even "rights", as in SCM_RIGHTS)
<geist> like swearing at god or whatnot
<netbsduser> geist: i have heard that in the scandinavian countries the worst swears remain those that take the name of god in vain, either literally or figuratively
Arthuria has quit [Ping timeout: 260 seconds]
<geist> so the story goes that a lot of the swears in french speaking canada are that way
<geist> Tabernac! etc
<heat> lots of stuff like motherfucker, shit, crap, et al are probably timeless
<heat> portuguese has a really common one (caralho) that no one knows the origin of
<netbsduser> i do notice the swears nowadays are more sexual or bodily than the swears i read in historical things
<netbsduser> and nowadays hardly anyone would say "devil take you" to someone, but this was once among the worst things you could say
<heat> they probably just didn't write them
<heat> vulgar stuff was vulgar and as such had no place in books
<netbsduser> it would be like telling someone to get a horrible terminal disease, except worse, because the devil takes you forever
<netbsduser> though i think the dutch have a swear to the effect of "get cancer"
<kof673> swear words are commonly old gods :D
<geist> i had read somewhere when they were writing the show Deadwood (fantastic show BTW) they were trying to be pretty time accurate (1800s west) but had to modernize the swearing a bit
<geist> since time era swearing sounds basically silly to us
<geist> lots of 'gawl darnit' and stuff. like Yosemite Sam
<kof673> beep beep -- roadrunner
<netbsduser> heat: i suppose if i look at some old flyting (a sport in scotland that consisted of ruthlessly insulting and denigrating your opponent, poetically) there's some quite base vulgarity in it focused on the body, sex, and excreta
<heat> darn and darn it and dang and gosh darn it are all pretty logical stuff
<heat> just silly substitutes for god damn it which was pretty sacrilegious and strong stuff
<heat> (which probably sticked in the more-religious south)
<kof673> > vulgar stuff was vulgar and as such had no place in books conway's law...vulgar has double meaning :D
<heat> netbsduser, romans graffiti'd dicks on walls as a way to insult people
[Kalisto] has quit [Quit: No' vemo']
[Kalisto] has joined #osdev
<kof673> "a book of famous fairy tales" "the storks" all the storks were called Peter, and so they are all called even now. # the hieroglyphs are in the fairy tales still :D
<dostoyevsky2> kof673: I prefer the infamous fairy tales
node1 has joined #osdev
oldgalileo has joined #osdev
Turn_Left has quit [Ping timeout: 240 seconds]