Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cakoose
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
121.
▲
by
cakoose
7y ago
The "blockchain-based" part is misleading. For one, when people say "blockchain", they're almost always including the clever protocol that enables a currency with no central authority. That's the interesting p
122.
▲
by
cakoose
7y ago
> All notable AI techniques to date specify in exhausting detail the thought processes that the AI should execute in carefully constructed algorithms. I'm not knowledgeable about AI, but from some of of the game-playing AI research
123.
▲
by
cakoose
7y ago
> Now let’s compare that to the equivalent Java program: public class SquaresOfIntegers { public static void main(String[] args) { for (int i=0; i<25; i++) System.out.println(i*i); } } > This is consi
124.
▲
by
cakoose
7y ago
I don't know enough details to say for sure, but some possibilities: 1. People may be more willing to learn Rust. I much prefer the language itself, but also it's clearly on the rise, so it may feel like a better learning investm
125.
▲
by
cakoose
7y ago
> Packrat isn't really a parsing algorithm - the PEG is the parsing algorithm. The way I've seen it presented, PEG is primarily a style of grammar (basically, prioritized choice instead of normal alternation) and Packrat is a p
126.
▲
by
cakoose
7y ago
It's not just the level of detail. For example, what if your advice included one fewer detail: > The webserver listening in on "localhost:19421" should implement a REST API. This will ensure that only Javascript running o
127.
▲
by
cakoose
7y ago
No, I wasn't assuming the API will remain identical -- I saw the "should implement a REST API" part of your recommendation. Here's what's wrong with your recommendation: 1. An AJAX REST API request doesn't nece
128.
▲
by
cakoose
7y ago
The blog post author doesn't understand CORS either! Their advice on how to fix the problem is wrong: > So what would a secure implementation of this feature look like? The webserver listening in on "localhost:19421" shou
129.
▲
by
cakoose
7y ago
Like others said, not the point of the example. But even then, there's not enough context to determine if there's a TOCTOU bug. For example, what if it's using an RDBMS transaction?
130.
▲
by
cakoose
7y ago
Turbo Pascal came with reference manuals, but also with instructional books that taught you OO programming and Windows UI programming from scratch. They must have been well-written; I didn't really have Internet access, so there was no
131.
▲
by
cakoose
7y ago
Another explanation: "no" responses require more information. If you are saying yes, then that's basically all you need to say. If you're saying no, you usually also provide a reason, so you probably wouldn't use a
132.
▲
by
cakoose
7y ago
> [...] discover that WhatsApp doesn’t work on it due to a weird message > "Your phone date is inaccurate! Adjust your clock and try again." > I have no idea what do date issues have to do with not starting WhatsApp but f
133.
▲
by
cakoose
7y ago
This article exaggerates the deficiencies of TLS 1.2. - Because of the TCP handshake, the difference between plain HTTP and TLS 1.2 is 2 RTTs vs 4 RTTs, not 1 vs 3. - TLS 1.2 supports session resumption, which can bring it down from 4 RTTs
134.
▲
by
cakoose
7y ago
The APIs in the blog post were not invented by Smartcar. Like most HTTP-based APIs, Smartcar's authorization endpoints follow the OAuth 2.0 standard, which specifies the exact parameter names and how they should work: https:/&#x
135.
▲
by
cakoose
8y ago
> as discussed in my previous article [1], Go uses memory instead of registers to pass arguments and return values across function calls. [1] https://science.raphael.poss.name/go-calling-convention-x86-... This is very s
136.
▲
by
cakoose
8y ago
Your point that you can use one while charging the other was valid and helpful. But saying "I'll just address this point, because it is categorically incorrect" was unnecessarily aggressive. With that opening, I think people
137.
▲
by
cakoose
8y ago
> One annoying thing that affects pretty much every database with transactions is that the effort of retrying failed transactions is pushed onto the user, by necessity. > > But if your transactions are airtight chunks of code... th
138.
▲
by
cakoose
8y ago
Projects doing similar things: Atom: https://blog.atom.io/2017/11/15/code-together-in-real-time-w... Xi: https://github.com/xi-editor/xi-editor/blob/master/docs/docs..
139.
▲
by
cakoose
8y ago
The comments in the code make it seem like absolutely no information about the secret is leaked: > /* Again the time of the following two copies is proportional to > * len(a) + len(b) so no info is leaked. */ > memcpy(bu
140.
▲
by
cakoose
8y ago
Exceptions seem less unstructured than "goto". With exceptions, at least everything is strictly nested. And there's a new class of bugs: forgetting to check for an error. In Rust, the compiler won't let you forget. Wi
141.
▲
by
cakoose
8y ago
What do you mean by "eliminated a whole class of bugs"?
142.
▲
by
cakoose
8y ago
Relevant: "Blade: A Data Center Garbage Collector" (2015, https://arxiv.org/pdf/1504.02578.pdf ) Terrible title, but basically the same idea.
143.
▲
by
cakoose
8y ago
That's similar to C++11 std::string, which has a length indicator and a null terminator. (I believe this was often true for std::string implementations before C++11, but apparently C++11 made it a requirement.)
144.
▲
by
cakoose
8y ago
> The character \0 marks the end so we call this zero-termination. [...] The only advantage of this representation is space efficency. Sort of a tangent, but zero termination (aka null termination) can make parsing from a string slightly
145.
▲
by
cakoose
8y ago
You said that instance variables were just as bad as module globals. I was pointing out cases (w.r.t. software engineering, obviously, since that is what this thread is about) where module globals are worse. Yes, programmers have to be awa
146.
▲
by
cakoose
8y ago
> You're going async by using Golang, why not in python? In Golang, you're still using a thread-based abstraction. In Python, "going async" involves switching to a slightly different style of programming and using dif
147.
▲
by
cakoose
8y ago
> If module global variables are considered truly horrible, the same can be said about instance variables inside classes. They are as good (or bad) as module globals in the sense that they represent shared state and can potentially be mu
148.
▲
by
cakoose
8y ago
Mutable variable that have exactly one instance (globally) cause some of the same issues, which is why people might casually lump them in with "global variables". (It would be nice if everyone used more precise terminology, thoug
149.
▲
by
cakoose
8y ago
Yeah, this aspect of CORS is almost never properly explained. First off, it's not about the authentication cookie. It would be simple enough for browsers to just omit cookies in cross-domain requests. Here's an example of a real
150.
▲
by
cakoose
8y ago
Yeah, waiting for Rust's async/await to mature is probably a good idea. But I'm not sure why they didn't just use threaded I/O instead.
More ›