Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
herdrick
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
301.
▲
by
herdrick
16y ago
I don't understand you. If you don't like to write boilerplate, why do you appreciate Clojure making mutation verbose? There are times when the imperative style is more natural.
302.
▲
by
herdrick
16y ago
'replace-in-form' is a tree-replace, which in Clojure is done with clojure.walk/postwalk-replace. The clojure.walk package is basically tree-map stuff. Sadly, as far as I know, you need to roll your own tree-reduce.
303.
▲
by
herdrick
16y ago
Also, where did you find reset! ? It's not on the atoms page in the main documents.
304.
▲
by
herdrick
16y ago
Ah, thank you. But what I really want it something that doesn't require dereferencing syntax: (zet! c (* c x))
305.
▲
by
herdrick
16y ago
OK, thanks for the tip about atoms. I hadn't dug into the var/atom/ref/agent docs. I should have before commenting. What I was looking for can be done with atoms, and is made more like traditional lisp mutation by defining a "st!" (or may
306.
▲
by
herdrick
16y ago
It's not totally true, either; there are other ways to do state in Clojure. But none of them simply let the programmer, you know, change the state of a variable.
307.
▲
by
herdrick
16y ago
... any time a Clojure programmer want's to change the state of a variable, they must do so using the same kind of transaction management as they would use for a database. Not a good thing. The word 'must' is the glaring red flag.
308.
▲
by
herdrick
16y ago
Agreed. For example on pattern matching it's arguably the leader. But it's weak on others, like first class environments.
309.
▲
by
herdrick
16y ago
Probably they are reacting negatively because California wouldn't seem to have a revenue problem. It's number 6 in % of income taxed. http://blogs.law.harvard.edu/philg/2010/01/10/visit-to-berke...
310.
▲
by
herdrick
16y ago
Right, that's part of 'worse is better'. Easier to build the system, harder to program well on it. EDIT: I wrote that before reading. The title isn't very relevant to the post.
311.
▲
by
herdrick
16y ago
There are estimates that 80% of the world's data are processed by mainframes. Pretty clueless estimates I'd have to think.
312.
▲
Rethinking 'Fuck You' money
(tonywright.com)
164 points
by
herdrick
16y ago
|
168 comments
313.
▲
by
herdrick
16y ago
Where's the rest?
314.
▲
by
herdrick
16y ago
splashup.com does. anywhere.fm did.
315.
▲
by
herdrick
16y ago
(frequencies "abcaaabcccaabrrcb")
316.
▲
by
herdrick
16y ago
By responding to fewer of them, more slowly, that's how.
317.
▲
by
herdrick
16y ago
Really? OK, that's interesting. I guess I prefer speakable ones too.
318.
▲
by
herdrick
16y ago
Ah, interesting, thanks. Well, it looks like I'm wrong about what Tufte meant by information density. In that case Tufte wouldn't say that information density is the only thing. "Every pixel doing work" != good design. But I definitely he
319.
▲
by
herdrick
16y ago
The original UI is quite usable. When I started using Stack Over Flow, navigation was a headache as the links weren't clear. I'm accustomed to it now. Those two consecutive sentences would seem to be from different reviews.
320.
▲
by
herdrick
16y ago
(First let me say that I admire Jeff Atwood and his work. That doesn't mean he has made no mistakes.) Jeff launched this thing by tuning it for what he wanted in a Q & A site. Since he is exactly the sort of early adopter they neede
321.
▲
by
herdrick
16y ago
map is already a short identifier and a real word This is heresy, but I actually think it might be better if it weren't a real word. I find I benefit from inventing names for functions or data abtractions. It helps to clear the mind of
322.
▲
by
herdrick
16y ago
Chill, son He was perfectly calm. No need for that. Let's keep things polite here.
323.
▲
by
herdrick
16y ago
Right. That's what I said in the footnote, [3].
324.
▲
by
herdrick
16y ago
Sorry, I don't understand what you're asking. The way it works now is: each document is read and summarized into a bunch of word frequencies, once. It looks like each is being read many times, but since I'm memoizing, it only happens once
325.
▲
by
herdrick
16y ago
Without profiling it I'd guess it's memoizing the function that does the disk i/o that makes the biggest difference.
326.
▲
by
herdrick
16y ago
That's a pretty old debate. I think brevity does a lot for clarity, and the more you work at making your code brief the better you'll be at reading brief code. Of course if other people are reading your code then you should consider what c
327.
▲
by
herdrick
16y ago
Regarding Haskell, yeah I thought as much. When writing this code I thought, "This would all be better, or maybe nearly automatic, in a purely functional language". Regarding Arc, there's still a distinction, since as you point out you can
328.
▲
by
herdrick
16y ago
Yep, that'd be better. I didn't want to have to explain a macro, though I guess anyone bothering to read the code can handle a simple macro. Thanks, maybe I'll change that.
329.
▲
by
herdrick
16y ago
It's worth trying; I hope somebody does.
330.
▲
by
herdrick
16y ago
You're right. Good enough now?
More ›