For a "YAML" lockfile, you could probably write a much simpler and much more performant parser that throws out much of what makes YAML complicated, in particular, anchors, data type tags, all the ways of doing multi-line strings, all the weird unexpected type conversions (like yes/no converting to a boolean)... If the lockfile is never meant to be edited by human hands, only reviewed by human eyes, you can build a much simpler parser for something like:
The key to a happy life is to learn how to reduce the amount of things you own and how to build strong relationships. Once you have enough to put a roof over your head and food on your table, more than that can only be used to purchase increasing amounts of comfort, which is not the same as increasing amounts of happiness.
YouTube has plenty of videos of people calling in with hundreds of thousands to millions of dollars a year in income and somehow they are still broke and in debt. Live below your means, save the excess income into an investment portfolio, keep doing that until you have enough money to live off the interest. Don't even think about buying a Rolex until you have so much money coming in from interest that you don't even know what else to do with it. Even then, remember that the Rolex, like anything else, requires maintenance, but that if you make someone else happy, they can take care of themselves.
> can the right to kill coexist with the victim's right to defense?
Yes it can, and it's ludicrous to suggest otherwise. Russia believes it has the natural right to reclaim what it considers to be Russian territory. Ukraine believes it has the right to be free. So everyone should just put down their weapons and come to an agreement based on these rights?
The fallacy at the heart of your argument is that there is somehow some greater single truth, and that each side agrees that it is the greater single truth, and that everyone will just peaceably agree to follow the single greater truth because it is the single greater truth. Nothing could be less human. What are we, the Borg? We're supposed to follow some hive mind?
> something simple, like tying sanctions to murders of civilians
Not even remotely simple. Define sanctions, murders, civilians. The US bombing "drug" boats in the Caribbean, are those civilians? International law recognizes that collateral damage can legitimately happen during legitimate military operations. Is the collateral damage "murder"? How far should sanctions go? Sanction enemy banks (layer 1)? Sanction citizens of neutral countries who do business with the enemy country (layer 2)? Sanction citizens of neutral countries who do business with other citizens who do business with the enemy country (layer 3)?
>The US bombing "drug" boats in the Caribbean, are those civilians?
Yes.
>How far should sanctions go? Sanction enemy banks (layer 1)? Sanction citizens of neutral countries who do business with the enemy country (layer 2)? Sanction citizens of neutral countries who do business with other citizens who do business with the enemy country (layer 3)?
You're doing a great job of writing my policy! To be fair and to show commitment without doing too much harm it should be gradually phased in. The reason it's simple is that Israel does not really need to murder all of those individuals, and there is even an internal political option to not do it, so a firm "no" from everyone else would be sufficient. I doubt the sanctions would ever be implemented. I'm sorry if this sounds glib but there is no honest way to hedge it.
I think most people would disagree with you that armed members of an outlaw paramilitary count as civilians.
And I also think that most people would disagree with you that the correct first sanction is on a country's banks, the consequences of which fall disproportionately on the innocent civilians of your disfavored country; the disproportionality of which is contrary to international law.
More to the point, "technology is neither good, nor bad, nor neutral, it just exists". Ultimately all tools can be used for good or bad purposes and what matters is the people who wield them.
This is separate from the argument over whether MAD is philosophically good. MAD is not an argument about technology. "Peace through strength" does indeed require the occasional display of strength, to maintain deterrence. Good and bad (morals) are not the right frame to understand deterrence, rather emotions: fear, confidence, and security.
Solzhenitsyn can be read as either a humanist or an ethicist: either the bridgehead of good is sufficient to redeem everyone from war and morality demands pacifism, or all military doctrines must be submitted to independent review to check that we do not give the "unuprooted small corner of evil" oxygen. Crucially, these are both judgements about ourselves and not about the foes who seek to destroy us, who indeed consider themselves to have "the best of all hearts". In this sense, Solzhenitsyn contributes to the cycle of violence: if both sides are ethicists, and their ethical councils have different conclusions, the result is not just fundamentalism but a fundamentalism justified by ethical review.
Fear, anger, disgust are the ultimate drivers of conflict. Can we conquer them? Of course not, they are the base emotions, part of being human. But can there be a better way of handling them in geopolitics? Yes - if leaders are focused on helping not just themselves feel safe, but their enemies as well. This is the higher level beyond MAD - not mutual fear, but mutual security. This is why USAID was great foreign policy and cheap for its benefits. This is why weapons are sold to allies despite the fact that their interests may not be fully aligned with ours. Weapons are fundamental to security, which at the end of the day is a feeling and not a guarantee against attack or repercussions from an attack, and these feelings of security are what reduces the incidence and frequence of war.
Bookmarked, I think this is a really good idea and could lead to some really small, elegant TUI code.
But as a first release, I'm wondering if it maybe misses what Ruby really enables. The Hello World example has both init and initialize methods? message.to_s == "q"? @style.render?
I remember reading Eloquent Ruby and having my mind completely blown with the clarity and expressiveness that Ruby's metaprogramming enabled. It remains, in my opinion, one of the best programming books of all time for just how mind expanding it was and how it really made the case for Ruby and why there is no other language like Ruby.
I highly recommend that the authors go pick up a copy and then think about how it would influence their API design, I think there's a much more... eloquent approach feasible here, and it would be a pretty incredible way to build small/simple TUI apps.
And yeah, I agree. I'm not super happy with some of the APIs as they aren't really idiomatic Ruby. It's also something I mentioned in the blog post that I want to improve: https://marcoroth.dev/posts/glamorous-christmas
For now, I just wanted to get them out so we as a community can build them out together. Most of the APIs are just 1:1 "ports" of their Go counterparts and might feel off or a bit too low level because of that.
With that said... there is a reason why ML went with Python. GPU programming requires C-based libraries. NodeJS does not have a good FFI story, and neither does Rust or Go. Yes, there's support, but Python's FFI support is actually better here. Zig is too immature here.
The world deserves a Python-like language with a better type system, a better distribution system, and not nearly as much dynamism footguns / rope for people to hang themselves with.
I've actually done a fair bit of ML work in Elixir, in practice I found:
1) It's generally harder to interface with existing libraries and models (example: whisperX [0] is a library that combines generic whisper speech recognition models with some additional tools like discrete-time-warping to create a transcription with more accurate time stamp alignment - something that was very helpful when generating subtitles. But because most of this logic just lives in the python library, using this in Elixir requires writing a lot more tooling around the existing bumblebee whisper implementation [1]).
but,
2) It's way easier to ship models I built and trained entirely with Elixir's ML ecosystem - EXLA, NX, Bumblebee. I trained a few models doing basic visual recognition tasks (detecting scene transitions, credits, title cards, etc), using the existing CLIP model as a visual frontend and then training a small classifier on the output of CLIP. It was pretty straightforward to do with Elixir, and I love that I can run the same exact code on my laptop and server without dealing with lots of dependencies and environment issues.
Livebook is also incredibly nice, my typical workflow has become prototyping things in Livebook with some custom visualization tools that I made and then just connecting to a livebook instance running on EC2 to do the actual training run. From there shipping and using the model is seamless, and I just publish the wrapping module as a library on our corporate github, which lets anyone else import it straight into livebook and use it.
> NodeJS does not have a good FFI story, and neither does Rust or Go. Yes, there's support, but Python's FFI support is actually better here.
Huh. I've found Rust's FFI very pleasant to work with. I understand that Zig's is second to none, but what does Python offer in this domain that Rust (or Go) doesn't?
Rust's problem is similar to Go's - the language makes some very strong guarantees, and FFI breaks those guarantees, so trying to work with FFI in those languages "infects" the codebase and breaks the value-add of working with the codebase to begin with.
In Rust's case, it's the necessity of wrapping FFI with unsafe. Memory deallocation e.g. cudaFree() is just part of the underlying reality; trying to handle memory management in a language with a borrow checker rather defeats the purpose of using a language with a borrow checker in the first place. Python lets library authors write __enter__ and __exit__ dunder methods to ensure that memory deallocation is handled correctly via Python context managers, which is a much more elegant abstraction. Yes, in Rust you can implement the Drop trait, but then the caller needs to remember to put the object in its own block... like I said, it's definitely possible with Rust, it's just not as nice of a story.
> Python lets library authors write __enter__ and __exit__ dunder methods to ensure that memory deallocation is handled correctly via Python context managers, which is a much more elegant abstraction
Whats stopping you from writing a WrapperPtr and the drop trait for it in Rust? This would achieve the same as the dunder methods in python
I don't see how what you describe doesn't in general apply to FFI between any languages with different resource management philosophies. In particular:
> Yes, in Rust you can implement the Drop trait, but then the caller needs to remember to put the object in its own block...
Why would you need to remember to put the object in its own block? If you want to manually control deallocation, just call drop manually (or put the object in its own block if you really prefer). If you don't care, just let the Rust compiler pick a time to drop. In both cases, the most important guarantee – that drop doesn't happen while references to the object live – is still upheld.
> The world deserves a Python-like language with a better type system, a better distribution system, and not nearly as much dynamism footguns / rope for people to hang themselves with.
C#/.Net? (Their too strong focus on worthless backwards compatibility and slow (very slow) development speed on basic language features not withstanding.)
Admittedly I haven't used C# in a few years, but to my knowledge it is much more ergonomic than java and personally it's my preferred language. Only thing stopping me from using it more is it has a much smaller community than java/python etc. Wondering what you think is missing.
> They don't because too many people pirate games to make that a viable business
Game piracy is fundamentally un-safe for players, since games are fundamentally executable code, where setup usually requires admin permissions, and pirate distributors are financially incentivized to add malware to turn the game system into part of someone's botnet. The only "safe" way to pirate is to do it on a dedicated machine, on a separate VLAN, network controls, etc., which most people will not set up. This is not like TV/movie piracy, which would depend on zero-day exploits in the video player.
> capacity constraints make it difficult to have significant competition
Thirty years ago, you would be correct. In the modern day, you could tie switch signalling to real-time auctions and let private rail's command centers decide how much to bid and thus whether or not they win the slot for putting their cars onto the shared rails. The public rail owner likely needs to set rules allowing passenger rail to pay a premium to secure slots in advance (say, a week) so that a timetable can be guaranteed to passengers during peak rush hour, but off-peak slots can and should be auctioned to naturally handle the difference between off-peak passenger rail and not-time-sensitive, more-cost-averse freight rail.
While I do think capsule hotels are just too small, I do sympathize with wanting a lifestyle where you own an actual house on actual land in an actually quiet, rural environment, and occasionally commute into the city for work, sleeping in a pieds-a-terre, which for working-class folk would look something like a studio or 1-bedroom apartment within walking distance of the office. You would rent the studio on a monthly basis for basically as long as your relationship continues with that employer, stay there mid-week, and take rail 3-5 hours out to the rural countryside for the weekend.
That's hell. So most of the time you are away from your home and probably from your family if you have one. If you don't have one - you are leaving your home unwatched most of the time. You pay for 2 places instead of 1. 3-5 hrs commute away from your job - that's nuts by itself.
What you should dream of instead - most jobs becoming remote or physically proximal to where you live.
For hybrid workplaces wanting 3 days in-office, it's a little less than half
> away from your family
Yes, this is a trade-off. The choice is between whether your family will be crammed into a too-small-barely-affordable apartment in the city, or a more spacious house, since anything family-sized in the city is priced for executives. A lot of kids don't live at home during college; a lot of sales people and the like are used to living out of a suitcase, this is a similar lifestyle except better because the pieds-a-terre apartment is actually stable, it's not the same as living out of hotel rooms.
> pay for 2 places instead of 1
Theoretically 1 pieds-a-terre + train tickets + 1 rural mortgage payment is cheaper than 1 family-sized apartment in the city. If it's not in your case - fair enough.
> 3-5 hour commute away from your job
Even if it's 5 hours, if you do that twice a week plus 3x 15 minute walks each way, that's 10h45m commute time per week, mostly on a train where you can watch movies, read something, etc. If you drive two hours each way, in congestion, to a (premium-priced) house in the suburbs, that's 10 hours of commute time per week fully concentrated on the road. YMMV.
> dream of remote or physically proximal
Well sure. That's a dream. Part of the question is, what's a realistic goal to set for yourself? Pieds-a-terre + train + rural house is achievable on my own agency. Overhauling the industry to become remote-first, or overhauling housing to become more affordable closer to employers, is not.
reply