Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kbp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
44 ms
·
361.
▲
by
kbp
10y ago
You're confusing things a little bit. 'char s[] = "foo"' is equivalent to 'char s[] = { 'f', 'o', 'o', '\0' }' and gives you a normal mutable array (or you can make
362.
▲
by
kbp
10y ago
> I think it's more likely the reaction to someone who uses magic languages that perform complicated actions over a simple assignment. If you think of C as a high-level assembly language whose assignment instruction is converted int
363.
▲
by
kbp
10y ago
Or in Lisp one could write #1=(1 . #1#), eg: CL-USER> (subseq '#1=(1 2 3 . #1#) 0 10) (1 2 3 1 2 3 1 2 3 1)
364.
▲
by
kbp
10y ago
void * isn't related to void (or this discussion), they just reused the keyword.
365.
▲
by
kbp
10y ago
Technically, the Common Lisp standard leaves it up to the implementation what to do with type declarations--in practice, I get compile time warnings for violating them (as well as for violating inferred types). Type declarations will not le
366.
▲
by
kbp
10y ago
Common Lisp, Racket, and Clojure all have optional static typing.
367.
▲
by
kbp
10y ago
> Well, it was. Specifically, Common Lisp was. But that language's standard was etched in stone in 1994 whereas languages like Python (where most deep learning user-facing code is done) continue to evolve. This is an apples to orang
368.
▲
by
kbp
10y ago
What "high weirdness"? Sets in most languages that have them do not support indexing, because they're usually understood to be unordered. Aside from that, there is a method to convert a list to a set. What are you confused ab
369.
▲
by
kbp
10y ago
If you get 100% of your software through the package manager, sure. If not, then manually uninstalling things that have been standard on Unix since version 1 isn't very smart.
370.
▲
by
kbp
10y ago
ed is used somewhat commonly by other programs too, so uninstalling it can break things.
371.
▲
by
kbp
10y ago
You might be interested in the FSet library (among others): https://common-lisp.net/project/fset/Site/index.html
372.
▲
by
kbp
10y ago
> for example there is not one mapping procedure for lists and another mapping procedure for arrays. In Common Lisp, MAP works just as well on either.
373.
▲
by
kbp
10y ago
> I know one can easily (more or less) follow along PCL and do the solutions in Clojure. Maybe for the first chapter or two, certainly not most of the book. They're very fundamentally different languages.
374.
▲
by
kbp
10y ago
SBCL is very good and what most of the open source community uses. Clozure CL is also very good, reasonably popular, and has good Cocoa support. LispWorks is excellent, but proprietary; the paid versions are very expensive but there is a fr
375.
▲
by
kbp
10y ago
> I remember tinkering with Scheme when I was much less experienced, and getting hung up on the constant recursion and singly-linked nature of the iterables. No one writes code like that in Common Lisp. Both Scheme and CL have more than
376.
▲
by
kbp
10y ago
Clojure is pretty drastically different from Lisp in most ways. If you wrap your head around macros in Clojure that will mostly carry over to CL, but just about everything else will be a learning experience. They're both very cool lang
377.
▲
by
kbp
10y ago
There are at least 5 or 6 major Lisp implementations that follow the standard very closely. They might have the odd quirk, and they all have extensions, but ANSI CL also provides a standardised way to handle implementation-specific parts. T
378.
▲
by
kbp
10y ago
Nitpick: i += 1 is equivalent to ++i, not i++. i += 1 returns a value, too.
379.
▲
by
kbp
10y ago
> One more thing; The article should have mentioned "pointer increment" which has nothing to do with "+= 1". What do you mean? ++ptr is perfectly equivalent to ptr += 1, for any pointer type.
380.
▲
by
kbp
10y ago
"The Standard C Library"
381.
▲
by
kbp
10y ago
When I was learning C, I loved Plauger's book on the standard library for just that reason; it's very informative to be guided through the implementation of the whole thing, not only to see how it works, but it's also a good
382.
▲
by
kbp
10y ago
It's definitely a matter of taste, but I feel like settling for "similar except different somehow" is the same thing as "couldn't think of a better name". I would much prefer f-strict because then I don't
383.
▲
by
kbp
10y ago
The problem is that prime (as it's used, anyway) doesn't carry any meaning the way ? and ! (as they are used) do in Scheme, it's just used for "I couldn't bother to think of another name". Enabling clearer name