Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kbp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
32 ms
·
271.
▲
by
kbp
9y ago
In Smalltalk, the 'keywords' are actually part of the method name; when you say '1 to: 10 do: [ ... ]', you're not calling to: on 1 (which is an entirely different method) with a keyword argument, you're callin
272.
▲
James Gosling's explanation of why Java's byte is signed
(stackoverflow.com)
1 points
by
kbp
9y ago
|
0 comments
273.
▲
by
kbp
9y ago
That quote is actually by Doug McIlroy, who also gave this longer phrasing of it: "Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid
274.
▲
by
kbp
9y ago
This is entirely true, but it's also worth mentioning that English varies more than it gets credit for, too. Plenty of vocabulary, expressions, and even grammar differ by dialect, and if one isn't making an effort to speak in stan
275.
▲
by
kbp
9y ago
> So they check .bash_history and then they realize they just need to also `alias /usr/bin/sudo`. $ alias /usr/bin/sudo=whatever bash: alias: `/usr/bin/sudo': invalid alias name
276.
▲
by
kbp
9y ago
What was radically different about C when it was released? It doesn't seem to stand out that much to me from the backdrop of BCPL, Algol, Bliss, Pascal, etc.
277.
▲
by
kbp
9y ago
Common Lisp allows integer types of however many bits you want using SIGNED-BYTE and UNSIGNED-BYTE (don't let the names confuse you; a byte isn't necessarily 8 bits): CL-USER> (the (unsigned-byte 5) 31) 31 CL-USER
278.
▲
Learn You Some Erlang for Great Good
(learnyousomeerlang.com)
2 points
by
kbp
9y ago
|
0 comments
279.
▲
by
kbp
9y ago
> Quite often, the error message in Go will be clear and to the point. On the other hand, I've seen plenty of assertion based tests in other languages that report inane things like "1 != 2" or "true != false" whe
280.
▲
by
kbp
9y ago
Even on the Gameboy things aren't quite as simple and self evident as all that, for example from another thread on this post: when the Game Boy's screen is rendering (i.e. almost all the time), the CPU doesn't have access to
281.
▲
by
kbp
9y ago
This guide is great; most of it is just as applicable to programming in general as it is to Lisp. One thing that stands out to me as a good way of phrasing something is "Documentation strings are better than comments." Even in som
282.
▲
Tutorial on Good Lisp Programming Style (1993) [pdf]
(cs.umd.edu)
7 points
by
kbp
9y ago
|
1 comments
283.
▲
Sibling Rivalry: C and C++ (2002) [pdf]
(stroustrup.com)
1 points
by
kbp
9y ago
|
0 comments
284.
▲
by
kbp
9y ago
> I always viewed design patterns as providing a shared name for common solutions to common problems. And that forcing a common solution to a range of different problems was a misuse of them. Exactly, a design pattern is just that: a pat
285.
▲
by
kbp
9y ago
Em dashes should always be treated as a wordbreak, though; is that much software really broken regarding them? Just as a quick test with what I have installed on this computer, grep, Emacs (in fundamental-mode and text-mode) and LibreOffice
286.
▲
by
kbp
9y ago
> What would you consider a modern feature? For starters: one that was thought up (or at least added to the language, if we're being that context-sensitive) more recently than 30 years ago. > No language can be considered modern
287.
▲
by
kbp
9y ago
> I agree on confirmation bias, but the actual correlation appears to be that people from more wealthy backgrounds tend to do better in interviews. > Anyone who uses MacOS (ie. can afford a MacBook Pro) to work on has to have enough m
288.
▲
by
kbp
9y ago
> If I remember correctly, clos had a strange naming connection that included the type in the symbol name CLOS is built around multiple dispatch, so there isn't any type to go in the method name if you wanted; methods don't bel
289.
▲
by
kbp
9y ago
> Modern Scheme has: > * Lazy, immutable, mutable subsets > * Hygenic and unhygenic macros > * Fast and simple error handling > * Fast and simple compiling and evaluation > * Tail call elimination > * Procedures, closur
290.
▲
by
kbp
9y ago
> If CoffeeScript added an (optional) type system I'd switch back in an instant. The home page talks a little about achieving this by using Flow annotations in Coffeescript source and then having the build system pass the Javascrip
291.
▲
by
kbp
9y ago
> Java has (or had?) a similar issue with comparing boxed Ints -- equality checks for object level equality while inequality compares the values. In Java 5 and up, 'new Integer(1) < new Integer(2)' will return true, because
292.
▲
by
kbp
9y ago
Python 2 has some strange behaviour of its own with regards to comparing objects of different types, for example: >>> None < 0 True >>> '0' > 0 True Granted, this follows a much simpler
293.
▲
The Little Book of Semaphores (2016) [pdf]
(greenteapress.com)
150 points
by
kbp
9y ago
|
33 comments
294.
▲
by
kbp
9y ago
If an excellent language doomed to obscurity is one that offers "a lot of features which require a lot of discipline by the programmer," and for the mediocre-only mainstream languages "all their features are comprehensible by
295.
▲
by
kbp
9y ago
> COND is basically unreadable in any Lisp, you'd very rarely see people use it today. In CL you'd have more readable options like IF, WHEN and UNLESS. I wouldn't say "very rarely"; COND is still used for multi-w
296.
▲
by
kbp
9y ago
> Its mostly about inconsistent naming, order of arguments Do you have some examples of inconsistent order of arguments? I'm not really doubting you, I just can't think of any examples.
297.
▲
by
kbp
9y ago
M-expr syntax wasn't homoiconic.
298.
▲
by
kbp
9y ago
Why not Racket? It has a similar emphasis on immutable, functional programming, it's also a Lisp-1 (I assume that's what you mean by "syntax for function parameters"), and the different syntax for data-structure literals
299.
▲
by
kbp
9y ago
> Why are you bringing up the fixed point combinator? I didn't mean the fixed point combinator, I was responding to "So all recursion is equivalent to a for loop + a stack." A recursive algorithm implemented with a for loo
300.
▲
by
kbp
9y ago
> Apparently this concept is not even believed by the majority of people on this thread if you read the whole thing. > I originally stated that for loops and HO functions are equivalent and this entire thread consists of people disput
More ›