Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rntz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
44 ms
·
391.
▲
by
rntz
16y ago
You have your Prolog backwards. foo(X) :- bar(X). means that foo(X) is true if bar(X) is true, not the other way around. So your code would indicate that anything that's not a law is unconstitutional, and anything unconstitutional pr
392.
▲
by
rntz
16y ago
The two most common operations on lists in typical functional programs are consing and deconsing, which are O(1). The most analogous operations on trellises are appending and removing the tail element, which are O(log n). So it seems inapp
393.
▲
by
rntz
16y ago
Read the sentence before that: > This also makes it possible to store only a single copy of short strings, to improve memory efficiency, cache locality, and so on. He's specifically talking about interning strings. He even links to the
394.
▲
by
rntz
16y ago
ENOENT (I don't have a mouse on my laptop. I have a touchpad, and it is able to scroll by swiping or circular motions, but that didn't work on the page when I tried it.)
395.
▲
by
rntz
16y ago
I'm not able to scroll. No scroll bar appears, page-down and page-up don't work. chromium-7.0.517.41 on linux. Anyone else have this problem? Am I missing something?
396.
▲
by
rntz
16y ago
baaa.ww.com CNAME baaaww.rntz.net Thanks in advance!
397.
▲
by
rntz
16y ago
That's because of the way Arc does if-expressions. In Scheme and Common Lisp, you have two conditional forms: 'if and 'cond. 'if takes three arguments (or two, with an implied nil, in CL), and is analogous to an if-then-else in other langua
398.
▲
by
rntz
16y ago
True, but someone who just wants to hurt someone is going to pick on whoever stands out.
399.
▲
by
rntz
16y ago
Boyer-Moore is a great algorithm, but it's for fixed-string searching. grep, in the general case, handles regular expression searching. Is there some way to extend Boyer-Moore to regular expressions that I'm unaware of? Or is GNU grep's use
400.
▲
by
rntz
16y ago
It doesn't excuse, but it does explain -- hence, it shouldn't be surprising. Deplorable, perhaps, but not surprising.
401.
▲
by
rntz
16y ago
Uh, actually, his original program ( http://www.cygwin.com/ml/cygwin/2005-08/msg00542.html ) did restore the stack pointer before returning from main. He "wanted to cut [the example's size] down for the sake of the mailing list", so he left
402.
▲
by
rntz
16y ago
It has been corrected for.
403.
▲
by
rntz
16y ago
insert is fold, just underspecified (what happens on 1- or 0-element lists? in what direction does the operator associate?). The only difference in comprehensibility is in the language being used to describe the operation - which is certa
404.
▲
by
rntz
16y ago
False. The I-expression: lambda (x y) display x + x y corresponds to the S-expression: (lambda (x y) (display x) (+ x y))
405.
▲
by
rntz
16y ago
I agree that using emacs for everything is not for everyone. But with regards to switching between buffers being cumbersome: 1. If you're not willing to change your keybindings to taste, Emacs basically isn't for you; its default bindings
406.
▲
by
rntz
16y ago
The real reason that parenthesis-stacking is the norm is twofold: a) Trailing parentheses just look ugly. I can't really explain why - perhaps it's merely a cultural thing, come about only because lispers are so used to looking at stacked
407.
▲
by
rntz
16y ago
You don't need "deep ivory-tower CS training" to have knowledge of computer science. I don't know why anyone would be offended to be called a computer scientist; it's not like being such precludes being an excellent programmer, nor does bei
408.
▲
by
rntz
16y ago
This is a Good Idea, but it doesn't help you understand other people's code if they don't follow it. Hence the need for a mnemonic rule.
409.
▲
by
rntz
16y ago
Following the procedure as written: +-------+ | +-+ | | ^ | | char *foo[10][20]; ^ ^ | | | +---+ | -----------+ It mentions, in rule 1, handling tokens of the form [] or [X]
410.
▲
by
rntz
16y ago
Fails on nested arrays. char *foo[10][20]; The method described would indicate that this is a array 10 of pointers to array 20s of chars. This is incorrect. It is an array 10 of array 20s of pointers to chars.
411.
▲
by
rntz
16y ago
Testing them all on -9 is perhaps not a fair comparison. For example, according to http://changelog.complete.org/archives/931-how-to-think-abou... , gzip -9 saved a tiny amount of space compared to gzip's default, but took significantly lo
412.
▲
by
rntz
16y ago
http://en.wikipedia.org/wiki/Maya_(illusion) I'm not sure which part you didn't understand; this is my best guess. I believe the author is trying to say that syntax is a superficial appearance, and not relevant to - indeed, a distraction
413.
▲
by
rntz
16y ago
Using a worse ( ahem sorry, "dis-preferable") language isn't like playing an easier part. You're still expected to solve the same problems, just in a different way. It's more like trying to wheeze out the same piece on a beat-up second-han
414.
▲
by
rntz
16y ago
There's already a term - "spaceship" - for patterns which, after a certain number of generations, are translated images of themselves. Indeed, the forum post by the pattern's author describes it as such. However, it seems that the mechanism
415.
▲
by
rntz
16y ago
I'd like to see a transcript of the letter this was written in response to.
416.
▲
by
rntz
16y ago
"Touched the whole spectrum"? Hardly. What about logic programming languages (eg. Prolog), stack-based programming (eg. Forth), concurrent programming (eg. Erlang)? And that's leaving out more esoteric ideas like FRP (Functional Reactive Pr
417.
▲
by
rntz
16y ago
Some of the things he mention have nothing to do with Unix or Posix. __sync_*, for example, are gcc-specific. Similarly, F_GETLEASE, F_SETLEASE, and F_NOTIFY are Linux-specific fcntl() operations. And as far as I can tell, the -T option isn
418.
▲
by
rntz
17y ago
I have to say, I hope the future looks a lot less like Movie OS and a lot more like the Anti-Mac: http://www.useit.com/papers/anti-mac.html
419.
▲
by
rntz
17y ago
The use case mentioned can be fulfilled by another feature ruby already has, if I'm not mistaken: first-class continuations. Simply have "return" be syntactic sugar for invocation of a contination that is implicitly created by a "def"-defin
420.
▲
by
rntz
17y ago
The actual payoff matrix the experimenters used is here: http://www.plosone.org/article/slideshow.action?uri=info:doi... It does follow the rules of prisoner's dilemma, as far as I can tell. (Found via the link to the original paper, htt
More ›