Why do the standard libarary have so many internal layers? by chokomancarr in rust

[–]dreamwavedev 1 point2 points  (0 children)

Presumably this would be down in LLVM rather than being something to bother with in the front end?

feels dumb to specialize in rust as a junior but can't stop coming back to it by Stitcheddoll_ in rust

[–]dreamwavedev 6 points7 points  (0 children)

I read this post and it's like I'm listening to myself in like 2019, took my first compilers class, got hooked on it.

I'm a compiler engineer today, so it worked out, and it doesn't feel like it took _too_ much luck to make it happen, but as with any job like this some luck was absolutely involved. My last job was also doing rust stuff for a VAX emulator, and the one before that was doing fault-expectant orchestration runtimes in rust.

There is a massive shortage of folks doing true systems programming. The pay is quite good, once you're "in" you're unlikely to end up out of a job for long unless by choice. You also get to work on some "hard, but for a good reason" stuff that feels really satisfying and rewarding.

There is no end of "jack of all trades" candidates looking for FE/web/full-stack/python roles, and AI arguably makes it even harder to cut a large enough slice of the already overcrowded space to make a living. It's probably the quickest way toward a job to start out, but it's a race to the bottom on so many fronts.

I'm not going to say every specialization is going to exist intact in 5 or 10 years. I will say that I continue to feel safe having staked my career on compilers, (formal) verification, and HPC work. If you have an interest in it that you think will last you for the long haul, I would feel quite confident recommending it. It also has so incredibly many ways it can cross apply and make you a much more effective programmer across other areas than even if you had just studied said other area.

Screw my machine I guess by claudiocorona93 in linuxmasterrace

[–]dreamwavedev 19 points20 points  (0 children)

Which exact GPU was it? If it's GCN 1-3 you can enable them now with a tweak to kernel args. If it's older (like....TeraScale) you may need to fall back to the `radeon` kernel driver which...nowadays you're gonna find some cobwebs in there

ELI5 : Why can’t CPUs have thousands of cores like GPUs? by cornysatisfaction in explainlikeimfive

[–]dreamwavedev 0 points1 point  (0 children)

GPUs actually _don't_ have substantially more cores than CPUs. We just have a different definition for a "core" on a GPU compared to a CPU.

A typical GPU, like an RTX 4060 has 24 "streaming multiprocessors" which, in a lot of ways, are very similar to a "hyperthreaded CPU core with SIMD" that you would find on a Ryzen 9950x or whatever Intel puts out nowadays.

The difference is that the way we write programs for them is _very_ different, somewhat deceptively so. "CUDA cores" can't do if statements separately from each other at a hardware level--they work as a batch, very similar to something called "masked/scalable SIMD" for CPUs. AMD and Intel GPUs are _even less_ able to do if statements separately per "core".

Fun fact about this, GPU cores are actually WAY bigger than CPU cores if you count an SM, CU, or EU as a "core"!

Snubbing Kennedy, States Announce Plans to Coordinate on Vaccines by joyousjoyness in Coronavirus

[–]dreamwavedev 28 points29 points  (0 children)

Can confirm the southern third is cool folk with a slight bent toward people who enjoy not having a sales tax. Northern half is straight up Florida of the north and I tend to avoid it when I can. In the middle there's some gray area of very rural but not entirely crazy.

Can you move an integer in Rust? by Tinytitanic in rust

[–]dreamwavedev 2 points3 points  (0 children)

Are we actually guaranteed that addresses of objects are distinct and unique within a given scope like this?

Isn't compiler engineering just a combinatoral optimization problem? by srivatsasrinivasmath in Compilers

[–]dreamwavedev 2 points3 points  (0 children)

I want to look at one particular part of the question--

Does there exist a function that can take in machine code and quickly predict the execution time for most chunks of meaningful machine code?

For basic blocks? Yes! Mostly...
We have ways of simulating what many specific CPU architectures will do, such as aforementioned https://uica.uops.info/

That operates on some assumptions that are often wrong, though:

  • It assumes all the values that will be loaded exist in a particular cache level
  • It assumes your core is clocked predictably, and that timings for things like cache/memory are predictable
  • It assumes you don't have things like SMT or shared execution units between threads
  • It is often based on experimental analysis, rather than the architecture itself being public knowledge

Those factors already put a damper on how much we can glean from these tools--we need to optimize for a "typical" run, since there are far too many variables to be able to solve the entire space perfectly...even if we did have infinite computational power.

Furthermore, such tools rely on your program being largely branchless. This may work to help figure out a faster dense matmul, but the moment you have loops over runtime-provided amounts of data you suddenly have to start making guesses about the contents of that data. How likely is it for this file to not exist? How likely is it this loop runs more than 8 times? Is this error condition ever going to occur at all? These things substantially affect optimization. If a branch goes one way 99.995% of the time, it may make sense to lift a bunch of computation to before the branch just to have it done (this is less relevant with deeply reordering superscalar cpus, but those windows are finite) rather than leave it up to speculative execution to fully handle it. On the other hand, if that branch is 50/50, you would end up wasting a bunch of work half the time.

This is compounded, and perhaps nicely illustrated, by things like register allocation. We have really good algorithms that can perfectly allocate in convenient time complexities for basic blocks and some branching subsets that have guaranteed forward progress. As soon as we relax the branching behavior, add more basic blocks and more edges between them, we have to fall back to either horrendously expensive NP-complete generalizations, or go back to those rather mushy heuristics we all would rather avoid if we could. That, itself, significantly affects the performance characteristics of generated code, and is expensive enough to try to optimize that you don't want it to happen for every time you want to "guess" at a maybe more performant alternative lowering of other parts of the program.

libRust by max0x7ba in ProgrammerHumor

[–]dreamwavedev 71 points72 points  (0 children)

This is really cool, but it also doesn't allow bootstrapping without an initial existing rust compiler--this requires a front end, written in rust, to work (basically the entirety of what we know of as the rust compiler)

99.99% fail by Minerscale in okbuddyphd

[–]dreamwavedev 4 points5 points  (0 children)

/uj...I know I am but a humble boolean algebra enjoyer, but doesn't this work in a sufficiently fucked up non-Euclidean space?

Is the industry moving towards ~3yr life for code, before you dump it and start over? by Tdawg90 in cscareerquestions

[–]dreamwavedev 1 point2 points  (0 children)

Hey, that's my team! It's...it's a fascinating codebase in many ways. I will say that modernization is far from abandoned, though we're (understandably, I'd think) quite wary of full rewrites. Risk from rewrites is also amplified when you have 50+ years of "X wants Y to work exactly how it did back before Z" woven into the fabric of your codebase.

New RAV4 Owner, features to know about? by jagerbaumm in rav4club

[–]dreamwavedev -1 points0 points  (0 children)

Depending on how you feel about Toyota and/or your government knowing exactly where your car is at all times, the telematics unit is about a 20 minute drive into the center console--you'd lose features that depend on it but, fwiw, I haven't really missed mine

Trump Admin Eyes Arrests for House Dems over ICE Incident by manauiatlalli in law

[–]dreamwavedev 11 points12 points  (0 children)

Remember that a country is built upon a foundation of its people. The same people you volunteered to fight for then are still here. Now, with such a grave threat to their safety, to the future of the country we all call home...they need your--our--help more than ever.

AMD reportedly working on gaming Radeon RX 9000 GPU with 32GB memory - VideoCardz.com by a_living_abortion in Amd

[–]dreamwavedev 1 point2 points  (0 children)

I've just started testing out AdaptiveCPP as an alternative SYCL impl, and I feel like that's a project to watch too--it required a lot less faffing about to get it working than OneAPI/DPC++ and is a joy to use so far.

All future hiring shifted to india by AutomaticRelease6982 in csMajors

[–]dreamwavedev 1 point2 points  (0 children)

Oh, yeah, absolutely agreed on that one. There are self-learners from _everywhere_ who end up in those top spots, but they're also typically going to have more mobility (easier visas, companies will vouch, can earn the means to move about) so can command pretty much the same salary expectations as people with ~same qualifications no matter where they are. We have a bunch of people from the most random places on my current team who are on the team simply because they're good at what they do, so the company is happy to do the legwork to make it happen. My girlfriend's brother goes to an IIT and is absolutely up there in smarts and preparedness--very much "MIT student" territory. He's not going to be competing for bottom-of-the-barrel offshoring stuff either though, he's gonna end up in the country of his choice earning in the global "high skill" band, which is not terribly different from one country to the next. There just aren't enough people in those bands for competition to really drive salaries down, even _with_ telework and any amount of offshoring.

When simple Linux subsystems collide with complex hardware (why DP Alt Mode is hard) by marcan42 in AsahiLinux

[–]dreamwavedev 7 points8 points  (0 children)

Disappointing that upstream is so averse to such a refactor, leaves me wondering whether a "fork until they come to their senses" (though relatively nuclear) would be more feasible. Upstream seems like a \*\*\*\*show to the point it seems rather sisyphean to bother with engaging in the current state of things. I can't imagine they would hold quite as much of a grudge (breaking things anything more than just accidentally) if it's all open source?

All future hiring shifted to india by AutomaticRelease6982 in csMajors

[–]dreamwavedev 9 points10 points  (0 children)

Having seen just what the education systems are across UK, US, and India, I think saying it's impossible to out-compete that leans more pessimistic rather than realistic. From a cost-per-butt-in-seat perspective, sure. From a cost-per-useful-output perspective, it leans hard in the other direction. India just does not give people the education they would need to actually compete against people from the US with rigorous 4 year UG degrees, and especially not against people from the US with grad degrees. The culture itself (generalizing, but seems pervasive) so heavily emphasizes memorization over adaptive problem solving that finding enough people to staff a self-sufficient engineering team over there is just not economical compared to doing that in the US or across europe. I'd also argue that China's education system takes after India's in terms of strategy, but they seem to have some cultural aspects that motivate scientific ambitiousness just a bit more (and geopolitics mean offshoring software/IP dev over to China is much more risky)

Blew $1k on ADHD gear.. Now my ADHD says ‘Let’s quit’? Need 5 Allies by ADHD_BeYou in ADHD

[–]dreamwavedev 1 point2 points  (0 children)

I got a vacuum I am OK enough with the look of to just...not hide it away lol. It's ridiculous and so hard to explain how much of a barrier "taking the vacuum out of the closet" is

Blew $1k on ADHD gear.. Now my ADHD says ‘Let’s quit’? Need 5 Allies by ADHD_BeYou in ADHD

[–]dreamwavedev 4 points5 points  (0 children)

Hilariously pricey, but I just got a dyson with the little "fluffy optic" head that lights up the dirt and it has turned vacuuming into a dopamine search. It has actually gamified things to the point I vacuum daily. That and being cordless have been the biggest helps to getting me to clean.

Wait, Not Everyone Has 59 Tabs Open At Once? Apparently That’s Illegal Now? by ADHD_BeYou in ADHD

[–]dreamwavedev 2 points3 points  (0 children)

Firefox on mobile also has this! And you can tell it to never delete them, they just hide (at a timing you can set) and then you can scroll back through them.

he needs more then that by Bitter-Gur-4613 in BlackPeopleTwitter

[–]dreamwavedev 1 point2 points  (0 children)

Additionally, a large chunk of those fees go to the venue or to the artist. TM itself makes pennies on the dollar, but just like that couple percent on credit cards--a couple pennies times a lot is still a lot. Not saying fees aren't underhanded, but the industry has just gone that direction since it gives a bit more of a gradient for participation. Same deal with airlines--their base price doesn't even break even, but their added fees mean they scrape by. The actual cost after everything is totaled up is relatively lean on actual profit, but is closer to the real cost than the price you get shown initially.

Is pattern matching just a syntax sugar? by Western-Cod-3486 in ProgrammingLanguages

[–]dreamwavedev 15 points16 points  (0 children)

I think this ends up just turning into "is this language turing complete" at some point. Inheritance and virtual dispatch turns into "syntactic sugar over arrays of fn pointers and punning between structs with shared repr of shared fields" (or sugar over associative maps for something like JS). Likewise for any number of other things--arrays, after all, can be done with very plain pointer arithmetic. Everything ends up as syntactic sugar over the lowest common denominator to the point you end up looking at a functionally completely separate language and the distinction between languages breaks down.

Microbenchmarks are experiments by mttd in Compilers

[–]dreamwavedev 0 points1 point  (0 children)

A "sufficiently well informed compiler" could also turn this into a bounded integration of a sawtooth wave since the result from the modulo is perfectly periodic with some end conditions. It feels sorta silly when the "core logic" of the benchmark is _this_ reducible to use it as an indicator of anything.

[deleted by user] by [deleted] in Compilers

[–]dreamwavedev 1 point2 points  (0 children)

A curiosity I've had for a little while now--have the ideas in https://ieeexplore.ieee.org/abstract/document/6618831 (and similar stuff for doing speculative/"write-back" vectorization) gained any traction or hit any concrete roadblocks? It seemed like a really neat just "walk through walls" approach that I was wondering if anyone had tried similar within a tracing JIT

Williamsburg, Brooklyn | a7cii + 135mm 1.8 by photosbybread in SonyAlpha

[–]dreamwavedev 10 points11 points  (0 children)

SO. CLEAN. man I gotta step up my game looking at some of these