Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
asQuirreL
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
91.
▲
by
asQuirreL
11y ago
It took me until: > Hashes are always O(1) reads, inserts and writes. To realise that this was a joke.
92.
▲
by
asQuirreL
11y ago
You don't know ruby yet .
93.
▲
by
asQuirreL
11y ago
In fairness, the donation is not monetary. It is probably more aptly described as "Contribution".
94.
▲
by
asQuirreL
11y ago
As already suggested, function pointers are a particularly memory inefficient way to represent instructions/opcodes. But on top of that, there is another issue with this representation: Your interpreter will very likely be dog slow, be
95.
▲
by
asQuirreL
11y ago
Hmmm... So the article seems to suggest that for every insertion of a character, a log time lookup is made. Is that really the case? If so, why is the leaf node that the cursor is in not saved? If you were to use a B+-tree implementation th
96.
▲
by
asQuirreL
11y ago
Personally, when I say "excuse me" on the pavement, I'm being sincere :) the space is no more mine than it is their's. But, I think all of this varies based on the culture of your immediate surroundings (for context, I l
97.
▲
by
asQuirreL
11y ago
What visual programming languages do is lower the barrier for entry . Once you're hooked, and you begin gaining experience, you will naturally understand the limitations of the platform. By being inquisitive, you will realise that the
98.
▲
by
asQuirreL
11y ago
The question is probably more aptly written as "Take the width, height and depth of a cuboid in centimetres, and return its volume in litres".
99.
▲
by
asQuirreL
11y ago
Nice writeup! One thing though, I believe Rust's BTreeMap [1] is a B-Tree (not a binary tree, as suggested), i.e. it's a tree whose branch factor is generally greater than 2. The docs say that if you don't give a branch facto
100.
▲
by
asQuirreL
11y ago
AFAICT Swift does the sensible thing to maintain backwards compatibility with ObjC: When Swift code calls Swift code, the dispatch is static (a jump, and some stack fiddling, when you're counting the change). But if it's interfaci
101.
▲
by
asQuirreL
11y ago
So the example I have in mind is that of a Randomised Binary Search Tree (or Treap, if you want). Its interface is pure, however it requires access to an RNG for insertions. Because of this, it cannot be treated as a pure collection: you ne
102.
▲
by
asQuirreL
11y ago
There doesn't need to be an overhead to this extra type disciplining of side-effectful computing. It is perfectly possible for the compiler to take the pure monadic code and implement it with actual side effects (which I believe GHC
103.
▲
by
asQuirreL
11y ago
I guess I should clarify and say "What sort of a cache would use IO and make a pure function impure?". Even if the cache is so large that it doesn't fit in memory, its behaviour would still be referentially transparent.
104.
▲
by
asQuirreL
11y ago
What sort of a cache would use IO? Not any cache I've heard of. (Genuinely interested)
105.
▲
by
asQuirreL
11y ago
Kozen's book that has been mentioned is very good. I also recommend Sipser's "Introduction to the Theory of Computation". It goes from Deterministic Finite Automata (equivalent in power to regular expressions in their pu
106.
▲
by
asQuirreL
12y ago
Well, if you want file `X` then you can ensure you find the minimal set of files to produce `X` from your given rules using Horn-SAT by adding `and X` to the Horn Formula representation of the build rules. Pretty neat!
107.
▲
by
asQuirreL
12y ago
To build on the pedantry, make would be traversing a restricted form of directed acyclic hyper -graph, no? The edges are between sets of vertices to a single vertex. I found these structures cropping up alongside Horn clauses, and Context-
108.
▲
by
asQuirreL
12y ago
...or those with pacemakers? ;)
109.
▲
by
asQuirreL
12y ago
Nobody's saying that the best way to implement the fibonacci sequence is using CPS, but in this instance it is a great example of what to do when converting a function with multiple recursive calls into CPS. Sometimes, if you want an
110.
▲
by
asQuirreL
12y ago
The issue with arguments of the form "Mutation is..." is that all these things are models of mutation: merely representations. Different models help us elucidate different properties of the same underlying phenomena. This does not
111.
▲
by
asQuirreL
12y ago
Yes, exactly this. Different tools are good for different abstraction levels. Nobody expects people to write applications entirely in assembly anymore, because we have higher levels of abstraction, but that doesn't mean assembly is goo
112.
▲
by
asQuirreL
12y ago
Perhaps some notion of entropy would be useful here? Normal information theoretic definitions of entropy usually rely on "bits of entropy". I.e. if you are given information in the form, "Should I compare %s to a summer'
113.
▲
by
asQuirreL
12y ago
You're right `h :: a -> c`.
114.
▲
by
asQuirreL
12y ago
This idea has been knocking around the collective consciousness of computer science for a while now. For example, the SECD machine [1], a virtual machine for functional programming languages to target. Then there are also examples of people
115.
▲
by
asQuirreL
12y ago
You're right, this kind of study is really hard to set up properly. However, in this instance, I'm more concerned by the quality of the analysis. It seems to be, ignoring actual data in favour of anecdotal evidence, even when they
116.
▲
by
asQuirreL
12y ago
After reading the paper [1] regarding the empirical study on TDD, I'm pretty dubious about how well backed the conclusions are. If you look at Table 2, in the 4 case studies, 2 of the projects took longer with TDD (2.00x, and 2.64x rat
117.
▲
by
asQuirreL
12y ago
There does seem to be a method/interface system (Under the "Methods, Protocols, Implementations" header). And it seems to have some sort of dispatch system for tagged structures that can be later modified by the user.
118.
▲
by
asQuirreL
12y ago
The length of the program isn't necessarily correlated with the amount of time it takes to write it, or more importantly, understand it ;)