Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Lisp

Name: Anonymous 2011-08-15 22:06

What is so good about Lisp?

It seems rather unnatural

Name: Anonymous 2011-08-15 22:16

Hipster programming language. Since it's not used in the industry, hipsters think it's the ultimate language.

Name: Anonymous 2011-08-16 0:01

i lol'd

Name: Anonymous 2011-08-16 0:05

>>3
There's nothing to lol about! There is work to be done!

Name: Anonymous 2011-08-16 0:06

>>1
noko

Name: Anonymous 2011-08-16 0:07

ues c u get shitd one liek mgically cuz its rel mens languge lithp faggoth fux u

Name: Anonymous 2011-08-16 4:54

Name: Anonymous 2011-08-16 6:16

>>7
How is C related to Lambda Calculus? I don't get it.
And what is a thing that the right one holds?

Name: Anonymous 2011-08-16 10:56

>>8
It's turing complete. This means Lisp and C can do the same thing.

Name: Anonymous 2011-08-16 12:22

>>9
Doesn't mean they can do it in the same manner.

Name: Anonymous 2011-08-16 12:51

>>10
You're not expected to answer the ``Turing complete'' argument any more.

Name: Anonymous 2011-08-16 14:33

What is so good about C?

It seems rather unnatural


Infix is no more natural than prefix. The only difference is what you first learned and what you're used to. Getting used to other notations takes a few days of mental work, then it becomes natural (just like learning any other language, be it natural languages or programming languages).

Name: Anonymous 2011-08-16 15:25

Infix is no more natural than prefix.
Wrong bitch.  Prepare your anus.

Name: Anonymous 2011-08-16 15:58

>>13
Because writing 1+2+3+4 is simpler than writing + 1 2 3 4
If you know anything beyond kindergarden math, you'll know that even in math where infix is used (only for historical reasons, the same reason why pi is used instead of tau), you still have a sum/product(∑/Π) symbol when you need to operate on variable number of arguments (sets) and functions are also called by their name first and arguments afterward.

Also, there is no such thing as ``natural'' in human invention, it's all ad-hoc, either guided by insights into aesthetics (such as with Lisp) or into idiocy, but more commonly by preserving tradictions, regardless if they make sense or not.

Name: ( ≖‿≖) 2011-08-16 16:29

>>14
(only for historical reasons, the same reason why pi is used instead of tau)

No, pi is better than tau in most formulae, only the most common (Area and Perimeter of circles) are simpler with tau. The rest of your post is fine, though.

Name: Anonymous 2011-08-16 18:07

>>15

normal distribution, fourier transform, riemann zeta function, surface area of torus, euler's formula, harmonic oscillator, error function, planck's constant

tau > pi

u = anus

Name: ( ≖‿≖) 2011-08-16 20:11

>>16
Leading mathematicians in India, the UK and the US appeared oblivious to this campaign today and asserted that there has been no debate or even discussion over replacing pi with tau in serious mathematical circles.

Well, my opinion is better expressed as
Either one is just fine, it won't make any difference to mathematics.
but, read this and discover the other side of the argument:
http://www.thepimanifesto.com/

Name: Anonymous 2011-08-16 22:52

>>14
f(4 + g(b) * 3)
versus
(f (+ 4 (* (g b) 3)))

Fuck your unreadable shit.  I had to triple-check whether all the parentheses matched correctly and I'm still not sure about it.

Name: Anonymous 2011-08-16 23:03

>>18
Use a parentheses-aware editor and indent your fucking code (when appropriate).

Name: Anonymous 2011-08-16 23:16

>>1

Lisp is an almost interesting experiment which has grown up to a language. It offers somewhat difficult to read syntax, thus rendering it a terrible language in the general sense -- since a programming language is our best achievement so far in interfacing human reasoning with computational power.

But it is still an interesting application of mathematical concepts and theories into computer interfaces. By being math-based, Lisp is coherent and marginally simple to implement. Naturally, complexity can quickly grow into unmanageable levels in Lisp, as it can grow in any language. Lisp has some applications in some fields, and, as always, such applications should be limited to such fields.

Lisp is all about lambda-calculus, albeit most Lisp dialects have dispensed mathematical purism on behalf of 'more useful' features. There's nothing really bright on L-calculus, neither on Lisp; instead, it's just 'another way' of thinking things. If you're a whorfist, you'll know that different languages yields different thinking processes, and Lisp has a lot to add in this aspect to the average imperative-oriented programmer.

Obviously, Lisp is not a silver bullet. There are tasks much better left apart of it. For example, no one should implement webservers or device drivers in Lisp. Well, none should but some do. As always, the fact that some brain-crippled people do this or that doesn't justify the application. The world is very big and there are horrid lots of grotesquely stupid people out there: just thrive hard for not being one.

Lisp is notable for being original and rather powerful in expressive power (whatever that means). It compiles and interprets rather fast, and is particularly prone to unique optimization techniques.

That said, see Lisp as some specific tool to some specialized, precise job, instead of the generic power drill or screwdriver. It cannot be used on every task, but if used correctly and in the exact problem, it yields much less effort, much prettier code, and much better quality results.

Name: Anonymous 2011-08-16 23:19

>>20
For example, no one should implement webservers or device drivers in Lisp.
Why not?

Name: Anonymous 2011-08-16 23:20

>>19
Brilliant, let's work out language flaws in the text editor.  No thank you.

Name: Anonymous 2011-08-16 23:21

>>20
Why not web browser? Continuation-based web browsers are all the rage now.

Name: Anonymous 2011-08-16 23:39

>>21

For reasons I personally consider to be obvious to the mere lot. From your question, though, it either might not be as obvious, or you wholly disagree with them, which is very acceptable.

Lisp is a functional language. Grossly speaking, functional languages combines elements in the language to form relations (or functions) between such elements, in contrast with actively modifying or calculating things with these elements. In Lisp, there's no such thing as 'incrementing a variable' (disregard momentarily 'setq' and others); instead, you unary relate a variable to return a new element, which happens to be the successor of such variable. In Lisp, there's no 'remove a node from a tree'; instead, a tree, a node and another tree are tied together in a relationship called 'remove'. Lisp semantics are of correlating symbols to form another symbols. Strictly speaking, there wouldn't even be any output from a Lisp program if it were purely functional (that is, side-effect expressions weren't introduced).

I believe you're fully aware of this explanation.

Some applications are much better expressed in terms of what the computer should do, instead of which relations should the computer perform. Webservers and device drivers are examples of such applications: it's more natural, it's easier to express the program in a list of do this, do that instead of trying to combine symbols in lambda-relations. Databases, on the other hand, are not -- that's a reason why there are some models of database systems, and different languages to access them. It's easier to express a database access through another set of primitives of thought; in other words, it's easier to express database access in another paradigm.

Computer languages are all about expression, but are affected by other issues in practice, such as performance. In this case, though, writing a webserver in Lisp is against the language's expression. It's not a matter of performance or other implementation issues. Writing imperative programs in Lisp is inexpressive.

>>23

I'm not aware what would a 'continuation-based' web browser be, although I believe this is the exact same case as above. Scripting support inside webpages, or content-generation, however, is a different matter, and maybe Lisp has some sane horizon inside web deployment.

Name: Anonymous 2011-08-16 23:57

>>22
You mean things like syntax highlighting, code completion, automatic indenters, two big ``COMPILE DEBUG AND RUN'' and ``COMPILE AND RUN'' buttons, or more with customizable esoteric compiler flags and automatic makefile generation because the language has no support for reflection, can't talk with the compiler, doesn't have modules, dependecies between files and libraries cannot be automatically tracked and has an explicit compilation step with overly complicated tools?

Name: Anonymous 2011-08-16 23:59

>>24
Lisp is a functional language.
Stopped reading right there.
Your post is bullshit. You are bullshit. Go immediately back to reddit.

Name: Anonymous 2011-08-17 0:07

>>26
[quote]Stopped reading right there.[/quote]

Oh, God. I didn't know there were really illiterate people around here.

Name: Anonymous 2011-08-17 0:08

>>24
Not sure if trolling or ignant.

Name: Anonymous 2011-08-17 1:57

>>24

One of the most common mischaracterisations of lisp is calling it a functional programming language. Lisp is not functional. In fact it can be argued that lisp is one of the least functional languages ever created. This misunderstanding has interesting roots and is a good example of how a small misnomer can have long-lasting influence and end up causing confusion long after the reasons behind the misnomer have passed into irrelevance. What is a functional language? The only definition that makes sense is

A functional language is a programming language made up of functions.

So what is a function? A function is a concept from math that has been with us for centuries:

A function is a static, well-defined mapping from input values to output values.

It seems like we use defun to define new functions in lisp. For example, the following seems to be a function that uses summation to map the set of all numbers to a new set, one that also includes all numbers:

(defun adder (x)
  (+ x 1))

Obviously we can apply this object to any number and get the mapped result from its return value, but is adder really a function? Well, confusingly, lisp tells us that it is1:

* (describe #'adder)

#<Interpreted Function> is a function.

But calling this object a function is one of the deepest-rooted misnomers in lisp history. What defun and lambda forms actually create are procedures or, more accurately still, funcallable instances[AMOP]. Why the distinction? Procedures don't necessarily have anything to do with mapping values, but instead are pieces of code, possibly with stored environment, that can be executed (funcalled). When lisp programmers write in a certain style called functional style, then the resulting procedures can be thought of and combined together pretending that they are math-style functional maps.

The reason why lisp is so often incorrectly described as a functional language has to do with history. Believe it or not but there was once a time when most languages didn't even support the concept of a procedure that modern programmers in any language take for granted. Very early languages didn't provide a suitable abstraction for locally naming arguments in a piece of re-usable code and programmers had to manually allocate registers and manipulate stacks to achieve this behaviour. Lisp, a language that had procedures all along, seemed way more functional than these languages.

Next, once procedural abstraction was given the attention it deserved and incorporated into almost all programming languages, people started to slowly run up against barriers due to the limited nature of the procedures they had implemented. Programmers started to realise that they would like to be able to return procedures from other procedures, embed them in new environments, aggregate them in data-structures, and, in general, treat them as any old regular value. A slogan sprang up to mobilise programmers for this next big abstraction push: a society without classes, first-class procedures. In comparison to languages that relegated the procedure to an inferior second class, lisp, a language that has had these first-class procedures all along, seemed way more functional.

Finally, many languages make a pointless distinction between expression and statement, usually to support some horrible Blub syntax like infix assignment. In lisp, everything returns something2 and there are no (syntactic) restrictions on what you can nest or combine. It is a simple question with an obvious answer: what is more important in a language, newbie-friendly syntax or real flexibility? Any language that uses infix syntax is reducing the possibilities of its abstractions in many ways. Luckily most modern languages have decided to trust their users enough to allow them to combine expressions mostly as they see fit. In comparison to languages that make these sorts of brain-dead syntax decisions, lisp seems way more functional.

After having become comfortable with this ubiquitous yet misguided terminology, programmers started to realise that the notion of function that had been used in the great functional vs non-functional programming language debate is not only confusing, but is actually fundamentally backwards. To correct this, programmers and academics alike went back to the drawing board, returning to the mathematical definition of a function: a map from input values to output values. If lisp is in any way a functional language, it is only as much so as modern languages such as Perl and Javascript.

Clearly lisp procedures are not functions. Lisp procedures can return non-static values, that is you can call them multiple times with the same arguments and receive different return values each time. As in our examples from previous chapters, lisp procedures can store state by closing over variables. Procedures like rplaca can change values in memory or elsewhere (such as registers). Lisp procedures like terpri and format create output (newlines in the case of terpri) directed to terminals or files3. Lisp procedures like yes-or-no-p can read input from a terminal and return values depending on what the user entered. Are these procedures static, well-defined mappings?

Because lisp procedures are not mathematical functions, lisp is not a functional language. In fact, a strong argument can be made that lisp is even less functional than most other languages. In most languages, expressions that look like procedure calls are enforced by the syntax of the language to be procedure calls. In lisp, we have macros. As we've seen, macros can invisibly change the meaning of certain forms from being function calls into arbitrary lisp expressions, a technique which is capable of violating referential transparency in many ways that simply aren't possible in other languages.

After considering that most languages are in fact not at all functional, some language designers decided to find out what programming in a really functional language would be like. As you would expect, programming functional languages is mostly annoying and impractical. Almost no real-world problems can be usefully expressed as static, well-defined mappings from input values to output values. That being said, functional programming is not without merit and many languages have been designed to take advantage of a functional style of programming. What that means is finding a convenient way of isolating the functional parts of a program from the (actually interesting) non-functional parts. Languages like Haskell and Ocaml use this isolation as a means of making aggressive optimisation assumptions.

But this is lisp. We're very non-functional and very proud of it. To the extent that this isolation of side-effects is useful, lisp programmers can and do implement it with macros. The real purpose behind functional programming is to separate the functional description of what should happen from the mechanics of how it actually does happen. Lisp is definitely not functional, but, because of macros, there is no better platform or material for implementing functional languages than lisp.

Name: Anonymous 2011-08-17 2:09

>>29
I was going to write up a similar response to >>24-baka, but you've saved me the trouble and also went the extra mile.

Name: Anonymous 2011-08-17 2:17

>>29
I was going to write up a similar response to >>24-baka, but you've saved me the trouble and also went the extra mile.

However, I then spotted.

>from previous chapters
And realized I had been duped.

Name: Anonymous 2011-08-17 2:31

``functional'' considered harmful.

Name: Anonymous 2011-08-17 3:22

>>1
It seems rather unnatural
Lisp, Smalltalk, Factor and Nial - all pretty natural languages, meaning their syntax can be parsed in a few lines of code.

Name: Anonymous 2011-08-17 3:25

>>25
Dude, back the fuck off.  First of all, while I do enjoy syntax highlighting and word completion in my text editors, they aren't meant to be workarounds for language deficiencies.  Second of all, I never said Lisp isn't a great language in itself; all I said is that S-expressions are an ugly, unnatural and unreadable way of writing source code.

Name: Anonymous 2011-08-17 3:26

>>34
"unnatural" for whom?

Name: Anonymous 2011-08-17 3:34

>>34
Proof? That's right, faggot, you can't prove shit, because everything you say is relative to the user's preferences.

I'm saging this shitty thread.

Name: Anonymous 2011-08-17 3:39

>>36
Proof? That's right, faggot, you can't prove shit either, because everything you say is relative to the user's preferences.

I'm bumping this shitty thread just to spite you.

Name: Anonymous 2011-08-17 4:34

>>34
Well, paren matching is the easiest thing a text editor can do, even simpler than syntax highlighting. If your text editor has syntax highlighting but doesn't match parens, consider switching the option on, you faggot, and shut up.

Name: Anonymous 2011-08-17 5:15

>>19
Identing code is for pig disgusting python ``programmers''

Name: Anonymous 2011-08-17 5:16

I like turtles

Name: Anonymous 2011-08-17 5:25

>>38
Are you fucking retarded?  I just want proper syntax that doesn't require shitloads of extraneous parentheses.  Surely that's not asking for too much!

Name: Anonymous 2011-08-17 5:34

>>41
Of course not, my liege!
($) :: (a -> b) -> a -> b
f $ x =  f x
(.) :: (b -> c) -> (a -> b) -> a -> c
f . g =  \ x -> f (g x)

Name: Anonymous 2011-08-17 5:42

>>42
I wouldn't trade mutability for syntax!

Name: Anonymous 2011-08-17 5:47

>>41
Try Applescript, then.

Name: Anonymous 2011-08-17 11:40

If it ain't Lisp, it's crap.

Name: Anonymous 2011-08-17 12:40

If it's Lisp, it's crappier.

Name: Anonymous 2011-08-17 13:10

If it's LISP, it's awesome. If it's Haskell, it's even better.

Name: Anonymous 2011-08-17 14:33

>>30
>>24-baka
>baka

GTFO.

Name: Anonymous 2011-08-17 14:49

>>29

I believe the terminology explanation went way beyond purism, though I comprehend the importance of settling right words for concepts in order to avoid confusion. The terms 'statement' and 'expression' were created for the same reason.

The text displays another misnomer. 'Macro' is another word representing at least two different concepts in programming. For example, C preprocessor function-like definitions are also called 'macros', and cannot be compared with Lisp macros.

Name: Anonymous 2011-08-17 15:27

>>48
No you, piece of shit-kun.

Name: Anonymous 2011-09-29 0:14

LOL SEXPRESSIONS

Name: Anonymous 2011-09-29 6:55

List has GC and GC is shit. Lisp is shit.

Don't change these.
Name: Email:
Entire Thread Thread List