Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kbp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
65 ms
·
241.
▲
by
kbp
9y ago
> Java had lists but no functional API on top of it. Processing ArrayLists is extremely different from (mapcar #'f '(....)) My point was that the functional API is the key difference, not arrays vs lists. Java in 2000 had lists
242.
▲
by
kbp
9y ago
It's from this: http://www-formal.stanford.edu/jmc/history/lisp/lisp.html
243.
▲
by
kbp
9y ago
> In non lisp languages, the mutable array often came without map / filter What languages do you know that have map and filter for lists, but not for arrays? Lisp has them for both, C++ has them for both, Java has them for both; Jav
244.
▲
by
kbp
9y ago
Yes, I agree. If you've ever read old Lisp code it's full of PROG and assigning variables and jumping around with gotos, McCarthy even said: "LISP also allows sequential programs written with assignment statements and go tos.
245.
▲
by
kbp
9y ago
> map / filter over list is different from arrays. How? CL-USER> (remove-if-not #'evenp '(1 2 3 4 5)) (2 4) CL-USER> (remove-if-not #'evenp #(1 2 3 4 5)) #(2 4) CL-USER> (loop for x in &
246.
▲
by
kbp
9y ago
Around 60 years ago, Lisp pioneered functional programming and was the only thing that supported it at all. Up until the mid-90s or so it was still far and away the most popular language that had meaningful support for closures and higher o
247.
▲
by
kbp
9y ago
> Some checking also happens at compile time, even more if you intentionally include type declarations. (Type declarations are part of the ANSI Common Lisp standard.) Just a note that this is entirely implementation-dependent. SBCL, for
248.
▲
by
kbp
9y ago
> it's often highly interactive, and value oriented. You get to "touch" the data a bit like material. Nowadays repl's are common, so it doesn't seem special but it was so for 30years. REPL's are common, but
249.
▲
by
kbp
9y ago
Most Lisps have object systems; Common Lisp was the first ANSI-standardised language with one.
250.
▲
by
kbp
9y ago
GNU Emacs wasn't the original Emacs, either (that was rms' PDP-10 editor built on top of TECO rather than Lisp), or even the original Lisp-based Emacs (that was Daniel Weinreb's EINE (EINE Is Not Emacs) which also had a succe
251.
▲
by
kbp
9y ago
> You can write a quicksort in a few lines. You can traverse over a tree very easily. But understanding these few lines takes me more time than writing it in C, Java, PHP etc I'm still only a beginner at Prolog, but that's what
252.
▲
by
kbp
9y ago
It's always been interesting to me how Logo, a Lisp dialect, was so successful as a language for teaching children to program, but so many people still go around with the idea that Lisp is really hard to wrap your head around.
253.
▲
Object models
(eev.ee)
1 points
by
kbp
9y ago
|
0 comments
254.
▲
by
kbp
9y ago
If you read the original Scheme report, you'll notice that it's full of example programs, zero of which run on modern Schemes. They're full of operators that Scheme doesn't have anymore, like BLOCK, PROGN, CATCH, ASET, -
255.
▲
by
kbp
9y ago
Even without paredit, Emacs has had forward-sexp, kill-sexp, etc, since the beginning.
256.
▲
by
kbp
9y ago
> Is it? (I honestly have no idea about Lisp.) In Lisp you can modify the read table at run time, so you can do whatever you want. The functions the reader calls when it comes across '(', ')', ' ', and every
257.
▲
by
kbp
9y ago
> The decline of Perl's mindshare for new domains was totally separate from "sigils". When you quoted someone saying "how Perl managed to become quite so profoundly disliked" and said "the conspicuous reason
258.
▲
by
kbp
9y ago
> Yes, "$foo=7" is literally 1 character longer than "foo=7" which seems to violate terseness. (This is the example you seem to always gravitate back to.) For the 2nd time, I'm stressing that I already agree with
259.
▲
by
kbp
9y ago
> Again, the "Perl lost to Python/Ruby ... terseness" connection is your narrative, not mine. Well, if you just weren't considering Python and Ruby, then aren't they counter-examples to your point? They're t
260.
▲
by
kbp
9y ago
> I also wasn't really focused on "@%$" specifically but you had brought it up My involvement in this conversation started with quoting you saying that one of the major reasons for Perl becoming disliked was "PERL
261.
▲
by
kbp
9y ago
My point was that the fact that C++ (like Perl) has had multiple updates in the past few years, and that Nvidia chose C++ instead of Perl as the primary language for an API are not evidence of Perl's decline. Perl 5 receives more frequ
262.
▲
by
kbp
9y ago
> Yes, I understand that C++ does not compete with Perl. My point is the rejuvenation stories Well, the way C++ had new versions released in 2017 and 2014, Perl 5 had new versions released in 2017 and 2016; what stagnation are you demons
263.
▲
by
kbp
9y ago
> Same for C++. It gets rejuvenated in things like graphics programming (NVIDIA's CUDA SDK is C++ not Perl). And when Bitcoin showed up in 2009, it's canonical client was C++ not Perl. Perl is not competing with C++; they'
264.
▲
by
kbp
9y ago
But when you talk about Perl stagnating and losing out to other languages, the languages it lost out to were Python and Ruby, which don't require any type notation. It also lost out to PHP, which has sigils, but they don't carry a
265.
▲
by
kbp
9y ago
> 1) PERL's usage of sigils.[1] One the one hand, it makes code compact and terse Sigils have nothing to do with Perl's terseness; actually, they make code very slightly (one character per variable) more verbose. In Perl 5, $fo
266.
▲
by
kbp
9y ago
This stopped working like this a long time ago; if you put something in quotes, Google will still sometimes return pages that don't include it, or that contain "synonyms" for it. You need to turn on the verbatim option for th
267.
▲
by
kbp
9y ago
> But in a language like Java, where field access has its own semantics divorced from function calls, you need getters/setters to achieve a similar effect. I think the problem with Java's approach wasn't just in allowing p
268.
▲
by
kbp
9y ago
> If my function only needs to know the "age", then why am I having to fill out my Person class with all the other stuff? Why, if I have facts about a Cat in hand, must I coerce it to a Person? If your function only needs to kn
269.
▲
by
kbp
9y ago
> They usually say something along the lines of "I choose static typing because if I change my Person class, then the compiler reminds me of all the places in my code that I need to go fix." What's remarkable about this is
270.
▲
by
kbp
9y ago
> I've always had a fascination for LISP, but every time I've tried using it after learning Julia, I've found the lack of type focus limiting and in the way. > Types makes it easier to build abstractions. I can write se
More ›