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
<mrvn> There is a compiler for it but I want one that outputs music scores for the source.
<klange> https://kuroko-lang.github.io/ been working on a lot of little things
<bslsk05> ​kuroko-lang.github.io: Kuroko
gildasio has joined #osdev
<mrvn> duck typing? fully modifiable classes? decorators?
<klange> I've started to think 'duck typing' is a terrible description of how things work in languages like Python.
<klange> The common description of "duck typing" actually describes structural typing, which is a very different thing.
<zid> I thought it described typing with your peak
<zid> beak
heat has quit [Remote host closed the connection]
Oshawott has joined #osdev
<klange> "Duck typing", as you may know, is "if it looks like a duck, walks like a duck, and talks like a duck, it's a duck" (or more compactly, "if it quacks like a duck...")
<klange> But languages like Python (and Kuroko) are very strictly typed internally. Attributes do not determine type, and an object can implement all the same methods exactly the same way and still not be that type.
<klange> What the attribute/method lookup in Python, et al does is "I don't care if you're a duck, if you can quack and I ask you to quack, you quack."
arch has quit [Ping timeout: 244 seconds]
<mrvn> Yeah, there is no "it's a duck" in python.
<mrvn> isinstance(quacking_thing, duck) doesn't return true
joe9 has quit [Read error: Connection reset by peer]
<mrvn> ocaml I think actually has duck typing. And it's a strickly compile time typed language.
joe9 has joined #osdev
<mrvn> If something wants a duck then anything that has the interface of a duck will do
<klange> ocaml is the lead example of a structurally typed language on Wikipedia
<mrvn> which makes it really funny to have duck typing
<klange> Camel-typed languages.
<psykose> is there a language that makes duck quack outside your window?
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
<mrvn> struct A { A(std::string); } struct B : A { }; Why does A a("foo"); B b("foo"s); B c(A("foo")); work but not B b("foo");?
<klange> Because C++ hates you and wants you to be miserable.
<klange> (Most other languages are ambivalent and you being miserable is just a natural response to programming.)
<mrvn> What constructor does B get? B(std::string s) : A(s) { } doesn't seem to be it.
<mrvn> Does it have aggregate initialization?
<mrvn> C++ has just too many implicit and generated and conditional and maybe on a full moon rules.
<geist> it has aggravated initialization
ccx has quit [Ping timeout: 248 seconds]
<geist> oh speaking of esolangs: https://store.steampowered.com/app/1720850/AB/
<bslsk05> ​store.steampowered.com: A=B on Steam
<geist> i generally stay away from that since i only have a finite number of hack units per day i like to keep to myself
joe9 has quit [Quit: leaving]
<geist> tis-100 i think is the last hackery game i spent too much time with, and it was quite good
nj0rd has quit [Ping timeout: 246 seconds]
nj0rd has joined #osdev
gorgonical has joined #osdev
<psykose> this almost looks like a shitpost
<gorgonical> geist I saw a hackernews post about a linux hacker's take on zircon and he pointed out a bug that made it possible to use debug logs to leak kernel info. In the blogpost he made it seem like it should be obvious but I didn't quite get it
<geist> yeah it wasn't so clear cut
<geist> he had to actually add a bug to exploit it, so it wasn't exactly like he found some huge hole
<gorgonical> So you know what I mean. The way I saw it was the kernel code was indeed checking if the handle was invalid, but then the fix only seems to check options at that same code snippet
<geist> it was 'assume there's a buffer overrun somewhere' then exploit it
<geist> i didn't read it too closely. i'm happy he was interested and it wans't a bad blog per se. of course hackernews mostly just acted like the cesspool it is, so i kinda stopped reading it at that point
<gorgonical> Oh yeah I didn't read the comments at all. It's stuck with me because I feel like I should be able to understand why he thought it was such an egregious bug
<geist> like i said i'm not dismissing the blog, but it wasn't really that much of an issue, though i think there was at least an actionable item on it
<geist> yeah i dont think it was
<graphitemaster> I read that article too and I must say I found the way you're meant to write programs for fuchsia so ... horrible, lol, like the concept of a component and all that custom fx commands to start projects and what not - I don't like that centralization of everything related to software as part of an OS design, made me really unhappy.
<geist> graphitemaster: /me nods
<geist> note that none of that is implied by the kernel or the low level design of zircon. its simply the state of the art of the way the current user space has evolved
<bslsk05> ​fuchsia.googlesource.com: Diff - 5be4ba6410494c4c046502df70cf06474d6cfaba^! - fuchsia - Git at Google
<gorgonical> Specifically this diff blob is confusing
<graphitemaster> geist, It's the same mentality that makes developing apps on Android and iOS absolutely horrific.
<graphitemaster> If I can compile an executable somehow I just want the OS to fuckin' run it.
<geist> gorgonical: /me nods
<geist> graphitemaster: i encourage you to discuss it on the fuchsia discord
<geist> i mean, yes and i dont disagree with you
<gorgonical> I was hoping you'd be able to explain exactly how that fixes the bug. But if you don't understand it either
<geist> gorgonical: ah i can take a look at it later i'm just not really in the mood right now?
<geist> ie, just stopped working for the day so i'd kina rather not dig right back into work right now
<gorgonical> Oh no not a problem. I just thought you might know off the top of your head
<geist> no i dont
<gorgonical> Then it's not worth the trouble really
<geist> i mean it is interesting, i just dont have the source here becaus ei'm on my personal machine in a coffee shop
<geist> and i dont know that CL, but it indeed looks like a less than fantastic design
<geist> OTOH there are a few of older things like that that we've been slowly replacing, especially in the area of bootstrapping and debugging, so it's entirley likely that's just a hole that needs to be patched, and so good for him
<graphitemaster> geist, eh, fuchsia isn't exactly something I use yet so these are superficial complaints, if I was using this OS and having to deal with constant friction from these design choices I'd be in the Discord complaining :P
<geist> OTOH it just gets you the kernel log, so its basically the equivalent of dmesg
<gorgonical> Yeah that's what the fuchsia devs said: getting this exploit to work sort of gets you little because of what you need to run it anyway
<gorgonical> Something along those lines
<gorgonical> The moral of the blog: state things confidently and hope it convinces enough people you found a meaningful exploit
<geist> and actually we are totally happy that folks find these things. i really am trying not to sound defensive about it
<geist> but you know how any thing like this turns into some gigantic thing as is always
<graphitemaster> I too found an exploit, if you have access to the source code and recompile the kernel you can do a lot of damage
<gorgonical> Of course
<gorgonical> graphitemaster: lol
<geist> yah i still dont completely understand what the issue is with that CL but i should just re-read the article when i get a chance
<geist> i just skimmed through it before
<geist> but i think a CVE came out of it, so good for him. probably goes on his resume
<raggi> There's a pretty big trade-off in the "let me run code I just built without any constraints" thing, it's definitely an important feature in a development environment
<gorgonical> geist: My working hypothesis is that because the check only requires that the handle be non-invalid, maybe you can just pass an invalid handle to it? That would explain why you can still have an invalid handle as long as its write-only (per the new comments)
<geist> sure, but then that's the point (though i didn't know of this particular edge case)
<geist> also the debuglog is kinda a big ehh. we haven't relaly found a good replacement for it except it should probably primarily not be a kernel feature
<gorgonical> raggi: I can't speak for him, but I know the thing that irritated me about android dev was that compile-time restraints << run-time constraints and that's frustrating
<geist> but it's still there. there's a funnel to shove line oriented data through the kernel that it serializes and buffers and sends out
<geist> but really that should be replaced largely with a user space construction
<gorgonical> Manifests, permissions, this that and the other that will allow you to build, but running blows up with somewhat vague error messages
<raggi> Yeah, components end up with a similar manifest configuration problem, and will need ongoing user experience work to improve
<raggi> That's going to be generally common to any system that doesn't provide arbitrary ambient authority, it's the same with snap and flatpak, etc
* geist imagines a punk band fronted by Henry Rollins called Ambient Authority
* raggi imagines them playing the openbsd release track
<mrvn> https://godbolt.org/z/h6h1fhTh1 3 cases of gcc and clang disagreeing. wow.
<bslsk05> ​godbolt.org: Compiler Explorer
<raggi> Same spec versions?
<geist> looks like they're both jammed to c++20
<raggi> I couldn't see easily on a phone :-)
<geist> ah yeah
<mrvn> gcc -std=c++20 -ansi fails too. Is it some gcc extension?
gorgonical has quit [Ping timeout: 240 seconds]
ccx has joined #osdev
robert_ has joined #osdev
smeso has quit [Quit: smeso]
Vercas has quit [Ping timeout: 240 seconds]
dude12312414 has joined #osdev
smeso has joined #osdev
Vercas has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
gorgonical has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
elastic_dog has quit [Ping timeout: 260 seconds]
elastic_dog has joined #osdev
<mrvn> clang doesn't do aggregate initialization with () and B is an aggregate type, which is why it works for gcc
ketan has joined #osdev
mahmutov has joined #osdev
Vercas4 has joined #osdev
Vercas has quit [Quit: Ping timeout (120 seconds)]
Vercas4 is now known as Vercas
mahmutov has quit [Ping timeout: 260 seconds]
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
scoobydoob has joined #osdev
scoobydoo has quit [Ping timeout: 246 seconds]
scoobydoob is now known as scoobydoo