Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tylerhou
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
tylerhou
1y ago
I disagree with the title; loops are tail-recursive functions, but tail-recursive functions are not loops (in the sense that squares are rectangles, but rectangles are not squares). It is true that every tail recursive function can be conve
32.
▲
by
tylerhou
1y ago
If you are willing to return std::optional, clang-tidy has a (static) control flow sensitive check that enforces you check to see the value is valid before unwrapping. https://clang.llvm.org/extra/clang-tidy/checks
33.
▲
by
tylerhou
1y ago
I agree with you that smart people exist, and I have met a few in college as well. The main thing I want to add is that using IQ to quantify intelligence at the top end of the scale is scientifically bogus and in my opinion harmful because
34.
▲
by
tylerhou
1y ago
You should be extremely skeptical of people who claim to have tested IQs above 130 and also believe those tests are not inherently noisy at the top end. Many modern tests lump everyone with 130+ into the same category [1]. An IQ of "ea
35.
▲
by
tylerhou
1y ago
This is a cool project, but it doesn’t address my original issue with Zig, which is that the language’s semantics is not even specified. That is, we cannot define what a “memory safe Zig program is” as we cannot even define what a Zig progr
36.
▲
by
tylerhou
1y ago
Zig is nowhere near memory safe. Even some basic semantics (passing arguments as values or references) are horribly broken. https://github.com/ziglang/zig/issues/5973
37.
▲
by
tylerhou
1y ago
private orgs still benefit immensely from public funding because their researchers are by and large trained by public funding
38.
▲
by
tylerhou
1y ago
Academic language designers do! But it takes a while for academic features to trickle down to practical languages—especially because expressive-enough refinement typing on even the integers leads to an undecidable theory.
39.
▲
by
tylerhou
1y ago
Completeness for FOL specifically says that semantic implications (in the language of FOL) have syntactic proofs. There are many concepts that are inexpressible in FOL (for example, the class of all graphs which contain a cycle).
40.
▲
by
tylerhou
1y ago
> Sure, if you make a bunch of assumptions and manually implement how you think a regex will compile your code, allowing the optimizer to take your compile time implementation and make a finely tuned algorithm specifically for one use ca
41.
▲
by
tylerhou
1y ago
Very late, but I meant it would be hard to summarize the details of the blog post (e.g. QFT implementation) even to the typical math undergraduate. It's not hard to explain the problem, as most math undergraduates will have taken some
42.
▲
by
tylerhou
1y ago
Thanks for reminding me, I meant to also benchmark the interchanged version. I updated the file above with the new benchmark results. The original commenter called `find()` once per vowel, so that's why I benchmarked the regex against
43.
▲
by
tylerhou
1y ago
Putting benchmarks where my mouth is: https://github.com/tylerhou/benchmarks/blob/main/vowels-benc... Writing implementations in C++, using a reasonable encoding of how an efficient regex compiler might
44.
▲
by
tylerhou
1y ago
> in general regexs are very slow I really don't think this is true. If you assume that the string is ASCII, a well-optimized regex for a pattern of this type should be a tight loop over a few instructions that loads the next state
45.
▲
by
tylerhou
1y ago
I think it would be hard to explain the details to a math undergraduate. The high level point is that many algorithms for which quantum speedups are possible can be reduced to the Hidden Subgroup Problem, which requires a few weeks of a gro
46.
▲
by
tylerhou
1y ago
Yes, sorry, superoptimization is the correct term.
47.
▲
by
tylerhou
1y ago
You should look at supercompilation.
48.
▲
by
tylerhou
1y ago
I don't see how a topological sort helps you determine where to place the computation. If an expression A is topologically before an expression B, that does not mean that A always is computed on the path to B. For an example, consider
49.
▲
by
tylerhou
1y ago
In practice, if I have to implement dominators, it's probably for a toy language so I just go with the (fast quadratic) dataflow approach. It's simple to implement if you know what you're doing and if you already have a dataf
50.
▲
by
tylerhou
1y ago
GVN and CSE only identify duplicate/common subexpressions. They do not tell you where to place the computation of the common subexpression. The canonical algorithm to do that is to compute the dominance relation. A node X dominates Y i
51.
▲
by
tylerhou
1y ago
Wouldn’t HDCP prevent viewing content on another device? I assume that is what technology they would use to implement this.
52.
▲
by
tylerhou
1y ago
In higher math (typically 2nd year and onwards at US universities) there is fairly little explicit calculation, and math is more about studying the (formal) relationships between mathematical objects. For example, we can abstractly define t
53.
▲
by
tylerhou
1y ago
You could do something like t”Hello, {“name”}” (or wrap “name” in a class to make it slightly less hacky).
54.
▲
by
tylerhou
2y ago
You know more than fresh graduates, but fresh graduates don’t absorb 100% of the material being taught — more like 50% at best, and many promptly forget that knowledge after taking the final. As someone who went back to school after about f
55.
▲
by
tylerhou
2y ago
Alphabetical is the norm in algorithms theory. It is not the norm in other subfields that I can think of, even theoretical fields like programming language theory.
56.
▲
by
tylerhou
2y ago
Oops, I missed the thousands. So 3 TW, which is larger, going by Google stats, and 20 TW by the other users. So that's not negligible.
57.
▲
by
tylerhou
2y ago
> Wouldn't extracting too much energy from the earth's core cool it down, at least a little bit? The earth generates ~50 terawatts of energy through radiation/other processes, while global energy consumption over the last
58.
▲
by
tylerhou
2y ago
Nit: the correspondence between phi-SSA and basic block arguments is not one to one. With block arguments, you can jump to the same block with different arguments depending on a condition. You can’t do that in SSA without adding new blocks.
59.
▲
by
tylerhou
2y ago
> - Rust's ownership restrictions are harsh. Can we keep the safety and do more? https://www.languagesforsyste.ms/publication/fearless-concur... > -- Should compilers have SAT-solver level proof systems buil
60.
▲
by
tylerhou
2y ago
Is there a specific issue with more context? I looked at the repo already but it’s not obvious which operations are slowest / most important to optimize.
More ›