1,380 karma · joined Mar 19, 2020 (6y ago) · 457 submissions
comment 3y ago · link · parent
I’m trying to fix them while also supporting their syntax where I can, muscle memory is strong. So I support “plugins install” and “plugins add” If you notice any aliases that you think should exist, please mention them.
182.
Show HN: Asdf Clone Written in Rust
79 points · by jdxcode · 3y ago · 35 comments
183.
1 points · by jdxcode · 4y ago · discuss
comment 5y ago · link · parent
I find this so strange. I also loathe nitpicking about syntax which is precisely why I think this would be a great tool!
I work in JS now on a large team and one of my least favorite activities is trying to find consensus on which linting rules we should/shouldn’t adopt. It’s such a waste of time!
comment 5y ago · link · parent
I'm not familiar with that vuln, but I don't see how it could be the "same mistake". My guess is there simply wasn't support for parameterization or there was a non-obvious concatenation problem when building the query string—but please correct me if I'm wrong.
This instance is novel because the parameterization protection was removed in favor of concatenation and that the vuln is so obvious a first-year CS student wouldn't struggle to identify it.
comment 5y ago · link · parent
That’s like going 120mph and telling the cop you were just “distracted”.
You’re correct that we often make mistakes when we’re busy, but this isn’t that. This is OWASP #1 and the most plain example of it.
This is not a “mistake” that engineers make, this is unethical to allow this to go into production. He even has a stackoverflow answer where he explains this exact problem: https://stackoverflow.com/questions/11554015/syntax-sql-wher...
If you think I’m wrong, then what could an engineer be responsible for? Literally nothing ever?
comment 5y ago · link · parent
Imagine this scenario: You have 10 BTC of illegal funds you'd like to launder. I, and 3 of my friends each have 5 BTC and they're all wanting to do the same.
I transfer some money into a new wallet from 2 of my friends and give it to you. Your money goes to me and 1 of my other friends.
This way the blockchain has no link between your source funds and the money that you received.
This is a simple example. If you split the money into random amounts and do this a few times with new wallets each time it can easily become untraceable.
comment 5y ago · link · parent
Ross probably could’ve even made his own tumbler. Giving out his money to anyone that sends him some would be a naive way to think about it.
In terms of amount, I don’t think it would be hard with all the illicit activity on bitcoin to launder even this amount of money, but it’s not like he would need all of it right away.
Anyways, this is in response to “isn’t this a public ledger?” To which the answer is, “not if you make part of the ledger private—outside the blockchain—it isn’t.”
comment 5y ago · link · parent
What the heck is a search provider though?
EDIT: looks like it’s “gigablast”. I don’t understand why I just wouldn’t use that search engine directly?
comment 5y ago · link · parent
comment 5y ago · link · parent
I've been writing a ton of TS since 2016 and in most of those projects we've had liberal use of 'any' or even incorrect types (!). It's still far better than vanilla JS. The argument that "it doesn't work all the time therefore it's worse" makes no sense to me.
Ultimately the issues you're talking about make logical sense academically, but nobody has ever raised them as problems in the real world that I've ever encountered.
Full typing makes my job easy, but a little bit of typing is still better (in most cases) than no typing at all. There is an argument to be made about simplicity for small codebases, but those aren't the ones I'm talking about.
comment 5y ago · link · parent
Accidents and SQL injections happen, usually because of non-obvious query-building but this is a different level.
comment 5y ago · link · parent
EDIT: that link isn't working, but here is a screenshot: https://imgur.com/4lyElZI
comment 5y ago · link · parent
> Rent controls are a textbook example of a well-intentioned policy that does not work. They deter the supply of good-quality rental housing. With rents capped, building new homes becomes less profitable. Even maintaining existing properties is discouraged because landlords see no return for their investment. Renters stay put in crumbling properties because controls often reset when tenants change. Who occupies housing ends up bearing little relation to who can make best use of it (ie, workers well-suited to local job opportunities). The mismatch reduces economy-wide productivity. The longer a tenant stays put, the bigger the disparity between the market rent and his payments, sharpening the incentive not to move.
[0] https://www.economist.com/leaders/2019/09/19/rent-control-wi...
comment 5y ago · link · parent
let myColor: Color | undefined;
I don't understand what the problem is. Native JS would require you to define the starting scope of the variable (unless you're relying on global scope!).Then you declare what the type is: Color or undefined. The state of the variable can be one of two things. Perhaps I've been writing TS for too long but I think I'm missing the problem here.