511 karma · joined May 10, 2013
That said, whether it is hotter or cooler doesn't make much of a difference in terms of how you go about your day - you pretty much have to assume you can encounter them regardless.
Using unsigned integers is only a better choice if your VM doesn't need efficient floating-point operations.
Some of that information you might be totally fine with anyone knowing, such as your political leanings or religious beliefs. Others might be deeply uncomfortable with that being shared with just anyone. I assume you'd agree with me that at least some of the information I listed above is unambiguously of the variety that deserves privacy, i.e. you control who has access to it, and when.
Some things that should be generally private (e.g. financial activity), might need to be conditionally shared with certain parties (e.g. the government) - you might be fine with the IRS knowing details about your financial activity for purposes of taxation, but be understandably pissed if you found out that they were then making that information freely available to anyone that asked - because they have taken away your control over that information. I'm not saying that is actually the case, it is just an example.
Lastly, the more information about yourself that is effectively public information (either because you don't keep it private, or someone else has made it public without your consent), the easier it is to uncover other things that you do consider private. If someone can monitor everywhere you go, they can build a picture of you as an individual. Maybe you don't share your religious beliefs with others unless asked, but if someone knows that, e.g., you go to a specific church every Wednesday and Sunday, they now know your specific denomination and that you are more involved than the sort of person that only shows up on Sunday mornings, or only once a month, or only on holidays, etc. That information can be used to target you, either for innocuous purposes like advertising products to you that sell predominantly to that demographic - or for more malicious purposes, like running a scam against you that appeals to your specific beliefs, or in some cases, violence. That may seem unlikely to you, but you may also benefit from not being a minority that is prone to being targeted in such a way - the right to privacy ensures that we retain control over the information that can be used to target or hurt us according to our own risk tolerance.
The concept of a denied environment is pretty clear to me when it comes to physical space, or radio communications - but could you clarify what you mean by a "denied data environment"? I have some notion of what you _might_ mean, but I can't find a clear definition of the idea anywhere.
Anyway, for me at least, the benefit of the built-in nav is not about routing, which is basically always worse than Google/Apple at this point, but about having detailed, offline maps. In my experience, offline Google/Apple maps are less detailed, and you have to download them in advance.
I use all three, depending on my needs at the time - each of them have their strengths. I prefer Google/Apple maps for day to day routing and things like that, but if I'm somewhere with poor signal, I use the native maps to navigate, because they are just more reliable.
It's all subjective though, and probably highly specific to location.
One of the problems with halon, and the write-up mentions this, is that it is super effective at starving the fire of oxygen, but has zero effect on the heat of the fuel that was burning. So the fire goes out, but if oxygen is reintroduced before the fuel has a chance to cool sufficiently, it reignites - and now not only are you back where you started, but you have all the toxic byproducts that burning halon produces, which will kill you in a hurry if you breathe them in.
That is, frankly, bullshit. Societies, by definition, only exist when their members act, in aggregate, for the good of the community. A society cannot exist where everyone only acts in self-interest at the expense of everyone else. If you make self-interested choices for no other reason than "I did it because I could", that's just pure selfishness.
Society is forced to tolerate some degree of self-interest, but it isn't an optimization problem, because nobody is tweaking the parameters - things work until they don't anymore. That's why every society that has collapsed, did so either due to war, due to greed and self-interest causing it to turn on itself, or some combination of the two.
It isn't important that you make choices that benefit others, but rather that you at least care about how your choices affect others, and attempt to reduce the harm of your own self-interest. If you don't even bother to do that, then you don't deserve to be part of our society, or any other, IMO.
If only people that believed they stand alone, that everyone should fend for themselves, actually had to do so, maybe the world would be a better place.
In any case, I 100% agree that this is obviously a compiler. The fact that the compiler emits WASM as text, i.e. WAT, doesn't mean it is source-to-source translation - the output is still assembly code for the target machine.
And as an aside, does it really emit WAT? or is that just a debugging view of its output? If you can emit WAT, there is zero reason you can't emit WASM too.
Did you deliberately pick the time where the cost of gas skyrocketed before eventually coming back down to more normal levels? Gas where I lived at the time went from like $2/gal to $4/gal for months, then came back down to ~$2.75 but never fully returned to where it was. You're cherry picking your facts.
> your entire post is an example of the dramatic doomerism waxing on the anxieties of normal life. Complaining about anxiety is one of the hallmarks of a millennial.
Where was I complaining about anxiety? I do think many people are anxious, and have reason to be - but if I'm complaining about anything, it's greed. Dismissing the extensive evidence of its pervasiveness in our society today, and the negative outcomes it is producing, is the mindset of someone that doesn't care about anyone or anything that doesn't affect them personally.
A fast food job might be $17/hr, but the cost of gas is >2x what it was when that same job paid $8/hr, not to mention other basic costs like groceries, rent, and buckle up if you have to go to the doctor. Pay has simply not kept up with the cost of living for most Americans.
Why would anyone be happy that everything is ephemeral? That implies a lack of stability, more anxiety about the future, less confidence that you can weather bad times.
Humans are tactile creatures, everything being digital leads to a counter-intuitive sense of isolation - more connected, but less personal. There are positives too, but as an older Millennial, it has been interesting to be along for the ride as the potential of the internet and social media went from a superpower, to kryptonite. Who knows where things will be in 5-10 years, but it's hard not to see how some of our greatest tools are being turned against us in the search for more profit.
Millennials are, if anything, brutally realistic - a trait required to navigate the last 16 years. We were forced to watch as the last bit of life in the idea of a strong middle class was snuffed out, and had to enter the workforce right as the GFC hit. Our parents were the last generation where one could reasonably expect to live a life that truly lived up to the ideal of the American Dream - that one could get educated, get a job, buy a decent house and raise a family, without it being especially noteworthy to do so. For many Millennials, if not every generation following, it is essentially nothing more than a dream at this point. Corporate greed, and a government fully captured by it, has all but killed the middle class, and I fully expect that the advent of AI - rather than being a boon for the middle class - will drive a nail in its coffin. Those with the most to gain are already on top, and I've already heard way more people here talk about what they'll be able to do without needing to hire anyone, than I have about how the people left jobless will benefit. It is readily apparent that nobody with any power is going to do anything about it before a significant amount of suffering is felt - maybe not even then. All you have to do is listen to how people talk about it, as if everyone will magically figure out something else to do when every sector starts losing jobs simultaneously. Our society has a greater chance of eating itself alive first.
I consider myself lucky amongst most Millennials - I entered the workforce before the GFC, then joined the military shortly after it (not due to the GFC, but the timing worked out). I was able to get far enough along in my career in those first years though that I never had to struggle with finding a job like many did. I was able to get a house in my 30s thanks to the GI bill. Very few of those I grew up with are in the same boat, many are living much the same as they were 15 years ago - unable to save enough to buy a house, facing reduced job prospects in the future. What reason do they have to be anything _but_ pessimistic?
For me personally, I think we've simply lost the battle against greed, and there is a tipping point after which reigning it back in is impossible without burning it all down. That's something nobody should want, least of all the rich, but it's played out many times in history, and we keep falling into the same trap, just different ways. I think this time it probably was Citizens United where we lost our grip, that decision made it inevitable that corporate interests would be the driving force of government, not the needs of its people. Who can say for sure what will happen, but we're all along for the ride regardless.
The code I linked literally shows that the closed-over terms are written into the closure environment when the fun is created, and if any term is a heap allocated object, it isn't copied into the closure, only the pointer is written into the env. The only reason you can't observe the effects of mutability here is because, unlike Python, there is no way to mutate bindings in Erlang.
Again, this isn't partial application - not in implementation nor in semantics.
I would also note that, for the example you've given, the compiler _could_ constant-fold the whole thing away, but for the sake of argument, let's assume that `Val` is an argument to the current function in which `SumFun` is defined, and so the compiler cannot reason about the actual value that was bound.
The closure will be constructed at the point it is captured, using the `make_fun` BIF, with a given number of free var slots (in this case, 1 for the capture of `Val`). `Val` is written to the slot in the closure environment at this time as well. See the implementation of the BIF [here](https://github.com/erlang/otp/blob/6cefa05a2a977864150908feb...) if you are curious.
At runtime, when the closure is executed, the underlying function receives the closure environment, from which it loads any free vars. In my own Erlang compiler, the closure environment was given via pointer, as the first argument to the function, and then instructions were emitted to load free variables relative to that pointer. I believe BEAM does the same thing, but it may differ in the specific details, but conceptually that is how it works.
The compiler obviously must generate a new free function definition for closures with free variables (hence the name of the function you see in the interactive shell, or in debug output). The captured MFA of the closure is this generated function. The runtime distinguishes between the two types of closures (function captures vs actual closures) based on the metadata of the func value itself.
Like I mentioned near the top, it's worth bearing in mind that the compiler can also do quite a bit of simplification and optimization during compilation to BEAM - so there may be cases where you end up with a function capture instead of a closure, because the compiler was able to remove the need for the free variable in cases like your example, but I can't recall what erlc specifically does and does not do in that regard.
The interaction between hot reloads and function captures in general is a bit subtle, particularly when it comes to how a function is captured. A fully qualified function capture is reloaded normally, but a capture using just a local name refers to the version of the module at the time it was captured, but is force upgraded after two consecutive hot upgrades, as only two versions of a module are allowed to exist at the same time. For this reason, you have to be careful about how you capture functions, depending on the semantics you want.
Any particular interesting stories about BZ2's development that you recall? Always interesting to hear how games like this come together, so much of the time it seems like more luck than anything!
Figured I'd drop a comment to let you know about the others though!
I think it's important to note that the post is clearly written for someone working on the implementation of compilers/type systems. So for example, in a compiler IR, especially those based on an extended lambda calculus representation, functions/closures are often curried, i.e. only take a single argument. As a result it can be an issue at a given call site to know whether a function is "saturated", i.e. all of its arguments have been applied so it will do some work and return the actual result; or whether it is only partially saturated, in which case it returns a new function that needs one less argument than before. I gather that this interacts poorly with typing in some situations, but I'm not super familiar with the issues here as I haven't gone down the rabbit hole of building a compiler with this kind of IR.
That said, as someone who works as a compiler engineer, I do recognize the potential of call-by-push-value, namely that it reifies evaluation semantics in the IR, rather than it being implicitly eager or lazy, and thus having to hack around the lack of one or the other, i.e. implementing lazy evaluation on top of eager semantics or vice versa. Making it a first-class citizen enables optimizations that would otherwise be impossible or very difficult to implement. To be clear though, you can obviously implement lazy on top of eager, or eager on top of lazy, without call-by-push-value - but I think if you anticipate needing to do that, and you are building a new compiler, using a call-by-push-value IR might be a worthwhile approach to take.
There might be more to it that I'm not really seeing yet in my brief reading of it, but the post made sense to me, it's just assuming a lot about the reader (i.e. that you are deeply familiar with compiler implementation, type theory, etc.).
But that's just a specific issue relevant to my time in the service. The bottom line is that unless you report every little thing that _might_ cause an issue later, you're going to be up shit creek when you get out and find out that something you were exposed to during your service is causing an expensive medical issue that you have to deal with. There are all kinds of fucked up things people had to do while they were in, that they struggle to get compensation for now that the consequences are catching up, because the issues aren't straightforwardly attributable to some event during your service, like with combat injuries. Burn pits are the most notorious one - you have advocates like Jon Stewart fighting in Congress to pass laws to support vets who were forced to work those pits and are now battling all kinds of complications. If anyone should be an obvious beneficiary of the disability system, beyond those with combat injuries, it should be those folks - but they are largely left hanging in the wind. In the case of burn pits especially, the military _knew_ there were consequences to having soldiers work them, but chalked it up as the cost of war.
Frankly, from what I've observed, once vets are out of the service, our country largely gives them the middle finger when they struggle with mental or physical health issues. I say "them" here, because I'm not a combat veteran, and I'm lucky that I had it pretty easy during my tenure (2009-2015), but for many, that is very much not the case. Yeah, nobody in Congress is going to stand up in front of everyone and say "let's make disability benefits harder to obtain" - but I have no doubt they'd have few, if any, qualms about doing it behind closed doors.
The equivalent would be like if you had to pull all of the instruments, electronics, and seats out of your car every 1000 miles, clean them up, replace faulty bits, and then put it all back again. All of the fancy trim, carpeting, etc., just makes that job harder, so you would probably want a car that doesn't have any of that, and is designed to make doing that kind of work easier, better still if you can avoid having to remove everything, and only have to remove the bits individually that need to be maintained. The down side of course, is that without all of the fancy trim and stuff, there would be gaps where things could fall and be hard to reach, and holes where wiring travels to the engine compartment/trunk/etc. Of course, FOD presents way less of a danger in a car than it does an aircraft, so you might not care if you drop something there, but aside from that, I think the analogy holds up.