Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
frankpf
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
frankpf
8y ago
> I don't buy these hypotheticals and also I don't believe in this kind of anecdotal evidence. The only anecdotal evidence I've linked is Stripe's experience with Sorbet. The paper linked is an actual scientific analy
32.
▲
by
frankpf
8y ago
> But how much value does TypeScript add? All evidence points to the fact that TypeScript does not have any positive effect on bug density. Its value is purely subjective and speculative. This is objectively false. There is plenty of evi
33.
▲
by
frankpf
8y ago
Hey, do you plan on opening internship positions in the future?
34.
▲
by
frankpf
8y ago
Where can I apply to fall and winter internships? I didn't find them in https://www.sumologic.com/company/careers/ .
35.
▲
by
frankpf
8y ago
For types like those which are outside your control you can use type guards[1]: if (value == null) { // TS knows value is null, doesn't let you access value .length for example } else if (Array.isArray(value
36.
▲
by
frankpf
8y ago
I use tsconfig's `paths` in combination with the `require-rewrite` npm module ( https://github.com/IUnknown68/require-rewrite ). Here's an example: // tsconfig.json ... "paths"
37.
▲
by
frankpf
8y ago
I like TypeScript's syntax, but I think the way function types are declared is ugly. If you have a function from A to B, you have to declare its type as type MyFunction = (arg1: A) => B instead of type MyFunction = A
38.
▲
by
frankpf
8y ago
TypeScript has ADTs, non-nullable types and the tooling is one of the best (great autocomplete, support for refactorings, incremental compilation, yarn is a great package manager, etc). Its type system is also one of the most advanced in ma
39.
▲
by
frankpf
8y ago
I don't think TypeScript follows semver. TypeScript 2.9 is not compatible with 2.8.
40.
▲
by
frankpf
9y ago
I am using `Named` as an argument. In structural type systems, what matters is the type structure. It's not duck typing because it's checked at compile-time. If I change the type of "Named" to have the fields `firstName`
41.
▲
by
frankpf
9y ago
What do you mean by redefining? I'm not redefining the type of "name". If you want to get compile-time checking that `Person` implements `Named`, you can use `class Person implements Named`. Even better than that, you don
42.
▲
by
frankpf
9y ago
What you want to do is possible with a structural type system. In structural type systems, type compatibility is based on the structure of the type instead of the name (as opposed to nominal type systems). An example in TypeScript: i
43.
▲
by
frankpf
9y ago
IMO, having functions that accept different types (when the types are unrelated) is an anti-pattern in most cases, it doesn't matter if you make it more "maintainable" by using single dispatch. It's fine when you have re
44.
▲
by
frankpf
9y ago
Can you clarify on those problems?
45.
▲
by
frankpf
9y ago
> [...] pypy, a tracing jit for python2 and python3, is another project which gets compiled to C. That's interesting. How does it work? I think most JIT compilers emit assembly directly and then execute it. Does PyPy generate C code
46.
▲
by
frankpf
9y ago
Maybe you can show us this magic hardware that can crack millions of bcrypt hashes in seconds? EDIT: Besides, bcrypt is not even the "best" hash function we have available. If you're concerned about GPUs and FPGAs, there'
47.
▲
by
frankpf
9y ago
> In the real-world, at scale the only relevant metric to his cost is the entropy of the password, which iterative hashing doesn't magically increase. > If you find it cost-effective to slap a `for (i = 0; i < 10^12; i++)` loo
48.
▲
by
frankpf
9y ago
Definitely do not use SHA256, it's designed to be fast. That's the opposite of what you want when storing passwords. I don't understand what's the problem with scrypt, but if you don't want to use it there's al
49.
▲
by
frankpf
9y ago
>Yes and no. Curried-by-default is the source of a lot of Haskell's power, and that requires a certain amount of unusual ordering. The terseness of pointfree style is worth some learning time. Correct me if I'm wrong, but you d
50.
▲
by
frankpf
9y ago
Can you elaborate on why cores / 2 is the "ideal" number for throughput and latency?
51.
▲
by
frankpf
9y ago
Hey there, Reason is a great project! Thanks for working on it! I actually tried to use it very recently in a new project at my workplace, but unfortunately I decided not to. I found some fundamental things were lacking. I didn't find
52.
▲
by
frankpf
9y ago
A little off-topic, but the author of this paper (Daan Leijen) is also the author of Koka[1], a programming language with algebraic effects. IMO, Koka (or something similar) has more potential to become a mainstream language than "trad
53.
▲
by
frankpf
9y ago
It also failed because, at least 6 years before Itanium was even released (2001), there were better, faster options available. In 1995, the Pentium Pro featured out-of-order and speculative execution[1]. This has two main advantages over th
54.
▲
by
frankpf
9y ago
> Of course instruction parallelism should be in the hands of the compiler -- it has so much richer information from the source-code so it can do a better job. This is not true. Yes, the compiler has a lot of useful information, but it d
55.
▲
by
frankpf
9y ago
Would you mind elaborating on some of those practices (specifically, the problems that made working on the first codebase abhorrent)?
56.
▲
Idris: Towards Version 1.0
(idris-lang.org)
2 points
by
frankpf
10y ago
|
0 comments
57.
▲
by
frankpf
10y ago
> Most languages only have higher-order procedures, not higher-order functions. What do you mean by that?
58.
▲
Taking PHP Seriously
(slack.engineering)
3 points
by
frankpf
10y ago
|
1 comments
59.
▲
A story of compromises and types
(crystal-lang.org)
3 points
by
frankpf
10y ago
|
0 comments
60.
▲
by
frankpf
10y ago
QBE[1] seems to be what you're looking for. It "aims to be a pure C embeddable backend that provides 70% of the performance of advanced compilers in 10% of the code". Previous discussion on HN: https://news.ycombin
More ›