|
Nomnom Cookie posted:loop{} with a FIXME to think about doing something sane a new universally applicable design pattern has been added to my toolkit
|
# ? Feb 14, 2024 10:07 |
|
|
# ? May 24, 2024 21:11 |
|
Nomnom Cookie posted:they made a github repo and it does not solve this at all. the panic handler you get from them is loop{} with a FIXME to think about doing something sane. it also only lets you target the most recent KMDF version and makes heavy use of bindgen inside build.rs. im not holding my breath waiting for a solution from MS on this or it being a solution i'd be willing to adopt is this about how Linux does it too? Kernel halting because of a naughty driver seems like several backward steps
|
# ? Feb 14, 2024 15:24 |
|
Visions of Valerie posted:is this about how Linux does it too? Kernel halting because of a naughty driver seems like several backward steps linux doesnt try to unwind kernel stacks for one thing lmao. the linux kernel version of you did a fucky wucky with a pointer is an oops and actually it might do stack unwinding? i'm not sure? but you definitely don't get catch blocks. or ofc linux can panic there are good arguments in favor of exceptions here, like an invalid userspace access is a condition you abolutely must handle and if you don't there is no reasonable way for the system to recover. politely returning an error code from whatever API maps the userspace buffer is just begging for a dipshit to hold things wrong and make a giant hole for attackers to drive kernel code execution through. linux or windows, kernel space is a lets call it a high trust environment. if you are running code in ring 0 there is nothing stopping you from panicking the system whenever you feel like it, opening a socket to china and piping shellcode into ram, creating a whole rear end transaction manager (learning about windows CLFS caused my mind to deadlock for like 15 minutes straight). however you are not the first person to note that often driver developers are dipshits who don't deserve this level of trust therefore FUSE, UMDF, that thing vista did to stop the nvidia driver from constantly blue screening everyone, and so on one variation of this take is we must never care if something crashes and then you have a microkernel. which sounds neat and all but in practice idk how useful it is to have a system that's technically still running but the root filesystem is in CrashLoopBackOff
|
# ? Feb 14, 2024 18:03 |
|
i guess if youre an airplane it might be nice. this is why they put kubernetes in the f-16
|
# ? Feb 14, 2024 18:03 |
|
uptime guarantee technically maintained
|
# ? Feb 14, 2024 18:04 |
|
BobHoward posted:don't do verilog it’s SystemVerilog all day every day for me. and a little python scripting.
|
# ? Feb 14, 2024 18:10 |
|
anyway kernel programming is really cool and fun. you get to be in an environment where crashing the entire system isn't the worst thing that can happen. in userspace implementing panic by just looping forever is dumb and stupid and lovely but worst case you kill -9 the process and move on. in kernel space doing that bullshit at the wrong time means like...for example now one of the cores is just dead. you put it in an infinite loop while servicing an interrupt and now that core just doesn't do anything anymore. and the rest of the kernel will interact with your code in good faith and keep sending you interrupts to service meaning more opportunities for you to headshot cores. i didn't rant about it earlier because it wasn't the point but that bullshit is what you see in literally baby's first embedded rust blog posts about how to do things completely wrong but you don't care because your deployment target is an arduino. if my boss forced me to write code that bad and then open source it i would be so embarrassed i would seriously consider changing jobs. absolutely awful anyway isnt it neat how the platform is designed assuming certain semantics from the languages running on it and rust is almost kinda compatible with those assumptions. that's the kind of mismatch where you get to do fun and perverted things and possibly convince people it was a good idea
|
# ? Feb 14, 2024 18:11 |
|
Nomnom Cookie posted:linux doesnt try to unwind kernel stacks for one thing lmao. the linux kernel version of you did a fucky wucky with a pointer is an oops and actually it might do stack unwinding? i'm not sure? but you definitely don't get catch blocks. or ofc linux can panic Yeah I could have phrased my question better. I was curious how the new Rust in Linux stuff handles panic()ing - like, whether it ties it into the unwinder somehow
|
# ? Feb 14, 2024 18:12 |
|
DELETE CASCADE posted:uptime guarantee technically maintained not that i've ever worked in aerospace but to my knowledge the sane people don't touch microkernels at all for airplanes, they instead think very hard about failure modes and put a lot of effort into ensuring they don't hit them while also minimizing blast radius. somehow turning the airplane computer into a complex system with dozens of concurrent processes interacting in unpredictable ways is not considered "good"? despite microkernels claiming to improve reliability? it feels like maybe dipshit computer people who get hard anytime they hear the prefix micro- are not qualified to talk about systems engineering things
|
# ? Feb 14, 2024 18:16 |
|
Visions of Valerie posted:Yeah I could have phrased my question better. I was curious how the new Rust in Linux stuff handles panic()ing - like, whether it ties it into the unwinder somehow drat now im curious too. does linux even unwind on panic? i thought it dumped the call stack and dug itself a shallow grave. you're not supposed to come back from a panic
|
# ? Feb 14, 2024 18:17 |
|
"torvalds was right tanenbaum was wrong" got in the textbooks 20 years ago. altho not in tanenbaum's textbook, lol
|
# ? Feb 14, 2024 18:18 |
|
Nomnom Cookie posted:linux doesnt try to unwind kernel stacks for one thing lmao. the linux kernel version of you did a fucky wucky with a pointer is an oops and actually it might do stack unwinding? i'm not sure? linux oops is basically the same as killing the current "process", even if that process is a kernel task. dying in the kernel code, though, means that poo poo can get corrupted (unlike killing a userspace task) because the kernel might still be holding locks, in the middle of mutating state, etc in general the way linux is suppose to handle errors is by properly checking for everything and returning error codes so the panics/oops never happen at all ever. as you can imagine for C code, this is a poo poo show generally Visions of Valerie posted:Yeah I could have phrased my question better. I was curious how the new Rust in Linux stuff handles panic()ing - like, whether it ties it into the unwinder somehow iirc it's a kernel panic. i do not know the status of trying to change it at all. most of the Rust for Linux concern with panics is over Rust API designs that allow for panics too easily, not what happens if a panic actually happens. I think they're shooting for the same C-like "panics should never happen actually" and working on more APIs that return results and whatnot (e.g. to handle allocation failure)
|
# ? Feb 14, 2024 18:25 |
|
crazypenguin posted:iirc it's a kernel panic. i do not know the status of trying to change it at all. makes sense, thanks
|
# ? Feb 14, 2024 18:27 |
|
what im shooting for in windows land is making rust-originated panics into bugchecks and supporting unwinding from kernel APIs into rust stacks plus "somehow" halting unwinding in a reasonable way that allows for recovering the current control flow. in other words visual R# now with catch blocks, but not real catch blocks because that would be so much work
|
# ? Feb 14, 2024 18:43 |
|
but why
|
# ? Feb 14, 2024 18:45 |
|
handling errors is sometimes good. and indeed the kernel is one of those places where letting things just crash is not a good plan (unless we cycle back to tanenbaum being more correct)
|
# ? Feb 14, 2024 19:12 |
|
supporting seh requires a lot of compiler work, since it makes a lot of things well-defined that you normally just kindof assume don’t happen. you’re probably going to spend a lot of time dealing with stuff in the rust frontend, and it’s probably going to perform like poo poo because rust really wants llvm to be aggressive and seh basically disables the optimizer
|
# ? Feb 14, 2024 19:24 |
|
clang and llvm added support for seh a few years ago, but it is not engineered to try to be even halfway intelligent; it is just enough to make specific code patterns work goddamnit
|
# ? Feb 14, 2024 19:27 |
|
bob dobbs is dead posted:"torvalds was right tanenbaum was wrong" got in the textbooks 20 years ago. altho not in tanenbaum's textbook, lol well yeah, because tanenbaum was right, why would he put something wrong in his book just because it was popular?
|
# ? Feb 14, 2024 19:29 |
|
port seL4 to rust
|
# ? Feb 14, 2024 19:31 |
|
EIDE Van Hagar posted:it’s SystemVerilog all day every day for me. and a little python scripting. yeah same actually. SV's a huge improvement over verilog 95, but i'd love for the industry to be built around a better language foundation than either vhdl or verilog
|
# ? Feb 15, 2024 02:31 |
|
rewrite your CPU in Rust
|
# ? Feb 15, 2024 02:45 |
|
Nomnom Cookie posted:CrashLoopBackOff im begging infra people: please stop thinking about everything in terms of kubernetes
|
# ? Feb 15, 2024 03:02 |
|
redleader posted:im begging infra people: please stop thinking about everything in terms of kubernetes code:
|
# ? Feb 15, 2024 04:44 |
|
rjmccall posted:supporting seh requires a lot of compiler work, since it makes a lot of things well-defined that you normally just kindof assume don’t happen. you’re probably going to spend a lot of time dealing with stuff in the rust frontend, and it’s probably going to perform like poo poo because rust really wants llvm to be aggressive and seh basically disables the optimizer does it help that i dont care about supporting seh well and just want to make a spot on the call stack that will turn unwinding into a Result. im not above writing a little guy in c to hold the seh gubbins or something similar
|
# ? Feb 15, 2024 05:08 |
|
Radia posted:but why because i enjoy making things exist which should not
|
# ? Feb 15, 2024 05:09 |
|
Nomnom Cookie posted:because i enjoy making things that exist which should not then just accept that your hubris has doomed you, also straightforward
|
# ? Feb 15, 2024 05:09 |
|
bob dobbs is dead posted:then just accept that your hubris has doomed you, also straightforward if my life doesn't end with a soliloquy and several skulls i will be very disappointed
|
# ? Feb 15, 2024 05:10 |
|
here lies nomnom, whose cookies were never fully baked
|
# ? Feb 15, 2024 07:34 |
|
Nomnom Cookie posted:does it help that i dont care about supporting seh well and just want to make a spot on the call stack that will turn unwinding into a Result. im not above writing a little guy in c to hold the seh gubbins or something similar the basic problem you’re going to face is the question of what the hell state all the rust functions are in if they throw because of some random memory access that rustc doesn’t recognize as a potential source of a panic if you don’t need to handle exceptions originating within rust functions then it’s a whole lot easier because then rust sees it as originating from a call like any other panic. i don’t know if rust knows that c functions can panic but it can’t be that hard to teach it
|
# ? Feb 15, 2024 22:03 |
|
rust is still a baby dude at work is learning himself some python and he asked me my opinion on what he should learn next. idk why me? spose coz I sometimes talk about coding stuff with him and I have a few more clues but ya know i’m still a loving casual. anyway I told him
|
# ? Feb 16, 2024 03:45 |
|
js is definitely a handy language to know from a "getting stuff done" perspective, and it can be used in conjunction with server-side python to make webapps likewise c is a handy language to know (at least the rudiments), and again it can easily go hand-in-hand with python if he doesn't already know some flavor of sql, learning with posgres or sqlite makes sense if he's interested in game modding, lua is a neat little lang if he wants to learn a language that'll stretch his general understanding of programming, rather than be directly useful, any of scheme, ocaml, forth, prolog, erlang, rebol, or apl/j/k would surely expose him to new ideas
|
# ? Feb 16, 2024 04:06 |
|
yeah, a good question to ask him (and then the thread) is "what do you want to do with that knowledge?"
|
# ? Feb 16, 2024 04:09 |
|
redleader posted:yeah, a good question to ask him (and then the thread) is "what do you want to do with that knowledge?" the answer would be “get out of pharmacy where I have to deal with humans” Internet Janitor posted:js is definitely a handy language to know from a "getting stuff done" perspective, and it can be used in conjunction with server-side python to make webapps this is interesting to me at the very least. I am on an amateur level familiar with python, c, js.. but never even looked at those other ones. I find coding interesting from a pure interest level, not just “get poo poo done” level, so that’s a good start I’ve been suggested to learn react which I know is ultimately js/html but it’s to get some poo poo done. i’ll get my head round it. a concept with me making crimecommitter was pure js but when i’ve been reading about react seems like I can focus a bit more on the mechanics and less on it fundamentally displaying anything. but i’m just rambling now
|
# ? Feb 16, 2024 05:11 |
|
a not-totally-crap estimate says that there's 15 million peeps who program js in the world, prolly something like 3-5 million frontend devs of whatever description i would be surprised if all of the obscure langs ij mentions combined have 250k devs total (forth et al), doublecounting peeps who know more than one, and 50k paid devs. there's something like 5000 paid clojure devs in the entire world, which i mention cuz i used to be one of them bob dobbs is dead fucked around with this message at 05:24 on Feb 16, 2024 |
# ? Feb 16, 2024 05:19 |
|
if you want the intersection of "comes at programming from an unquestionably different point of view than normal peep langs" and "will unquestionably be useful for making money with if you make money with computer in any way", sql is your choice (but you would have to find a resource that's very serious about the first point, if you want to explore the first point - very few sql resources make the lang rise up and dance). prolog can be colorably presented to the uninitiated as "sql on fuckin steroids", too
bob dobbs is dead fucked around with this message at 05:23 on Feb 16, 2024 |
# ? Feb 16, 2024 05:21 |
|
i'm shocked to hear there are only a couple thousand clojure jobs in the world; there's at least a similar order of magnitude of actively employed Q programmers, and clojure is a much more widely-known language. probably only a couple hundred K programming jobs, though, and i know people who work at (or have personally worked at) most of the companies that use it a basic understanding of sql/relational algebra really is a fundamental skill for any programmer; applicable in a remarkable range of places. not unlike fluency with excel features like vlookups and pivot tables, sometimes just having a grasp of the fundamentals of sql can make you seem like a wizard to coworkers i think playing with any apl-ish language is really helpful for the way it encourages thinking about manipulating data structures all at once, and building programs directly out of language primitives instead of building up abstractions. my current main project, lil, is an attempt at exploring a synthesis between apl-ish ideas and sql-ish ideas
|
# ? Feb 16, 2024 06:56 |
|
i guess it's prolly an undercount if you include freelance choose-your-own-language dealios, but 1000 js devs to 1 clj dev sounds about right to me
|
# ? Feb 16, 2024 07:04 |
|
keep going keep going I am almost there
|
# ? Feb 16, 2024 07:47 |
|
|
# ? May 24, 2024 21:11 |
|
echinopsis posted:keep going keep going I am almost there you waiting for the jvm to start up echi?
|
# ? Feb 16, 2024 07:52 |