HNHacker News
TopNewBestAskShowJobs

curun1r

6,646 karma · joined February 8, 2012

submissionscomments
curun1r··on Ask HN: Great Blogs by Programmers
Pretty Rust-centric, but I think: https://matklad.github.io has some good content
curun1r··on Rust extension traits, greppability and IDEs
The other path that works well is to use Dash/Zeal for documentation.

I find dealing with a browser tab to be a bit awkward, especially if I'm working on a Rust project using Wasm and actively testing in a browser and having to flip between docs and my app. Having a dedicated documentation viewing app that I can show/hide with a keyboard shortcut just saves a second or so every time I need to pull up docs. And the integration with IDEs can sometimes mean I don't even have to leave my editor to get the answer I need. It also integrates documentation for std/core with docs for crates I'm using giving me a single search of everything that my Rust code can use. The only downside compared to cargo's docs is that it doesn't document my own code that I'm working on, but it's much easier to remember the details of that code.

The cherry on top is that it isn't limited to Rust. If I'm working on something with an FFI dependency, I can have the same documentation workflow for C/C++ documentation. If I'm working on a Wasm project, I can pull up HTML/CSS documentation the exact same way. All my documentation lives in the same place under the same keyboard shortcut.

curun1r··on Why is there no theory of the just riot? (2021)
> Samsung TVs on sale at 100% off at your local Target doesn't have the same moral weight to it

I kinda disagree with this. If it were a local retailer run by your neighbors, you’d be absolutely correct. But if you’re talking about Target, you’re now in the territory of a system of economic oppression where money is siphoned out of local communities by large multinational corporations and the actual residents have no ownership over anything. During the 2020 riots, there were definitely some people trying to make the point, “we have no ownership of our own neighborhoods.”

I can see many people, especially black Americans, feeling all but imprisoned by the fact that they can’t afford to own property, can’t run the businesses that serve their community and are at the mercy of white people who move in and gentrify the neighborhoods forcing them to find new, less desirable places to live. The police who are the immediate focus of protests become merely the jailers in a systemic prison of which Target and other large retailers play a huge part.

curun1r··on We need to reclaim our attention
I've done a bunch of Buddhist trainings, 10-day retreats and such and, for me at least, the saying "no plan survives contact with the enemy" seems to apply. I've yet to be able to carry what I've learned forward into a modern lifestyle. I'm able to keep some amount of discipline for around 2ish weeks following my period of isolation from the world, but I eventually find screen time and work pressures overwhelming my ability to resist. I get the feeling that meditation is an artisanal solution to an industrial problem. And teaching people to survive in a dysfunctional society rather than addressing that dysfunction directly isn't the right way to deal with it.
curun1r··on Trying Out Generics in Go
It's worth noting that Rust's Async functionality starts with very different priorities from Go's goroutines. Rust, as a systems language, made lack of overhead (allocations, etc) the highest priority. It's part of Rust's overall zero-cost abstractions ethos. Goroutines are just never going to be zero cost. Go chose to prioritize the interface to the programmer, which is much more a part of Go's ethos around being simple.

There's nothing wrong with either approach, they just have different trade-offs because their goals are different. Rust's approach will sometimes push complexity onto the programmer to handle. But it can be made to perform better and more predictably than the Go equivalent. This might not matter if you're not pushing the performance envelope, but if you are, Rust makes that possible in a way that Go simply doesn't. You'd never want to write code using goroutines for an embedded device with limited CPU/memory, but Rust's async is already proving useful for these sorts of projects.

However if you can tolerate the performance overhead that Go imposes, giving the programmer a simpler mental model can easily be worthwhile. Technology is all about trade-offs and you have to choose the right tool for the job.

curun1r··on YouTube suspended my account for posting DeFi hackathon video
I wonder if Google should be using signals outside of YouTube to help their ML detection efforts. This example seems like a good one…if an account has a paid YouTube Music account that’s been in good standing for months/years, that seems like it should be taken into account. How many spammers would be willing to nurse an account through months/years of paid service only to have it pay off in a brief attempt at scamming people? If you added in listening data, you’d get an even clearer signal that the account is at least attempting to stay within the rules.

It feels like Google has it backwards…they’re siloing the fraud detection and banning across different products. If they switched that and did fraud detection across product boundaries and more targeted bans, we’d see far fewer of these AI-run-amok pleas to publicly shame them into getting a human to look into an obvious mistake.

curun1r··on Piracy release group EVO ‘blames’ movie industry for its popularity
I’d prefer a model where more content enters the public domain rather than the copyright changing hands.

Declare somewhat-short, fixed terms (5 years?) for every bit of content. The first term is free and then subsequent terms increase in cost geometrically. The first renewal could be an almost insignificant amount…but just the fact that it’s something would mean most content that is unmonetized would enter the public domain after the initial free term. Successive terms would start to only make sense for the most profitable content.

Being able to balance a healthy public domain with the ability for content creators to put out content that costs a ton to produce seems like it should be the goal of the copyright system.

curun1r··on Backdooring Rust crates for fun and profit
My comment specifically called it out as a half measure. But that doesn’t mean it’s not worth doing.

One of the ways that I’d see a proc macro attack playing out in real life would be to attempt to obtain the API token from cargo login to allow the attacker to publish a malicious version of a popular crate. But if cargo login is only run on the CI instance responsible for publishing and developers test their code on their individual dev machines, the attack fails.

We shouldn’t worry about making security 100% effective. Rather, we should be concerned with stopping as many different attacks as we can and providing users with as many building blocks as possible to let them protect themselves. There will always be vulnerabilities. But using that as an excuse for inaction isn’t helpful.

curun1r··on Backdooring Rust crates for fun and profit
I’m not sure I agree with your fatalistic take on (1). As an example, the proof-of-concept proc macro attack from the article could be addressed by running proc macros in a wasm sandbox. I know there’s been some exploratory work done towards that.

Similarly, all of the attacks that execute code at compile time are mostly addressed currently by building code in a Docker container. It’s not a perfect security measure, but it greatly increases the probability that a build.rs or proc macro attack will fail.

Your (1) strikes me as something that can never be solved to provide 100% safety, but that there are partial solutions which, in practice, can significantly reduce the attack surface. And hiding behind “fundamentally unsolvable problem” will get in the way pushing for the meaningful half-measures that offer some degree of real-world protection.

curun1r··on macOS Monterey's new network quality tool is surprisingly good
I’m not sure if I’d consider it hidden, but there’s so much that can be done with the oascript utility. The idea that most GUI apps can be queried or controlled from the command line is super powerful, even if AppleScript is somewhat obtuse.

As an example, I have shell aliases setup to cd into the folder(s) open in Finder or reference files selected in Finder.

curun1r··on Use forums rather than Slack/Discord to support developer community
There’s risk in everything…self-hosted forum software run by an open source project also has a potential of going offline, either because hosting becomes onerous/expensive or some sort of database issue. Discord and Github have the exact same potential you’ve mentioned for Reddit. There’s no perfect answer.
curun1r··on Use forums rather than Slack/Discord to support developer community
I’m a believer in just creating a subreddit. It’s free and easy, many people already have Reddit accounts and it’s a much better forum than the ones that would be self-hosted, including moderation tooling and bot ecosystem. The threaded discussions are also better than what Github offers.
curun1r··on Avoiding bot detection: How to scrape the web without getting blocked?
Eventually, but they’re not very aggressive when it comes to bot detection. Simple IP rotation usually works.
curun1r··on Avoiding bot detection: How to scrape the web without getting blocked?
There’s one technique that can be very useful in some circumstances that isn’t mentioned. Put simply, some sites try to block all bots except for those from the major search engines. They don’t want their content scraped, but they want the traffic that comes from search. In those cases, it’s often possible to scrape the search engines instead using specialized queries designed to get the content you want into the blurb for each search result.

This kind of indirect scraping can be useful for getting almost all the information you want from sites like LinkedIn that do aggressive scraping detection.

curun1r··on The Serde Rust Framework
The other benefit is that almost all of the Rust ecosystem supports serde, often by way of a feature. So using serde can mean being able to embed a type from a crate in your serializable type or being able to pass your own types to crate functions/methods that serialize/deserialize. It all ends up being interoperable.
curun1r··on YouTube is banning anti-vaccine activists and blocking all anti-vaccine content
> do you think they know what the long term effects of a serious covid case is? (hint: it starts with a d and ends with "eath")

This is a dangerous message to push. The reality is that there are many lasting consequences of COVID that fall short of death but are, never the less, quite serious. The so called “long COVID” really needs to be part of the vaccine calculus because the health consequences are very much worse than the purported side effects from the vaccine.

I’ve seen this kind of phenomenon first hand when it comes to drugs. As a teenager, there was lots of anti-drug messaging trying to convince us that ecstasy was dangerous. And all of it focused on scaring kids by exaggerating the risk of death. But we could see people taking it regularly and none of them were dying. And so it undercut the message. But decades later, I know a few people who’ve had depressive episodes potentially linked to heavy ecstasy use. And that consequence was never a part of the decision-making process because the authorities discredited themselves by being unnecessarily and obviously hyperbolic.

We need better messaging that provides people with the full range of consequences for their choices. The “you’re going to die!!!” hysteria ends up being counterproductive. Even as deadly as COVID is, the truth is that unvaccinated people probably won’t die from their case…the vast majority survive. But if people understood how many recoveries included long-term health consequences that significantly affected their quality of life, they might be better able to weigh that against the potential side effects of a vaccine.

curun1r··on Tech firms' nightmare: Vanishing green cards
As far as 4 goes, ratios are a better solution to the body shop problem. There’s no need to even limit the number of work visas granted so long as the companies that are able to hire foreigners also hire the requisite number of Americans in similar positions.

There are a number of other advantages to this too. For one, it helps immigrants integrate better the more Americans they end up working with. The current system can result in silos where immigrants mostly work with other immigrants. And it helps Americans to work alongside skilled workers by giving them increased learning opportunities. It also works better for lower-paid skilled positions like nurses and scientists who don’t have to compete with higher-paid tech workers for visas.

I’m okay with giving an unlimited number of visas (background checks required) to any company that employs at least 70% Americans in each salary band. At worst, it creates an incentive to hire unqualified Americans just to get access to foreign talent, which is still a win for this country.

curun1r··on iPhone 13 announced with redesigned camera array and smaller notch
Watching the stream this morning juxtaposed uncomfortably against the discussion earlier this morning about how Facebook knows that Instragram is damaging to teen psyches. So much of this update is focused on the cameras and the ability for the phone to almost automatically make people look good. I can't help but see this as a way of capitalizing on the insecurity that's being generated by the social media platforms. I get that Apple has to try to keep up with the camera arms race or other phones will win over the market of people who post to social media. But it's also saddening to see how much effort and dev work goes into feeding this cycle of insecurity. The more Apple can make people look "better than any filter", the more people are going to feel crushed when they look in the mirror.
curun1r··on Intuit to Acquire Mailchimp for $12B
Having worked at a company that was acquired by Intuit, they gave fairly substantial retention bonuses that vested over the 3 years following the acquisition that ended up being about 4x the value of my original pre-acquisition stock options, though the retention bonuses varied greatly and not everyone got that much. So I’d expect that Intuit is taking care of the employees that are considered key to Mailchimp’s business.
curun1r··on Revolt: Open-source alternative to Discord
I’ve always seen “written in Rust” as relevant for a specific sort of software. Because CVEs are inevitable in C/C++ software and dealing with CVEs has become part of the user interface to that software. Knowing something is “written in Rust” means its attack surface is much smaller. Working in tech, the “drop everything and migrate to a version that isn’t vulnerable” instances are far too common and disruptive.

But as soon as you get into consumer software with auto-update mechanisms and an expectation that end users won’t be computer professionals who know how to read a CVE and evaluate its urgency, the “written in Rust” distinction becomes a mostly irrelevant implementation detail. Or, worse, it’s an indication that the GUI will feel wrong in some way because the Rust community seems averse to writing GUIs with GTK, UI Kit and whatever the hell Microsoft recommends using for Windows these days.

curun1r··on T-Mobile: Breach Exposed SSN/DOB of 40M+ People
The bigger question, though, should be why are they storing the actual SSN? They can run a credit check and store only the result of the credit check and not all the personal data they had to collect to run the check. Presumably, they do need some way to report delinquent accounts to the credit bureaus after the fact, but there's no reason why credit monitors can't use a tokenized system (i.e. submit the SSN to the credit bureau and receive back a UUID which has the singular purpose of reporting back to the credit monitors.)

We really need to start attaching eye-watering financial penalties to companies that leak data so that we make the only sane decision be not storing that data in the first place. Collect it and shuttle it to where it needs to go...but under no circumstances commit it to at rest storage.

curun1r··on Millionaires call for an emergency tax on billionaires
That's only for evasion, I'm talking about avoidance. Most billionaires can easily spend their entire lifetime avoiding taxes. Taking out a low-interest ELOC against unrealized gains is 100% legal and a low-risk transaction for a bank. No amount of "going after the banks" changes that.
curun1r··on Millionaires call for an emergency tax on billionaires
The problem, as always, is implementation. Millionaires, especially those on the low end of that spectrum, tend to be fairly easy to tax. Their income sources are mostly regular and standard forms of income tax work pretty well.

Billionaires are a very different animal. They have armies of lawyers and financial managers that help them navigate the movement of wealth through the global system to avoid taxation. They avoid recognizing income at all opportunities and strategically use debt to provide for themselves without exposing themselves to tax consequences that would come from getting the money they want to spend. They can traverse the globe looking for the most favorable taxation rates to maximize their wealth.

There’s been a lot of “tax billionaires” and “billionaires shouldn’t exist” rhetoric without much substance to how to actually achieve that goal. Billionaires aren’t just going to say “aww, shucks, guess we’ve got to pay up” when governments decide to up their taxes. They’re going to react in ways that are both hard to predict and harder to stop. Capital flight is a real threat and will require a massive, coordinated effort on the parts of all the nations that comprise the global financial system to curtail. The efforts towards a minimum corporate tax rate are a good start, but that’s only one step of many that are necessary before “tax billionaires” becomes a realistic target.

curun1r··on The Origin of Consciousness in the Breakdown of the Bicameral Mind (1976)
> "You" are the mind/conscious self, a separate construct in the physical brain

Sam Harris has a lengthy discussion about this separation in "Waking Up: A Guide to Spirituality Without Religion" where he looks at what we've learned from patients who've undergone a corpus callosum surgery. The TL;DR of that surgery is that it's done on people with severe seizures to sever the two hemispheres of the brain to minimize the seizures. But it also tends to (gross over-simplification incoming) create two distinct personalities in the same person, so Harris looks at essentially what gets doubled as elements that cannot be part of the self.

A lot of the rest of the book also deals with the nature of self as revealed through meditative practice and drug use. It's a somewhat tedious read, but it's really fascinating stuff.

curun1r··on Stop mocking your system
The other point about unit tests is that they allow you to test far more permutations. At a micro level, you can test more of the possible types of inputs to your function. When you move to integration tests, the permutations multiply to the point that it would require billions of tests to test the same range of inputs.

This is why both are so necessary. Integration testing tests whether the whole thing is coherent when put together. But it’s terrible for testing edge cases and error scenarios. That’s where unit testing comes in. It gives the developer a chance to codify every edge case they’ve considered to automate the process of catching regressions.

curun1r··on Intuit to share payroll data from 1.4M small businesses with Equifax
I remember seeing the Self Employed launch from inside the company. It was somewhat of a skunkworks project from 3 engineers and they got a lot of internal PR for creatively targeting the gig worker market. I guess the plan was to eventually branch out to other self employed people, but the initial motivation was Uber drivers and such rather than small business owners, because that would cannibalize the QuickBooks Online market. It doesn't sound like much has changed in the 5 years since I left. It sounds like you fall a bit in between their product offerings, but I wouldn't count on them handling all your needs because they'd rather people like you just moved to their full QBO product.

I also remember attending a session that Intuit offered on the competitor landscape and being quite surprised that Wave wasn't covered. Intuit just doesn't take them seriously, but their products, to me, seem better than just about every competitor covered in the session, including Xero. They've got a self-employed offering [0] that might be worth experimenting with since you can start for free and only pay when you need the premium features.

[0] https://www.waveapps.com/accounting/self-employed

curun1r··on No evidence that chance meetings in office boosts innovation
I’ve said this in other threads on this topic, but shared lunches are so important. There’s something about eating together that taps into our primitive brains and creates an entirely different dynamic. It’s like we subconsciously see the people we eat with as part of our tribe.

Lunch is, IMHO, the biggest loss when going full remote. It’s also somewhat of a magic bullet for fixing individual communication breakdowns. As a manager, when you see two people failing to coordinate, especially across teams, just have them eat a few lunches together. Offering to have the company pay is usually enough to make it happen. For a few tens of dollars, you establish a relationship with very low communication friction. It’s ridiculously good value for the company.

curun1r··on Safari 15 on Mac OS, a user interface mess
I’m on chrome, but I’m using them through a simple development extension I wrote which examines the url of ungrouped tabs and adds matching tabs to a few predetermined groups that I’ve hard-coded into the JavaScript. It was a quick and dirty hack that took me about 30 min to setup, but it’s made the tab grouping functionality so much more useful.

I’m toying with the idea of adding an options page so that I could release it to the chrome store, but I hate UI work, so I haven’t gotten around to that yet.

curun1r··on Apple employee group rejects planned return to the office
Hard disagree. There's something about eating with someone that taps into our lizard brains' survival instincts...eating together == allies. Online games may work for people who like online games, but anyone who doesn't like them is going to feel resentment at being made to waste time doing something they don't enjoy. Lunch is something that everyone is already doing, so no one will consider the time wasted, especially if they're getting free food out of it.
curun1r··on Apple employee group rejects planned return to the office
One crucial bit of shared context that gets mostly missed…lunch. Not having lunch together has been, IME, the single biggest indicator of a dysfunctional team.

The neat thing about lunch is that the conversations are entirely non-directed without feeling like the time is being wasted in a meeting. Conversations can cover a specific project, when a high degree of coordination is necessary, generalized venting, when there are shared frustrations or just be about non-work topics that help a team bond and get to know each other as people rather than workers. It’s like a meeting that doesn’t feel like a meeting that can be strategic or therapeutic as needed. There’s really no way to replicate the beneficial effects of eating lunch together when workers are remote.

As a manager, this has also been one of my go-to tricks for successful cross-team projects lasting any significant amount of time. I tell one of my team members to setup a lunch with at least one member of the other team on a weekly basis and use the incentive of authorizing the company to pay for it. For ~$20/person/week, the cross-team communications issues basically disappear. It’s ridiculously cost effective and almost magical in how well it works.

← PreviousPage 4 of 34Next →