channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched
#osdev2 = #osdev @ Libera from 23may2021 to present
#osdev @ OPN/FreeNode from 3apr2001 to 23may2021
all other channels are on OPN/FreeNode from 2004 to present
Sunday, 2 January 2022
00:00:00 <newpy> that seemed to work for the bootloader, but it probably isn't good
00:00:00 <gog> but still safest to build one to a raw elf target
00:00:00 <gog> yeah it just introduces a lot of ways for intractible bugs to sneak in
00:00:00 <newpy> yea I had to play with a lot of flags to get it to work in the first place
00:00:00 <newpy> the tutorial assumed a different env probably
00:01:00 <gog> https://wiki.osdev.org/GCC_Cross-Compiler
00:01:00 <bslsk05> wiki.osdev.org: GCC Cross-Compiler - OSDev Wiki
00:01:00 <gog> since you have WSL you can just follow the same instructions for linu
00:21:00 <_eryjus> newpy: since the tutorial was incomplete on the topic, take a look at https://wiki.osdev.org/Brendan%27s_Multi-tasking_Tutorial
00:21:00 <bslsk05> wiki.osdev.org: Brendan's Multi-tasking Tutorial - OSDev Wiki
00:24:00 <newpy> _eryjus I was going to start here: https://wiki.osdev.org/Tutorials
00:24:00 <bslsk05> wiki.osdev.org: Tutorials - OSDev Wiki
00:24:00 <newpy> maybe the bare bones tutorial
00:27:00 <eryjus> fair enough
02:22:00 <ZetItUp> pretty happy how my theme turned out for nano https://i.gyazo.com/cff1a86ae73b426794b2c1b0fd353a8e.png
02:24:00 <ZetItUp> (don't mind the code, i just wrote some stuff to test out the colors)
02:30:00 <moon-child> what's it mean for a stream to be linear?
02:39:00 <ZetItUp> it was just something i was fiddling with about if the stream should increase itself right after where it started or if it needed a bigger space to increase so the data would continue somewhere else
02:39:00 <ZetItUp> not really sure what to call it, linear or just call it tails or something hehe
02:46:00 <geist> not bad. which terminal app is that?
02:46:00 <geist> or is that a windows theme on linux?
02:47:00 <ZetItUp> it's GNU nano
02:47:00 <geist> i do like the orange colors
02:50:00 <ZetItUp> or the actual terminal is WSL under windows
02:51:00 <gog> ooh citrusy
02:51:00 <gog> you got your lemon your lime and your orange
02:52:00 <ZetItUp> im not sure about the digit color though, but i wanted something that sticks out so your eyes can draw to it faster
02:52:00 <gog> i think it's sensible and that numbers should stand out
03:04:00 <gog> i did it
03:04:00 <gog> sort of
03:04:00 <gog> i'm on the way to doing it
03:06:00 <ZetItUp> doing what? :o
03:08:00 <gog> i have a red/black tree that tracks my virtual address spaces
03:09:00 <ZetItUp> oh cool :D
03:11:00 <geist> noice!
03:13:00 <gog> yeah also took some time poking at various implementations of a gap-finding algorithm and i think i converged on one
03:14:00 <geist> are you storing the used or the unused spots, or both?
03:14:00 <gog> used
03:15:00 <gog> but i guess unused spots could be stored
03:15:00 <geist> yah dunno if there's any value in doing that, just curious if you found that to work for you
03:16:00 <gog> i don't quite have the algorithm wrote yet, i need to write the part that finds the in-order successor for a given node
03:16:00 <gog> and then the part that uses those to check for the gap
03:16:00 <gog> predecessor and successor*
03:17:00 <gog> and then rework page fault handling
04:53:00 <Ameisen> graphitemaster - I wanted to try to implement a 16-bit fixed-point to half-precision float converted for SIMD
04:53:00 <Ameisen> but I think it's only practical with AVX512
04:54:00 <Ameisen> you need to know the leading zeros
08:25:00 <zid> j`ey: I learned Aa rather than just doing Ab twice, ask me tomorrow if I remember it (the answer will be no, I'll feel guilty then learn it again)
09:11:00 <j`ey> zid: its Ab backwards!
09:23:00 <sham1> AbbA
09:26:00 <j`ey> here we go again
09:26:00 * enyc meows
09:32:00 * sham1 gives a trout to enyc
09:37:00 * enyc OoooOOOooOOOOooOO
09:38:00 <zid> j`ey: it's not backwards it's mirrored
09:39:00 <zid> Aa: x L' ... Ab: x' L ..
09:39:00 <j`ey> zid: youre left handed?
09:40:00 <zid> no, jperm is though
09:40:00 <zid> I'd rather do D2 with right hand anyway
09:42:00 <j`ey> I do: x R' U R' D2 R U' R' D2 R2 x' and x R2 D2 R U R' D2 R U' R x', which is what most right handers do
09:43:00 <zid> https://jperm.net/algs/pll
09:43:00 <bslsk05> jperm.net <no title>
09:43:00 <zid> You can click it to x R' U R' .. though
09:44:00 <zid> maybe I should learn it mirrored as well so I can skip a U/'? :p
09:44:00 <j`ey> optimisation!
09:45:00 <zid> I actually don't like the R version
09:45:00 <zid> I'd rather do L' U than R U'
09:45:00 <zid> or not, maybe I am just familiar, idk
09:46:00 <zid> I should learn one of the G perms probably
09:59:00 <zid> oh nice, I got a sub-minute even after fucking up my oll
12:09:00 <graphitemaster> Always fun seeing something you wrote make front page of HN
12:10:00 <zid> uh oh
12:10:00 <graphitemaster> Then immediately no longer fun reading the comments as you remember this is HN
12:10:00 <zid> ah I see it
12:13:00 <moon-child> graphitemaster: sounds about right :P
12:15:00 <zid> I bet if this article was about ssize_t vs size_t there'd be fewer people arguing, despite being semantically the same thing
12:18:00 <moon-child> ssize_t isn't guaranteed to be able to represent any negative numbers except -1
12:18:00 <moon-child> so go ptrdiff_t vs size_t
12:18:00 <moon-child> but yeah
16:45:00 <sonny> If you use directories to prevent name collisions, what is a good way to organize files? It seems like a step away from becomming a database
17:05:00 <zid> directories
17:06:00 <GeDaMo> Even if you store all your file names in a single index, you can still use an "/a/b/c" form
17:06:00 <zid> yup that's exactly what I was thinking
17:07:00 <zid> I just use them the same way I use underscores in C
17:07:00 <GeDaMo> I feel like there's a system which does this but I can't remember which one
17:07:00 <zid> games_factorio_launch() -> /games/factorio/launch.exe
17:07:00 <zid> it's ultimately an opaque string you pass to open()
17:07:00 <sonny> oh
17:07:00 <sonny> that's clever
17:08:00 <zid> The 'fs' part just maintains a db that lets you do queries like "similar names up to this point"
17:08:00 <zid> aka listing a directory
17:08:00 <sonny> yeah, I like that idea
17:18:00 <GeDaMo> sonny: https://en.wikipedia.org/wiki/Burroughs_MCP#File_system
17:18:00 <bslsk05> en.wikipedia.org: Burroughs MCP - Wikipedia
17:18:00 <GeDaMo> "However, since about 1970, MCP internally uses a 'FLAT' directory listing all file paths on a volume."
17:18:00 <sham1> Directories really *are* databases. Well, a good approximation
17:20:00 <sham1> Well, file systems ~ databases. Directories ~~ tables
17:21:00 <sham1> And an inode is a row with an ID which may be referenced from many places via directory entries, the "rows" of directories
17:27:00 <sonny> sham1 yeah, once I start to organize that data I want to use relations. However I just want to use some simple ideas
17:27:00 <sonny> in practice, it seems like making the filesystem a proper database is complex
17:28:00 <zid> an fs is just a highly specialized db
17:28:00 <zid> so.. go nuts
17:28:00 <zid> make zfs cry
17:28:00 <GeDaMo> I wonder if anyone has tried to use SQLite as a filesystem
17:29:00 <zid> constantly?
17:29:00 <zid> It's literally the best thing to use it for
17:29:00 <zid> modern filesystems are shitty and don't guarentee *anything*
17:29:00 <GeDaMo> I mean on raw disk, nothing underneath
17:29:00 <zid> sqlite attempts to provide ACID
17:29:00 <zid> That's making me tempted to do just that for my OS
17:30:00 <zid> but I imagine 99% of sqlite's "icky code I don't want to touch" is getting ACID semantics on top of POSIX
17:30:00 <zid> look into it for me please GeDaMo
17:32:00 <GeDaMo> https://www.sqlite.org/fileformat2.html
17:32:00 <bslsk05> www.sqlite.org: Database File Format
17:32:00 <zid> yea not what I need
17:33:00 <zid> I wanna know what the *code* is like, that implements sqlite's semantics on top of a regular fs
17:33:00 <zid> cus I'll need to rewrite it to not be on top of posix
17:36:00 <clever> zid: https://sqlite.org/c3ref/vfs.html
17:36:00 <bslsk05> sqlite.org: OS Interface Object
17:36:00 <zid> clever > GeDaMo!?
17:36:00 <clever> if you provide a struct sqlite3_vfs, and meet the api it defines in those docs, then it will just work
17:36:00 <clever> https://sqlite.org/vfs.html
17:36:00 <bslsk05> sqlite.org: The SQLite OS Interface or "VFS"
17:36:00 <GeDaMo> Neat! :P
17:38:00 <clever> https://sqlite.org/wal.html#how_wal_works
17:38:00 <bslsk05> sqlite.org: Write-Ahead Logging
17:39:00 <clever> and pages like this explain how sqlite implements its journaling ontop of those API's
17:39:00 <zid> sod how it implements it I just need to trick it ;)
17:39:00 <clever> when in rollback mode (https://sqlite.org/lockingv3.html#rollback) it will basically just make a backup copy of every block its about to modify, in the -journal file
17:39:00 <bslsk05> sqlite.org: File Locking And Concurrency In SQLite Version 3
17:40:00 <clever> and then it will overwrite those blocks in the main .db file
17:40:00 <clever> and then by clearing a "is valid" flag in the journal, the changes are commited, and the rollback becomes invalid
17:41:00 <clever> but when in WAL mode, i think it instead writes offset+size+payload records to the write-ahead log, and then all readers must parse that, and treat it as an overlay
17:41:00 <clever> so writes are sequential instead of random, and its append-only, until you compact things
17:45:00 <zid> >sod how it implements it I just need to trick it ;)
20:05:00 <GeDaMo> https://gfycat.com/enormousmadeuphamadryas
21:18:00 <newpy> I'm about to build a cross-compiler
21:19:00 <sortie> Woohoo newpy
21:19:00 <newpy> do I apt install bison, flex, gmp, etc?
21:19:00 <newpy> or is that optional?
21:19:00 <sortie> Yup
21:31:00 <newpy> sortie, where would you clone binutils git repo?
21:31:00 <sortie> I wouldn't git clone the binutils and gcc repositories. A lot of the build system is generated and generating it yourself is tricky
21:31:00 <newpy> oh ok
21:32:00 <newpy> not sure which part of the cross-compiler instructions I'm supposed to use
21:32:00 <sortie> https://wiki.osdev.org/GCC_Cross-Compiler should have the information you need (haven't reviewed changes to it in recent years)
21:32:00 <bslsk05> wiki.osdev.org: GCC Cross-Compiler - OSDev Wiki
21:33:00 <sortie> https://ftp.gnu.org/gnu/binutils/ https://ftp.gnu.org/gnu/gcc/ ← You're ordinarily going to download the latest stable release. Keep in mind the latest release might not sort last alphabetically.
21:33:00 <bslsk05> ftp.gnu.org: Index of /gnu/binutils
21:33:00 <bslsk05> ftp.gnu.org: Index of /gnu/gcc
21:33:00 <sortie> Looks like binutils-2.37 and gcc-11.2.0 are the latest releases
21:36:00 <gog> god my toolchain is old
21:36:00 <gog> maybe i should ask my wife if i can boot up a liveusb and compile on her rig :p
21:51:00 <asymptotically> honey, it's distcc o'clock :D
21:53:00 <gog> yes
22:15:00 <gog> maybe she'll let me put a manjaro vm on there
22:16:00 <gog> just so i know the compilers are matched
22:40:00 * blockhead scrolls back and finds it amusing to hear someone asking their wife if they can compile rather than asking if he can go out with the guys :)
22:41:00 <j`ey> blockhead: in this case, both are wives!
22:42:00 <blockhead> D'oh!
22:42:00 * blockhead sorries
22:44:00 <blockhead> still, asking significant other's permission to compile is funny
22:44:00 <j`ey> yes :3
23:04:00 <geist> fwiw i still cant compile newest gcc on M1 mac. there's some build system work that apparently needs to be done since the final link can't find this or that
23:04:00 <geist> but i think we're due for a gcc 12, maybe the fix is in the tree
23:08:00 <j`ey> https://gcc.gnu.org/pipermail/gcc/2021-September/237340.html
23:08:00 <bslsk05> gcc.gnu.org: Announcement : An AArch64 (Arm64) Darwin port is planned for GCC12
23:09:00 <j`ey> this is for targetting m1, im assuming youre targetting other stuff, but it still probably means some work has gone in to make sure it compiles!
23:29:00 <geist> no i mean compiling on mac arm
23:29:00 <geist> sorry, wasn't clear. there's some build system work that needs to be done to get it to link right on macos arm
23:29:00 <geist> also i finally pulled the trigger and just ordered myself a new m1 macbook pro. happy birthday me
23:30:00 <j`ey> nice!
23:30:00 <geist> that aside, you can build and run x86 mac compilers just fine on M1, and they're fast enough, so it's not a huge biggie