Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment It is great, just don't make a religion out of it (Score 3, Interesting) 413

All programming paradigms have useful abstractions to offer. Eventually, they will all come together. Object orientation is great, until one overdoes it in design pattern hell. Likewise with functional programming. There are great many ideas in academic programming languages that will be made more accessible and integrated into mainstream programming languages. Functional programming is a dead end only in the sense SmallTalk was a dead end. People may not use SmallTalk much today, but its ideas live on in nearly every language we use today. Functional programming is here to stay. It won't replace imperative and object-oriented programming, but will add to them.

First and foremost, programming languages are for people, not computers. So if regular programmers who form the bulk of the workforce can't grok them, the languages need to be fixed, not people. Haskell is too hard for most. But it has many wonderful ideas that can be distilled into simpler forms and adopted and integrated elsewhere. Python got list comprehensions from it and perhaps the indentation.

C# is absorbing some features and Java is doing that less elegantly. Scala is a good balance and has already established itself. But people still find the type system complicated. So there are attempts to bring forth a simpler Scala - Kotlin, Ceylon etc.

We all agree that things like compact syntax, first order functions, lambdas, streams, type inference etc that functional languages pioneered, belong in every language. We still haven't sorted out how to make more advanced type systems, provability, strict programming without side effects etc more approachable. We should not need to have this much trouble explaining what a monad is or isn't. We'll get there, eventually.

Comment Re:a little late to the party (Score 1) 98

There is a good reason to have that code at the database tier and not in the "real application tier" aka client client tier. And this reason is partly the same reason as why we do stored procedures. We want the data to be resolved and reduced before it leaves the database tier, not sorted out in the client tier. This also allows for centralizing business logic rather than have it spread out among various client implementations. And the non-standardness is no different than doing non-standard stuff that we already do in stored procedures.

Comment Re:a little late to the party (Score 1) 98

Postgres, since a long time, like SQL Server now, allows *embedding* Python in the database run stored procedures.

The MySQL and DB2 links you provided are not the same. They are simply about calling stored procedures from Python clients. Pretty much every relational database and programing language can do the latter.

Embedding within the database, on the hand, is a more exotic and a very useful feature.

Comment Jython, not JPython (Score 1) 129

Nitpicking, buy it was JPython in 1997
It has been Jython since 1999
https://wiki.python.org/jython...

> I do not know why anybody would even think of using a programming language without static typing.

- Dynamically typed programming languages are more productive when writing smaller quantities of rapidly evolving code.

- It is mainly a library and an ecosystem issue. Python tends to have all the modules I need, while Haskell, OCaml and Scala often don't... and they often seem to be much easier to pick up and use.

For example, Pandas equivalents are much less mature in other ecosystems. On language merits alone, I should be using Scala more than Python, but in practice, Python modules win me over.

I wanted to memoise a function. To look up a module and put in the couple of lines (an import and a decorator) needed to achieve that probably took a couple of minutes in Python, and I was back to the real meat of my code. I would have spent much longer in Java.

Comment Re:Welcome to India (Score 1) 96

Rapes in India: about 37,000 per year for a country of 1.26 BILLION. Press reports it as a rape every 20 min.
Rapes in US: 1,200,000 per year for a country the fourth of India according to CDC. No one talks about it.
Obviously, BOTH are under-reporting.
If you take a large country as India or China, every measure will be automatically large. Talking absolute numbers rather than per capita adjusted numbers is either dumb or malicious journalism. During the Delhi rape coverage, not one newspaper I read talked about per capita rates.

Let's be realistic. For a poor country, the rights of women in India are no worse than similar poor countries. At least in India, the public holds large protests over rape. Don't see that much elsewhere.

Comment Re:Alarmism (Score 2) 96

You are entirely looking at India with US legal system lenses. In India, the political system is not dominated by lawyers i.e. the politicians don't have a legal background as much as they do in US. Public prosecutors don't routinely run for elections and hence have an interest in promoting themselves as "tough on crime". AFAIK, terrifying the defendant with disproportionate punitive threats and forcing him/her into a plea deal is not an issue in India. There, the problems are more around the legal process taking simply too long due to inadequately funded institutions, outdated laws and generally a less agile system (poorer country), rather than an overzealous application.

That said, both India *and US* do have arbitrary application of law - due to different reasons and cause different sets of problems. Corruption is of course more in India, as you would expect in any country with its per capita income. Yet, I'd say that far... far more people are put in prison in US due to arbitrary application of law than in India, even though the due process is said to be much better in US.

Comment Alarmism (Score 4, Informative) 96

All this is pointless hyperventilating by people who understand little about India.
India is one the LEAST punitive countries in the world. It does not believe that putting people in the prison is a solution for anything – even for things most of us would agree that people should be put into prison for.
India’s incarceration rate is 33 (one of the lowest in the world) per 100,000
US incarceration rate is 698 (highest incarceration rate in the world, if you ignore Seychelles) per 100,000
Have you ever heard of anyone put in prison in India for downloading a file? The law has been around since 1957. I am not even sure if for-profit bootleggers who sell media in India have been in prison for more than a few weeks. This is just some tech-ignorant government bureaucrat getting carried away. If a 0.01% of Indians tweet about it, the warning will be edited to something realistic. This has been the pattern about most India alarmist articles on Slashdot.

Comment Re:Jingoism and Nativism (Score 0) 242

If you think not letting Apple open a few stores, unless they sell a few goods from India in return, is comparable to the utter and complete destruction of an entire civilization's economic status in the world during the colonial era, in the guise of free (which it was not) markets, you are completely unread of world history outside the western perspective, if not the remnants of the cold-war era propaganda perspective, that too in a rather shallow sense. This has nothing to do with Trump or whatever is his message. I am talking history, and its consequences on policy, not pandering politics and demagogues. Read at least one book on the devastation of colonialism and force-imposed free trade on India. Until you do, you won't get this. Yes, I can hear myself talk; not sure you can.

Comment Re:Jingoism and Nativism (Score 5, Insightful) 242

You are ignoring the fact that India was colonized and used as nothing but as a market for centuries and sucked dry. Those scars will take a long while to heal and those are lessons not easily forgotten. The word "Free Trade" has a different meaning to an Indian (as well as to those who also endured the Opium Wars and the Black Ships incident in their history). They had completely different experiences with it in their history. This is a rational strategy from those experiences.

Likewise the idea of protectionism has cold war era connotations in US; not so in India. It was a necessarily strategy for India to protect itself from neo-colonialism when its capacity to compete was never allowed to mature. India started rolling back these defenses (which naturally hold back growth - security vs. speed) gradually once it felt its industries and services are maturing and have a chance to actually compete in a free market. But that is a gradual process rather than a binary choice.

> Why should the people of one country be privileged over the people of any other? Just because they were born there?

That said, I generally agree with the sentiment. But even the majority in US don't agree with that.

Comment Re:Thought he retired... (Score 2) 257

This is a simple general rule: When someone merely points to the expert consensus (with respect to any mainstream science), without any innovation, they do not need to be challenged on their personal expertise. People who do refute an expert consensus are those who need to be challenged on their expertise and are asked to submit their evidence to peer review.

I don't need to be a biologist to say that evolution is real. If I say it isn't, THEN my credentials come into question.

Slashdot Top Deals

Logic is the chastity belt of the mind!

Working...