Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
djacobs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
271.
▲
by
djacobs
16y ago
Ah okay, I think I see your point. The currying example was intentionally Lisp-inspired. I didn't mention this, but I've also just started to program in Clojure--though not for work. As I say, I wouldn't use that last technique in my actual
272.
▲
by
djacobs
16y ago
On Wikileaks: "I think loyalty ... to the greater good, not to a person ... is of utmost important" (my paraphrase of what he said). Yep, I still don't like him. Actually, this was really the only part of the interview where I really didn't
273.
▲
by
djacobs
16y ago
I'm sorry you feel that way. What about that example makes you think I don't understand Ruby? Composing functions (and currying in arguments one at a time) is probably one of the more powerful things you can do with the language. I wasn't s
274.
▲
by
djacobs
16y ago
Duly noted. I asked for alternatives because idiomatic Java eludes me. Thanks.
275.
▲
by
djacobs
16y ago
That's valid. I'm adding it, not moving. That sounded weird for a title, though.
276.
▲
by
djacobs
16y ago
The point is: when I'm writing a script (or better yet, doing this interactively), I don't want error checking. I see an error, and I fix it. This article centers around agile scripting for science, not building enterprise applications or
277.
▲
by
djacobs
16y ago
That's true, but the modifier character* (not more than one) is consistent: & says "take the named method, call to_proc on it, and pass it in as a block". Since many methods allow blocks to be passed to them, this kind of code is useful
278.
▲
by
djacobs
16y ago
I'm using Leiningen at the moment, but I don't like importing my dependencies into my project folder. That's why I said "centralized package management". Is there a way to store all your dependencies in a central non-project-specific folder
279.
▲
by
djacobs
16y ago
I don't think I'd call len pure for OOP. Rather, having a top-level definition--len(array) instead of array.length--gives us functional purity . That is, it discards (or hides) the concept of message passing and treats top-level methods li
280.
▲
by
djacobs
16y ago
I am, in fact, trying my hand at stats in Clojure, to see if it's a viable alternative. I finished the Wilcoxon Rank Sum Test yesterday, and it's ridiculously elegant compared to the current SciPy implementation. Clojure is pretty fantastic
281.
▲
by
djacobs
16y ago
That was just a comment on how easy it is to screw up caching in Rails. I acknowledge it was my fault.
282.
▲
by
djacobs
16y ago
I only know a little bit of Python so far, but I think it's things like the "underscore methods" (__len__, __cmp__, __init__) and the lack of blocks (which give Ruby a kind of elegant unity). I do think, though, that Python's list comprehen
283.
▲
by
djacobs
16y ago
Yes, that's true. And since I used println in the Java example, I guess I should switch the Ruby example to puts. Will do that now.
284.
▲
by
djacobs
16y ago
I'm having cache problems, sorry! (This is my first production app.) The problem should be solved for now, though I had to turn off caching to fix it. Urgh, Rails...
285.
▲
by
djacobs
16y ago
One of my original hesitations about the iPad (especially) was that I couldn't install custom fonts for reading books. It's good to see they've included a range of elegant fonts (though I'd still like the option to add more!)
286.
▲
by
djacobs
16y ago
Agreed. Especially if there's no other (clean) option to accomplish what you want. As always, lucid comments are vital for high-level code.
287.
▲
Ruby is beautiful (but I'm moving to Python)
(allthingsprogress.com)
121 points
by
djacobs
16y ago
|
172 comments
288.
▲
by
djacobs
16y ago
But every so often, our mitochondria and their surrounding cells fight. The result is diseases, such as mitochondrial myopathies (a range of muscle diseases) or Leigh’s disease (which affects the central nervous system). It'
289.
▲
by
djacobs
16y ago
I don't think it's that we don't want humor—there is plenty of that on HN. I think it's that "lmao" is better conveyed (and with less noise, as you say) by an upvote.
290.
▲
by
djacobs
16y ago
Yes. The only reason I chose Clojure over Racket was the increasing popularity of "Practical programming" books for Clojure. Let's see Practical Common Lisp in Racket?
291.
▲
by
djacobs
16y ago
I think part of the issue is that different people expect different functionality from a "standard library". I see three logical divisions within the language we call "Ruby": 1. Core language - Definition of language syntax and literals, re
292.
▲
by
djacobs
16y ago
There are hints of efforts in this area. See rubyinterfaces.com. As an example, their proposed HTTP interface can be found here: http://rubyinterfaces.com/httpi-0.1.0/
293.
▲
by
djacobs
16y ago
I don't believe the second one works. Usually you'd define a method using: def some_method # do something end Usually you'll only use do after a method that's already defined, in order to pass a block of code to it.
294.
▲
by
djacobs
16y ago
You're definitely right, that will work. I guess my point is: the OP seems to be wanting a dynamic way to handle XML at the commandline such that he can handle new types of events on the fly by piping together a parser with other Unix filte
295.
▲
by
djacobs
16y ago
How would this work, exactly? Usually stream parsing requires handler functions, which would imply passing functions at the commandline. I can't think of how you would do this with pipes.
296.
▲
by
djacobs
16y ago
That doesn't really answer my question.
297.
▲
by
djacobs
16y ago
Saying that Java is good because it works on all platforms is like saying anal sex is good because it works on all genders. Okay, let's be clear. Anachronistic != Classic.
298.
▲
by
djacobs
16y ago
Why is this being served over port 8800?
299.
▲
by
djacobs
16y ago
I think language will be a big decider here. Language comprises most rhetoric, which in turn defines politics. And unfortunately politicians are going to be the ones who make key decisions in this debate.
300.
▲
by
djacobs
16y ago
The problem is that it is easier to jump to a conclusion than it is to stop and think. Which is, in some ways, a theme in Brave New World .
More ›