>If you understand how compilers work, what's really going on is not so much that Lisp has a strange syntax as that Lisp has no syntax. You write programs in the parse trees that get generated within the compiler when other languages are parsed.
If you say "S-expressions" instead of "LISP", this is perfectly true! The syntax of S-expressions was only meant to be used for LISP data structures, while programming was meant to happen in another syntax called "M-expressions" [1], which was to be converted to S-expressions by the compiler. However, the programmers liked to use S-expressions directly, so M-expressions were never actually implemented.
In that sense, the LISP syntax (S-expressions) were ideed designed as an intermediate language, not to be used by programmers directly (except for plain data structures).
It's not as if..it is truly the case. That's why only nutters use LISP for large projects. Who really wants to wrap every S-Expression in parenthesis? Talk about painstaking and what an eye-sore. If only M-Expressions caught on, LISP could be decent. But really, it's just making you write your program as a data structure because that makes it easier for the compiler to process.
So...
Ruby: good for developers, bad for the JIT compiler (slow)
LISP: awful for developers, good for the compiler -> machine (fast)
Is the tradeoff worth it? Not at all. Most LISP intros start by convincing you that you'll eventually get used to your code looking like a sack of parenthesis. No thanks, I shouldn't need to get used to staring at overburdened verbosity for the compilers' sake - build something better. Wait..we have other languages that are fast and look nice. And many even process into a well-formed AST. Okay, thank heavens.
I disagree that Lisp is awful for developers. To me and many others it looks quite pleasant while the "other languages that look nice" actually look like a needless mess of braces, brackets, asterisks, comma's, etc. etc.
Only Python comes close IMHO but has many other downsides.
Brackets, asterisks, and commas give array indexing, pointers, and the clean separation of function arguments.
(incf (elt vector 2))
..versus..
++vector[2]
which one is more readable?
LISP is not to be taken seriously. It's an academic curiosity, and cute, novel, not a language that needs continued zealots. It has no market share..the reasons are always going to be the same. The language is esoteric. I wouldn't program anything serious in JSON so why would I use LISP, where every semantic is a list..not even a hashmap.
I'm really not going to participate in a cherry picking contest on PL syntax and while my experience has show that Lisp is not for everyone, I'm quite surprised at the hostility shown towards it by you and other people on this page.
I'm not quite sure whether it is just plain trolling or traumatic experiences with Lisp at college. (The latter which I can understand since being allowed to only use a very limited part of the language to solve convoluted problems can be quite off-putting.)
Knee-jerk? There's nothing pretty about having every single semantic of your language need to wrap. That's called, syntax hell. And it's useful for when you want to refer the AST self-referentially, like in live editors, ie. emacs & overtone (music production.) Otherwise, it's water trash. Maybe it was cool in the 80s when the only other kid on the block was Fortran or QBasic - but we have better languages now, so we don't need to write our program as a big nested list..we can make it easier for ourselves, and we can be way more productive..well unless..we're some old dude from the 80s..that's stuck on the LISP bandwagon. tears
Damn straight, I went there. And got no replies. Because there's really no good reasons to defend LISP's horrible syntax in non-live programming use-cases.
That's definitely a good feature. Other languages have run-time reflection, compile-time macros, mixins, and polymorphism.
LISP is great for live audio production because of the homoiconicity. It's very suited for dynamic interactive programming, namely Emacs. I believe that's where the zealousness needs to stop. It's not a good language to code large projects in.
Yes, and he's still wrong. You don't write 'directly in parse trees', you write in text that gets converted to parse trees. The conversion is very simple, to be sure, but it still exists.
When writing an S-expression of Lisp code, you're just one quote symbol off writing the list literal that evaluates to the code's parse tree. Modulo whitespace, the parse-tree prints as code.
That's what we mean when we say you write directly in parse-trees. You're writing the string representation of those parse-trees.
Right, but it seems inaccurate to me to say that Lisp code 'has no syntax'. What do you call the reason that 2927(foo"bar. isn't a valid Lisp program?
Alternately: If I augment Python by letting you surround a block of Python code with curly braces in order to get an object representing the corresponding AST, does that mean that I can write Python directly in parse trees? :P
It's always called a "read" error. If you're working at the REPL, it's detected at the Read phase of the Read-Eval-Print-Loop. It is, of course, a read-syntax error.
But the fact that the Read phase can be usefully separated from the Eval phase is a distinguishing feature of Lisp, and why it makes sense to say, at least, that Lisp has no concrete syntax, only abstract syntax. Lisp programmers fluently think in terms of the abstract syntax their code generates, because they read and write in the string representation of that abstract syntax. That's why it makes sense for the Lisp eval function, unlike the eval function in other dynamic languages, to take lists as input rather than strings. That's why a metacircular interpreter in Lisp will be written to input lists. That's why a DSL in Lisp written as a custom evaluation function will be an interpreter for lists. The Lisp language is defined with respect to the list data-structure, rather than strings.
On your Python idea: the problem is that no-one would ever use Python code as the literal representation of Python's abstract syntax.
It would be entirely backward, anyway. Lisp starts as a notation for a data-structure rich enough to represent abstract syntax (symbolic expressions) and then defines a language in terms of this data structure. The philosophy of this is understood when we realise that the roots of Lisp are in metalanguages and logic.
Listen to this man. Anyone who studies a dead language for “real-world gain” will probably end up disappointed.
The only real reason to learn is so you can read old books in that language. And you might get a few points of social prestige, but that alone generally won't make up for the hours and years you put into it.
>isn't being held captive behind closed doors waiting for Sanskrit-speaking liberators
Over-dramatizing the other guy's statement does not constitute a response.
Even ignoring the religious angle, Sanskrit was the primary language of literature, science and philosophy in India for over a millennium. Surely a person might want to read some of that without being employed as a researcher.
Again, what HN reader (or otherwise), do you think is interested in reading ancient literature written in Sanskrit? A researcher or linguist I'm guessing. And maybe 3 other people.
I'm afraid your arguments in favour of learning Sanskrit are as generic and theoretical as most other comments.
I am interested. Not a researcher, not a linguist. Just some asshole who wants to know a new skill that may come in handy when exploring Indian mythology. You really need to just concede that your interests are your own and that your rather harsh view of Sanskrit is one that isn't universally shared.
Can you quantify how slow? This is a common refrain against some of these sorts of things (and, indeed, the modern web in general): "adding this thing makes your site slow". But I rarely see quantified results...
That site also has collections about works of legit ancient Indian mathematicians, Vedas etc. So, you are going to disregard them because they're Hindus?
If somebody mentions about these things, then they're said to be peddling this so called Hindu propaganda. Now, THAT'S a real propaganda.
It is really pathetic to see how people try to defend their fundamental beliefs without any substance. People are brainwashed to believe that vedic scriptures are full of knowledge (I was a victim too. I used to recite some parts of the scriptures like purusha suktam). In reality, the scriptures are filled with filth like procedures of sacrificial, bestiality and orgy rituals, calls upon gods to slaughter their enemies (who have stolen their herds), etc.
Nothing. And no one here is claiming that all parts of these texts are to be taken as absolute fact with empirical proof. Most of it, as you mention, is riddled with imaginary stories probably because scientific discovery was being carried out by religious philosophers of that time.
However, there are parts of these texts that are legitimately impressive, philosophically or scientifically - and a blanket denial of that would be just as unjust as the 'filth'.
But the site says:
... [sages] wrote Vedas - the manual of vibrations. Following this many field of science evolved ...
I have provided references to show that the basic 4 vedas are tribal in nature and there is no basis to claim them as the origin of other scientific oriented texts. I am not denying all of the texts as bad.
It is really pathetic to see how people are quick to snub off anyone or anything that's related to Hinduism, ancient Hindu works, scriptures etc as propaganda, brainwash etc. Is it some kind of reverse propaganda??
>>>You can also see that the site claims that Jyotish is astronomy but it actually means astrology.
Where? They do mention it as "astrology".
>>>In reality, the scriptures are filled with filth like procedures of sacrificial, bestiality and orgy rituals, calls upon gods to slaughter their enemies (who have stolen their herds), etc.
>>>29. [Saturn] has an emaciated and long physique, has tawny eyes, is windy in temperament, has big teeth, is indolent and lame and has coarse hair.
What is legit or scientific about it?
Have you heard of mythology, euhemerism, and personification? Out of all those stuff on that site, you zeroed-in on sacrificial rituals, description of Saturn, and dismissed everything as "filth"? Then, what is your say on Ganit Shastra, Kaam Shastra, Khagol Shastra to name a few?
Based on that logic, all these below must be filth and their sole purpose is to brainwash people:
>Where? They do mention it as "astrology".
//Astronomy - Rig Veda (2000 BC) refers to astronomy. Astronomy is called Jyotish.//
The site claims Jyotish as astronomy. I'm saying it is just Astrology and showed an example from the text to indicate that it is not talking astronomy. There is no problem in treating and considering the text as myth. The problem is they are claimed as science.
Astronomy was the same as astrology until 1700 or so. Kelsey, who discovered the law of planetary motion, was an astrologer. Copernicus was an astrologer. After Newton formulated in universal gravitation, went into occult studies.
Astrology is different from astronomy in the present day, but not in the past.
Worth mentioning: if you would have lived in India, hearing the same story about USA NASA Mars rover landing, you would have said: "Why are they spending time on this instead of fixing 14 trillion dollar debt?"
For those pedantic fools focusing on the "debt" part of your comment, replace that with poverty, NSA spying, unemployment, education, or any other perceived problem. The specific problem isn't the point.
There is always this tendency to confuse inequity with poverty. India's problem is inequity not poverty, just as it is in America. There is also the reason why Western Europeans and Americans whose combined population does not equal that of India should be judgmental about their choices.
Why should it be okay to for white people to tell brown people what they should or shouldn't do with their resources, not to mention that their advancement is supported by the large numbers of brown and yellow skinned people who constitute a large proportion of their PhDs?
Poverty or no poverty, blue sky research is also necessary for an ancient civilization with over 1 billion people. They can't expect to depend on the rest of the world for all their technological needs.
Again the material resources for poverty reduction exists and I don't think those resources required for space exploration don't diminish them.
Financial or monetary allocation isn't quite the same as material resource allocation. In most of the world material resources are deployed by financial resources and the allocation of these is wholly arbitrary. Such as in America where trillions have allocated for the payment of odious and criminal bank debts and war in Afghanistan and Iraq, when health and housing provision is woefully inadequate.
Do homeless people in America have good access to clean water, electricity and antibiotics?
Its a question of competing with the other regional power - China; The two aren't exactly friends;
At least that's what the papers say: http://www.economist.com/node/16846256
People enjoy movies, which alleviates suffering, which ameliorates poverty. If poor folks get to watch movies, that is. Movies have very low marginal cost, making them among the most cost effective forms of entertainment.
Both Bollywood and Mangalyan are a distraction from the core issues, poverty being one of them. Why do people react to criticism that is inevitable for such a mission?
In my opinion, space probe to Mars is a good idea for space engineers and for the idea of adventure, it should be nurtured. But the moment the Indian Government a$$holes (who have eaten up more than 10000X that amount which a Mangalyan costs) and their media toots start projecting this achievement of engineers as their own "moment of glory" and a proof towards India becoming a global superpower, everything falls flat on the face.
There should be no doubt that poverty IS the biggest challenge for us (I am an Indian) to work on, and there are people with achievements in rural tech to help people over with just that. No space wizardry, just basic engineering. Heroism, inspiration and aspiration should be centred and drawn around those people too, India needs it more.
And this is part of working on poverty, in India and everywhere else. Forget all the other reasons. People need inspiration, and this is one way to provide it. The payoff may not be immediate, but it will come.
They also need local jobs in high-tech industries, rather then a continuous brain-drain off to Western nations.
India's poverty also has very little to do with "lack of money" as does poverty everywhere - i.e. why does the US have poverty, despite it's incredible wealth?
Why did Kennedy call for the moon landing instead of fixing the civil rights problem? why did LBJ setup medicare/medicaid instead of fixing racism and other inequities? Why did Obama setup Obamacare without fixing poverty in America?
LBJ did more to address poverty than any president save Roosevelt. If you're going to ask that specific question, ask about the money wasted on the Vietnam war and mayne the space program -- medicare/medicaid and the "Great Society" programd directly tackled poverty, and LBJ passed the civil rights act which, oh by the way, was Kennedy's legacy. Fixing healthcare is one way of directly addressing poverty. You can argue the methods (I would prefer single payer) but the intent is at least pointing in the right direction.
There are two India's now. The 100 million upwardly mobile middle and richer class living in walled inner cities and the 900 million+ poor and desperate people who need all kinds of poverty alleviation that the government can provide. The 100 million class wants better infrastructure, more tech jobs, open and corruption free democracy, space programs and more and they'll(we'll) get some of it. The rest cannot be helped easily. Even pouring money in rural tech cannot help most. Bulk of the poor now live in urban slums/poor suburbs around big cities. Money that goes to space programs would be a pittance for alleviating the poor masses. For the most part, the poor uneducated people cannot be helped from their own voting decisions that bring corrupt and inefficient politicians and crowd pleasing policies.
Absolutely! Is there a research or report on what percentage of poor have quit villages and moved to sub-urban areas lately?
Last when I was working near a village in central India near Uttar Pradesh/Madhya Pradesh border the estimate was a little under 4% (which is huge given the absolute numbers). I kind of believe that over 90% bulk might still be within the rural consideration, but I could be wrong. The electorate interest and its outcome seems to indicate that bulk of rural India is still where it was.
About 15 years ago, rural migration from the state of Orissa and Uttar Pradesh was pegged at less than 1%. So it is not out of context to consider here that the average speed of travel within the country and connectivity by rail and road has improved by factor of 4 in the last 15 years.
This is the rural progress and implementation of ordinary technology, that we easily miss out on, that has brought about rural migration that we're talking about here. It has sparked ambition in the poor which now aspires for a better life in the suburban cachement of Indian cities.
Leads to concluding that it is the gap between the rich and poor that leads to criticism and praise of space programs like Mangalyan. The '100 million India' who have the gift of being in the elite 100 million should take a note of this gap. And not be perturbed by criticism of technical feats like the Mangalyan.
The benefit of ISRO space program (though it has strategic pitfalls too) would surely reach the balance 900 million poor eventually, but that is in future. Immediate priority should be (and thankfully is) rural tech because that keeps the gap between rich and poor in control, and prevents volatility and conflict by keeping the sense of belongingness among the desperate poor.
That's what I think, but I may be removed from reality given that I am off coast now.
I hear you, however it is worth remembering that space wizardry is just basic engineering done to the nth degree and it keeps engineers in the country who might otherwise have left. If you want your engineers to help find solutions to the problems of poverty in India, the first thing to do is to make sure they stick around and having a space industry helps with that.
Technology is much faster at getting people out of poverty than giving them free money or free food. Heck, as someone from outside, the only thing about Indian industries is that "Indians are good at tech". If I were you, I'd try to focus even more on that, not less.
What people like you don't understand is that this is one of the ways of combating poverty. You can't ask people to just eat, reproduce and die, living just above the poverty line. That is worse than poverty.
> What jingoistic people like you don't understand is that the ability to tolerate criticism is equally important.
Don't you realize the same thing can be said about you :)
I criticized your criticism and you went all "jingoistic nut" on me. Sigh.
The problem is for any good action X that any government does as long as it has any side effect other than getting people out of poverty, it would get criticized as unnecessary. That leaves out only giving money to people directly.
No, I just pointed out the jingoism evident from this line:
> You can't ask people to just eat, reproduce and die, living just above the poverty line. That is worse than poverty.
What do those line mean? Who asked people to just eat, reproduce and die? How is something worse or better than poverty I do not know.
> it would get criticized as unnecessary. That leaves out only giving money to people directly.
No where in the parent comment or on this complete conversation it has been said that expenditure on Mangalyaan is unnecessary or wasteful. In fact it is the opposite that I said on the parent comment. Where did you read this?
> What do those line mean? Who asked people to just eat, reproduce and die? How is something worse or better than poverty I do not know.
If you can't understand that, I don't know what to say. Ask yourself this: why should poverty be reduced? The same rationale can be applied to why we need "space wizardry."
> No where in the parent comment or on this complete conversation it has been said that expenditure on Mangalyaan is unnecessary or wasteful.
Needless to say, every participant was from Pune...