what language should i learn next

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 2417 Views - Last Post: 05 June 2015 - 12:59 PM

#1 leibniz76   User is offline

  • D.I.C Head

Reputation: -11
  • View blog
  • Posts: 89
  • Joined: 02-May 14

what language should i learn next

Posted 30 November 2014 - 10:32 PM

The only language I know is VBA for Excel. Mr Foley (cfoley) recommended I learn a proper coding language rather than VBA for Excel, incidentally my last name is Foley too. Starting Jan 15th I'm going to start trying to learn a proper computer language. The reason why I'm waiting until Jan 15th is because I'm trying to get a project as developed as possible by 1/15 and to learn a new language now would mean putting the development of the project on hold while I learn the new language which is not a good idea. Anyway, let me tell you what project I'm working on and then perhaps you would know what language is the best fit for me. I'm trying to build an artificial intelligence software that can determine in a finite number of steps whether or not a given sentence is contradictory, consistent or ungrammatical. So far I've got 300 pages of code. What I have to do is divide sentences up, infer new sentences, store them in arrays and match them against other sentences.

The only other language that I'm remotely familiar with is PHP. I understand that you do not have to declare variables in that language. Declaring variables is something I really hate, because I probably only use 25% of the variables that I initially declare. I am constantly having to go back and look up how I spelt a variable whereas PHP has a popup box that tells you what variables you've already declared. I think that would be an amazing help. Eventually, I would like to put my logic parser on the internet. I would like to build a parser similar to Prolog but better of course. The logic calculator ideally will be designed so that philosophers can demonstrate that they are not full of bullshit but actually know what they are talking about. I'm wondering if I could build some website where I could actually see what types of sentences philosophers are trying to prove and what is happening when they use my software. Consequently, I would not like to build a software that you can download but you have to use at the website.

Probably the only other things that bugs me about VBA for Excel is that the most frequent error message I get is when I program that machine to enter into an array that is not allocated. I really hate this. Because some arrays are empty but still allocated and I have a very difficult time differentiating between the two. I also have a difficult time with multidimensional arrays.

Is This A Good Question/Topic? 0
  • +

Replies To: what language should i learn next

#2 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12362
  • View blog
  • Posts: 45,476
  • Joined: 27-December 08

Re: what language should i learn next

Posted 30 November 2014 - 10:49 PM

I'd say learn Prolog then. If you want to improve upon it, you need to understand its shortcomings. The best way to do that is to thoroughly learn the language. Hopefully it will also help you to become a better programmer and logician as well.

Lisp or Haskell might be good second choices.

If you don't want to go that route, Python is probably a good choice. And we do have a pinned "Which Language" thread in this forum where you can look through everyone's opinions on which language to learn.
Was This Post Helpful? 1
  • +
  • -

#3 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11224
  • View blog
  • Posts: 19,242
  • Joined: 19-March 11

Re: what language should i learn next

Posted 01 December 2014 - 01:03 AM

Quote

I'm trying to build an artificial intelligence software that can determine in a finite number of steps whether or not a given sentence is contradictory, consistent or ungrammatical


I don't give you good odds on this one, but for AI of this sort, various flavors of Lisp are the traditional approach.

(though I agree with mac: if you want to do better than language L, you should certainly know L backwards and forwards, so you should probably make sure you know PROLOG completely - preferably to the point of being able to implement an interpreter for it in the language of your choice)
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12362
  • View blog
  • Posts: 45,476
  • Joined: 27-December 08

Re: what language should i learn next

Posted 01 December 2014 - 08:07 AM

Prolog and Lisp might even be good "goto" languages for this project. ;)
Was This Post Helpful? 0
  • +
  • -

#5 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11224
  • View blog
  • Posts: 19,242
  • Joined: 19-March 11

Re: what language should i learn next

Posted 01 December 2014 - 08:14 AM

True that. Better jump to it!
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14425
  • View blog
  • Posts: 57,820
  • Joined: 12-June 08

Re: what language should i learn next

Posted 01 December 2014 - 08:18 AM

A few comments on other bits that stood out..

Quote

I understand that you do not have to declare variables in that language. Declaring variables is something I really hate, because I probably only use 25% of the variables that I initially declare.

That would harken to over all poor design. I would hope you are removing the 75% you are not using?

Quote

I am constantly having to go back and look up how I spelt a variable whereas PHP has a popup box that tells you what variables you've already declared. I think that would be an amazing help.

No.. that popup box is a function of the IDE not the PHP language itself. Do not confuse the two.


Quote

frequent error message I get is when I program that machine to enter into an array that is not allocated. I really hate this. Because some arrays are empty but still allocated and I have a very difficult time differentiating between the two.

If this is a reoccurring issue why not correct this when you declare an array you allocate it? This seems less of a language flaw and more of you fighting something or another.


Quote

The logic calculator ideally will be designed so that philosophers can demonstrate that they are not full of bullshit but actually know what they are talking about.

Ah, so not a labor of love, but a labor of spite. Those are awesome projects.
Was This Post Helpful? 0
  • +
  • -

#7 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12362
  • View blog
  • Posts: 45,476
  • Joined: 27-December 08

Re: what language should i learn next

Posted 01 December 2014 - 08:23 AM

Also, philosophers are full of bullshit. That's what they eat and why we send them out in the fields to dine. It's a real problem.
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14425
  • View blog
  • Posts: 57,820
  • Joined: 12-June 08

Re: what language should i learn next

Posted 01 December 2014 - 08:58 AM

Quote

we send them[philosophers] out in the fields

Philosophers.. in the field?!

Posted Image
Was This Post Helpful? 1
  • +
  • -

#9 leibniz76   User is offline

  • D.I.C Head

Reputation: -11
  • View blog
  • Posts: 89
  • Joined: 02-May 14

Re: what language should i learn next

Posted 01 December 2014 - 07:25 PM

View Postmacosxnerd101, on 01 December 2014 - 08:23 AM, said:

Also, philosophers are full of bullshit. That's what they eat and why we send them out in the fields to dine. It's a real problem.


That's why I'm building this calculator: so that I don't get perceived as a bullshitter.

Ok, it seems I don't know the difference between the language itself and the IDE editor. What are some of the best IDE editors out there? Is there a good IDE editor for LISP and Prolog?
Was This Post Helpful? 0
  • +
  • -

#10 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12362
  • View blog
  • Posts: 45,476
  • Joined: 27-December 08

Re: what language should i learn next

Posted 01 December 2014 - 08:19 PM

Quote

That's why I'm building this calculator: so that I don't get perceived as a bullshitter.

I was being snarky. Are you familiar with the dining philosopher's problem?

Quote

What are some of the best IDE editors out there? Is there a good IDE editor for LISP and Prolog?

The Functional Programming Forum is a great place to visit. Lots of good resource threads there. A cursory Google search for "Getting started with Lisp" or "Getting started with Prolog" is also a good idea.
Was This Post Helpful? 0
  • +
  • -

#11 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11224
  • View blog
  • Posts: 19,242
  • Joined: 19-March 11

Re: what language should i learn next

Posted 01 December 2014 - 08:40 PM

The standard editor for Lisps is Emacs. Some flavors of Lisp also have their own environments - Dr. Racket, Franz Lisp, InterLisp, etc. - but Emace is the basic for most people, and it includes a lot of useful tooling.

But like modi says, don't get hung up on the tools. The language is the important thing. I suggest you get hold of a copy of The Little Schemer and start there.
Was This Post Helpful? 0
  • +
  • -

#12 leibniz76   User is offline

  • D.I.C Head

Reputation: -11
  • View blog
  • Posts: 89
  • Joined: 02-May 14

Re: what language should i learn next

Posted 04 June 2015 - 07:21 PM

Ok, I'm almost ready to switch to a new language. I've narrowed it down to Python or Java. I want to write a huge program, a natural language parser. On this website 80% of the natural language parsers are written in Java:

[url]http://en.wikipedia.org/wiki/Outline_of_natural_language_processing#Natural_language_processing_toolkits[/url]

That's a good argument for Java. Further someone else, I forget who, had this to say:


And if you intend to write huge programs with many data objects with Python, then forget it. You will spend the rest of your life debugging, because it is dynamically typed language, some time or the other (while upgrading the application in future) you will tend to replace some variable already used (commonly used variables like 'temp', 'i' etc.), and the program will start behaving unexpectedly during runtime (and may perform okay during debugging)

However, I've been looking at the Python syntax versus the Java syntax and Python just seems so much easier that I will spend far less time debugging.
Was This Post Helpful? 0
  • +
  • -

#13 jon.kiparsky   User is offline

  • Beginner
  • member icon


Reputation: 11224
  • View blog
  • Posts: 19,242
  • Joined: 19-March 11

Re: what language should i learn next

Posted 04 June 2015 - 07:55 PM

Quote

And if you intend to write huge programs with many data objects with Python, then forget it. You will spend the rest of your life debugging, because it is dynamically typed language, some time or the other (while upgrading the application in future) you will tend to replace some variable already used (commonly used variables like 'temp', 'i' etc.), and the program will start behaving unexpectedly during runtime (and may perform okay during debugging)


I have worked pretty extensively in both languages, and I can tell you that this is nonsense. It is possible to write programs that will fail in both languages, and it is possible to write programs that will be difficult to maintain, but this is what it means to write in a turing-complete language: it is a language which can write ANY program, even a broken one.
It would be possible to claim that Java's strict type system allows for some compiler checks that Python can't do, sure. I would even go one further and assert that Java is the only language that I know of which is specifically engineered to be safe for enterprise use, meaning it is explicitly designed for use by programmers widely distributed in time and space (ie, globally situated teams maintaining a codebase over a period of years).

That's all well and good, but to claim that it is not possible to write "huge" programs in python is simply insane, since there are many, many counter-examples to choose from. Good engineering practice, good tests, and good design are required no matter what language you write in, and you can easily write horrible messes in Java, just as you can in python, simply by ignoring these things.

I would say the only real argument not to write your natural language parser in Python is that it's already more or less been done, so you'd be wasting your time.
Was This Post Helpful? 0
  • +
  • -

#14 ishkabible   User is offline

  • spelling expret
  • member icon





Reputation: 1747
  • View blog
  • Posts: 5,898
  • Joined: 03-August 09

Re: what language should i learn next

Posted 05 June 2015 - 03:48 AM

Rather off topic and kinda rant-ish but there is something I want to debunk. Also this is not saying you should learn Prolog or Lisp. They are fine languages. I don't work in AI but I sorta used to as a code monkey. I used Java and Python. I helped develop another tool that was heuristic based in C# as well.

Quote

..., but for AI of this sort, various flavors of Lisp are the traditional approach.

I used to tote this line because I read it was true. Also, I'm sure it was true at one time. Prolog also used to be used for AI type things. CLIPS used to be considered AI even more recently. IMO "Lisp is for AI researchers" is probably a thing from back before the AI winter. We were quite a bit more practically minded after the AI winter (it is what I got us out of it)

This is not the current state of the filed anymore however. Most AI research is machine learning or something else heavily numerical; I'd say the most popular language is Java for this sort of stuff. My claim to knowledge is that I spent about 2 years in a machine learning group as a programmer and have used the most recent tools in the area. I didn't get that into but it was still my job. The stuff that isn't is either "automated theorem proving" or AGI (artificial general intelligence). Automated theorem proving isn't considered AI anymore; probably because that's not what it is used for (it is now used for verification and other related tasks). Prolog and Lisp are definitely in no modern tool I can think of. I can't speak for AGI but I know that they use a mix of exact and probabilistic/numerical methods.

examples of modern AI libraries/projects and work and the language used (this is the kind stuff that is actually used in things you regularly use):
Java - https://opennlp.apache.org/
Python - https://github.com/e...belief-networks
Java - http://nlp.stanford.edu/
Java - https://cs.gmu.edu/~...b/projects/ecj/
Java - http://www.cs.waikat...~remco/weka_bn/
C++ - https://code.google..../tesseract-ocr/
C++/Python/R - state of the art dynamic topic modelers - http://www.cs.prince...w/resource.html
C with Java, C++, and Python bindings - http://opencv.org/

modern day techniques/topics:
Baysiean networks - probability and numerics based
Conditional random fields - probability and numerics based
Markov Networks - probability and numerics based
Nuereal nets - numerical algorithms
Topic modeling - mostly numerically based
Genetic Programming - this is a stand out in that fitness is really the only numerical thing about it. Still it is not well suited to LISP or Prolog
Computer Vision - I don't know all the techniques but rest assured this isn't well suited to prolog or lisp. Nurel nets and probabilistic methods are often used along side image processing algorithms
Natural Language processing - heavily uses conditional random fields and other graphics models to parse and learn all sorts of things about natural language. check out StanfordNLP for state of the art details.

edit:
I thought I should add that the buzz words right now are "Big Data" and "Deep Learning". I think these are kinda ill defined but even in all their vuagness I can tell you they don't really have anything to do with Prolog or Lisp.

Ok. I'm done. Just stop saying Lisp and Prolog are AI languages. It's now not the case and the fact that programmers still think that is probably a historical artifact.

Sorry.

This post has been edited by ishkabible: 05 June 2015 - 04:00 AM

Was This Post Helpful? 0
  • +
  • -

#15 leibniz76   User is offline

  • D.I.C Head

Reputation: -11
  • View blog
  • Posts: 89
  • Joined: 02-May 14

Re: what language should i learn next

Posted 05 June 2015 - 05:55 AM

View Postishkabible, on 05 June 2015 - 10:48 AM, said:

SNIP


What about the claim that python is not good for big programs?

This post has been edited by jon.kiparsky: 05 June 2015 - 07:38 AM
Reason for edit:: Please don't quote the entire post above you

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2