Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
couchand
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
601.
▲
by
couchand
6y ago
In response to a challenge about the use of unsafe in the very first example of a blog post that you acknowledge doesn't need it, you respond with a defense of the code in some library. The differences between those contexts is massive
602.
▲
by
couchand
6y ago
> fixing the more glaring issue with global variables Given that this issue is within ASP.NET that's not likely to happen in one commit of this author's project.
603.
▲
by
couchand
6y ago
Maybe... sure that's fewer commits to cherry pick. But when some reconciliation is needed to make a patch apply to different version branches, it's sure a whole lot easier to manage if the commits are small.
604.
▲
by
couchand
6y ago
I'm immediately turned off by the entirely gratuitous use of unsafe here. I clicked through to the linked Reddit discussion and I'm not convinced the author has really thought it through. Writing, "pedagogically, that'
605.
▲
by
couchand
6y ago
This is the only right answer. If you feel yourself starting to slice up your name field, ask, "what am I going to do with the parts?" 90% of the time the answer is to also record a nickname.
606.
▲
by
couchand
6y ago
A code mirror and mailing list is a perfectly fine DVCS for the purposes of contributing code to an open-source project, and it doesn't lock a whole ecosystem into a monoculture walled garden. > feedback that can be given right ther
607.
▲
by
couchand
6y ago
That isn't always a benefit, though. When interfacing with a database schema that uses small integers for ids, I'm all the time defining types like `struct CustomerId(u32)` and `struct InvoiceId(u32)`. It's incredibly valuabl
608.
▲
by
couchand
6y ago
> It's not like [there] are actual consequences for not voting the party line. There absolutely are, they just happen to be a side-channel in this particular system.
609.
▲
by
couchand
6y ago
Seems highly unlikely that John Roberts would let any decision on the election be that close. He's too much of an institutionalist to not find some way to bring along most, if not all, of the Justices. Given that, it's really qu
610.
▲
by
couchand
6y ago
Well, if your tokenizer returns `impl Iterator<Item=&str>` (as in the OP), every token will in fact be a &str... In any case, this scheme is pretty limited, since you probably want other info in your token span like line numbe
611.
▲
by
couchand
6y ago
> Rust doesn't appear to have a way to say "give me the location of this &str in that &str" (even though it seems like it would be safe). That's a fantastic idea. It seems like it would be not just safe, but
612.
▲
by
couchand
6y ago
Presumably the parent wasn't asking about searching for one during slice in another, but rather locating the original offset of a string slice derived from another.
613.
▲
by
couchand
6y ago
I read this as putting all the weight on the wavy approximate equals; the alternate universe described is incredibly similar to, but not quite the same as, ours.
614.
▲
by
couchand
6y ago
> If you don't know who the sysadmin is, it's you. Brilliant. I'm printing this out and taping it to my wall.
615.
▲
by
couchand
6y ago
Running your own server connected to the Internet is not a hobby and nobody should get the impression that it will be. Otherwise you're just making a donation to a DDOS swarm.
616.
▲
by
couchand
6y ago
Short answer: if they are unique because they're a small sample from a large space (e.g. UUID v4) no salt is needed. If they're unique but maybe predictable, salt.
617.
▲
by
couchand
6y ago
What the GP describes is absolutely correct. It may not be all that common but it is a known pattern. That you haven't heard of it doesn't mean it doesn't exist. > An alternative approach is to hash the passwords as usua
618.
▲
by
couchand
6y ago
bcrypt's input is limited to 72 characters in most implementations. https://cheatsheetseries.owasp.org/cheatsheets/Password_Stor...
619.
▲
by
couchand
6y ago
> Although implementing a maximum password length does reduce the possible keyspace for passwords, a limit of 64 characters still leaves a key space of at least 2^420, which is completely infeasible for an attacker to break. As such, it
620.
▲
by
couchand
6y ago
> Sometimes you need to put a ",", sometimes you don't The rule is pretty simple: if you have curly braces you don't need a comma (and rustfmt will drop it), if you don't have curly braces you need a comma.
621.
▲
by
couchand
6y ago
And if the ride is subsidized by VC, all the better!
622.
▲
by
couchand
6y ago
> Each site was more or less a fork of the codebase, and required a separate DB instance. I don't believe this is true. At least as of 2016, the various sites were on a shared codebase [0], and there were two SQL Server clusters to
623.
▲
Rust nightly now supports AVR platform
(github.com)
2 points
by
couchand
6y ago
|
0 comments
624.
▲
by
couchand
6y ago
I'm not sure what you mean by bringing up HTTP method. The two main ways I know to get to the results page are to enter a query into the website or the browser search bar, and both of those seem to issue GET requests. They also both
625.
▲
by
couchand
6y ago
Unable to reproduce. Links appear to be plain links and no JS intercepts clicks.
626.
▲
by
couchand
6y ago
Maybe it's more of a thing in certain circles but I see links to godbolt.org all the time.
627.
▲
by
couchand
6y ago
The part missing from that analogy is the iterative process. Your client may have asked you to build a chair, but until they sit down on what you've built they don't realize that what they really wanted was a couch.
628.
▲
by
couchand
6y ago
> I've spent most of my career as a front end developer. We have three tools in our toolbox: HTML, CSS, and Javascript. While it may be common, this seems a somewhat problematic framing of things. You're first responsibility o
629.
▲
by
couchand
6y ago
I suspect you could ask a person of almost any age if they know who they are and what they want and none of them could come up with a cogent big-picture answer. We try things, we make mistakes, we look for the things that will give us sati
630.
▲
by
couchand
6y ago
Go ahead and read the rest of the article, please.
More ›