Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
icen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
91.
▲
by
icen
9y ago
But how many of them come from the rendering engine?
92.
▲
by
icen
9y ago
There's always the `unsafe` escape hatch - if you need to potentially alias mutable pointers, you can (via using the 'raw pointer' types ` const T` and ` mut T`). You can only do this in an `unsafe` block. If you get a bug ca
93.
▲
by
icen
9y ago
For good reason! This is Rice's theorem.
94.
▲
by
icen
9y ago
Such a structure is called a Zipper, for anyone wanting to look into it further.
95.
▲
by
icen
9y ago
The &* thing is due to Deref coercions. The deference operator is a trait (Deref), which has an associated type that it dereferences to. This lets you do nice things, like dereference a Box<T> to just a T, and let the Box implemen
96.
▲
by
icen
9y ago
Conflating these seems a bit disingenuous. It seems plausible that you can innately know your sex, and that this comes with some behaviour. It's not the same as saying that girls being associated with the colour pink isn't a socia
97.
▲
by
icen
9y ago
Introduction to category theory via haskell, and not learning the right areas of abstract algebra? It's plausible to even do a degree in mathematics and never encounter the name 'monoid' - you'll obviously encounter the
98.
▲
by
icen
9y ago
The author has a bunch of similarly named projects (Morte, Annah).
99.
▲
by
icen
9y ago
evil-mode
100.
▲
by
icen
9y ago
You should check out magit, as well.
101.
▲
by
icen
9y ago
As in, it is still 20 years ahead of its time, or was it's moment somewhere in the 80s?
102.
▲
by
icen
9y ago
The 'abusiveness' is the use of `>>=` as a constructor , instead of its more standard role as member of an interface. The author is using it to take advantage of syntactic sugar that is now reliant only on names and types,
103.
▲
by
icen
9y ago
And this is the case in Idris, where `cast` is a member of the `Cast` interface, and there's an implementation of `Cast String Integer`. `cast` is a function `String -> Integer`, instead of the (more sensible) `String -> Either I
104.
▲
by
icen
9y ago
A really helpful edit would be the V1 and V2 macro expansions; then it's fairly straightforward C with an odd naming scheme.
105.
▲
by
icen
9y ago
It's a tiny interpreter. You can create vectors, add them, concatenate them, store them to variables, count their lengths, and so on. An example session: x=~5 5 0 1 2 3 4 y=x,x 10 0 1 2 3 4 0 1 2 3 4 x+y
106.
▲
by
icen
9y ago
Somewhat facetiously: fn identity<T>(t: T) -> T { t } Has no trait bounds, and is clearly generic. You typically can't do very much with completely free type variables, but Rust has syntactic support for them.
107.
▲
by
icen
9y ago
This language is brilliant - at first, it's difficult to believe that such a simple numerical scheme is a programming language. Once you look a bit deeper, you see it's a very clever encoding of a register machine.
108.
▲
by
icen
10y ago
Surely philosophy of science helps you build your framework of verifiable, falsifiable statements (after all, you need to have a logical framework for choosing which statements can be falsified or verified)!
109.
▲
by
icen
10y ago
So it's something that's not a scientific hypothesis, but is considered knowledge! (Or, if as in the other comment chain, 1+1=2 is too obvious, you can take any sufficiently non-trivial theorem of your choosing).
110.
▲
by
icen
10y ago
But all that says is that 1+1=2 is too obvious. How about some other, less straightforward mathematical theorem, then, like Fermat's Last Theorem. You can hardly accuse that of being an axiom, or just introducing frameworks of thought.
111.
▲
by
icen
10y ago
How do you go about testing the hypothesis that 1 + 1 = 2? Not just showing that a particular physical representation obeys the logical laws of arithmetic, but to test the actual laws themselves.
112.
▲
by
icen
10y ago
1+1=2 And no, apples are not the same things as numbers.
113.
▲
by
icen
10y ago
You can also give up recursive enumerability. `True Arithmetic`, which takes as axioms all of the true statements in PA is certainly complete and consistent.
114.
▲
by
icen
10y ago
This is a strange argument, because all of that rhetoric is status quo - people do argue (or argue via proxy; the words are different, but the substantive claims are the same) that people already receive enough. If that's the problem w
115.
▲
by
icen
10y ago
If a struct is public, and all its members are public, you can just create a new instance of the struct with braces (in that case, it would be `OpenSocket { data: 12 }` - or whatever value you like), not what is necessarily correct. By havi
116.
▲
by
icen
10y ago
λ calculus is left associative - that is, a sequence of applications A B C is interpreted as (A B) C, so we first reduce (λf x. f (f x)) (λy.* 2 y), yielding λx . (λy. * 2 y) ((λy.2 * y) x), and only then apply 5 to it, which finally lets u
117.
▲
by
icen
10y ago
(Not the OP) I don't know of any examples of using JSON to create types, but here [0] is a practical example of creating types dynamically from input, via writing a type-safe printf: [0]: https://youtu.be/fVBck2Zngjo
118.
▲
by
icen
10y ago
Idris, unlike Haskell, is strict, which has the general effect of making Idris' performance a bit more predictable, and a bit more like programming in other languages. However, GHC is a phenomenal compiler, and can outperform Idris for
119.
▲
by
icen
10y ago
Brief nitpick: Idris and Agda both have codata constructions, and in Idris (at least, I'm not familiar with Agda) it is supported by the totality checker.
120.
▲
by
icen
10y ago
This is why `f` is really my workhorse key in vim.
More ›