If you just want to learn programming and logic for the pure interest of the subject, then personally I would go with C or assembly, and tinker with embedded stuff.
OO Java or Python.
So as you can see, it really comes down to what you want to learn it for. I am making an assumption that by mentioning LAMP and Ruby that you are looking for web languages? If that is the case then Ruby, Scala or PHP will suffice.
But, take note, with the way web apps are moving JavaScript is your best bet, as more and more people are dumping the server side web templating languages and implementing their view logic in HTML / CSS / JavaScript.
Personally if I where starting out, I would learn how to build the front end with HTML / CSS / JavaScript and then learn how to implement REST services to supply data to that front end, in one of the aforementioned languages.