news.only-4-geeks.com Forum Index » Programming | Goto page Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 Next |
|  | Whats the best language to learn... |  | |
| | | Jean-Claude Arbaut |  |
| Posted: Thu Aug 21, 2008 9:38 pm Post subject: Re: Whats the best language to learn... |  |
gremnebulin a écrit :
| Quote: | Programming should be for everyone and if that means using easy languages then I don't see a problem.
You've never had to fix code written by a non-programmer?
|
In a program in PL/I, to compute n modulo 10: convert to a string and take the last character, then convert to an integer. Funny, isn't it ? |
| |
| | | Jean-Claude Arbaut |  |
| Posted: Thu Aug 21, 2008 10:03 pm Post subject: Re: Whats the best language to learn... |  |
Gits a écrit :
| Quote: | What's the best language to learn as a beginner, for someone like I who has never programmed in any language before? I'm interested in learning python or c++, which would you say is the least complicated?
|
How to start a flame war :-)
Just for the hell of it : brainfuck  |
| |
| | | cr88192 |  |
| Posted: Thu Aug 21, 2008 10:23 pm Post subject: Re: Whats the best language to learn... |  |
| |  | |
"Chris M. Thomasson" <no@spam.invalid> wrote in message news:7Fgrk.5441$Is1.5317@newsfe04.iad...
| Quote: | "cr88192" <cr88192@NOSPAM.hotmail.com> wrote in message news:caa07$48aba96f$7937c448$26576@saipan.com...
"Chris M. Thomasson" <no@spam.invalid> wrote in message news:NZJqk.268$RV7.133@newsfe01.iad... "Jon Harrop" <jon@ffconsultancy.com> wrote in message news:g8fote$3ju$2@aioe.org... Gits wrote: What's the best language to learn as a beginner, for someone like I who has never programmed in any language before? I'm interested in learning python or c++, which would you say is the least complicated?
OCaml on Linux and F# on Windows.
If you have a Mac, delete the OS and install either Linux or Windows. ;-)
Why destroy MAC OS in favor of WinCrap?
to spend a lot of extra memory and violate the EULA I guess...
an entry-level Windows box is probably cheaper... (and if one gets the right entry level windows box, they can put a pirated Mac-OS on it, thus gaining a much cheaper Mac...).
Who in the world would want a pirated copy of any OS? Do you think the pirates are actually going not put something in there? Humm... Think of the following contrived case:
Mr. Moron get pirated copy of software. The pirate replaced the installation software with his own, and simply renamed the original something else... Mr. Moron executes the pseudo installer, which of course installs Mr. Rootkit, and then conveniently runs the real installer and Mr. Moron thinks everything is cool and feels clever because he did not have to pay for the software... Then, several years later, Mr. Moron realizes that his computer was involved in illegal activity and the feds bust him and ask him why question material was residing on his computer... The clever Rootkit hides its tracks because its a freaking hyperviser; oh crap!
|
some people also live in a world where they can't really legally get software (most of the time), for example, because, for example, they have parents who don't exactly believe in paying for software (aka, because they don't get some physical object, there is nothing "actually" there that needs paying for).
this is combined with said people downloading whole lots of warez, and getting not exactly small amounts of viruses...
| Quote: |
oh well, modern HW is great that way...
(actually, I have not done this personally, but I guess some people do so...).
:^|
|
sadly enough, I was actually being mostly serious on both points... (the former more being about standardization and versatility than ease of piracy though...).
but, yes, the above is technically correct, me not personally having much need to use Mac-OS...
mostly, I just use opensource stuff, personally not liking piracy that much, but for some things (particularly, the OS), it ends up being inevitable (Linux being not entirely a good alternative at this point, albeit it is hoped some for a future where Linux can be used instead, thus making it possible to avoid warez altogether).
the problem though with commercial software, is that it costs money, and absent having a job/... (or parents willing to pay for it), it is not possible to get much (FFS it is hard enough even to get books...).
money is needed for many other things as well (such as the basic HW, the electricity to run it, internet access, food, ...). one learns to minimize resource use (for example, not eating more than needed, doing most of their lighting with a flourescent lamp, ...). actually, another thing one begins to notice is the absurdly low caloric content of many food items (FFS one only getting like 200 from a packege of ramen, ...), meaning one has to eat large amounts just to break 1000 cal/day.
(with a legal OS costing a good deal more than a large volume of ramen, or refried beans, and a good portion the cost of a whole damn computer...).
so, life is tradeoffs... |
| |
| | | cr88192 |  |
| Posted: Thu Aug 21, 2008 10:35 pm Post subject: Re: Whats the best language to learn... |  |
"Juha Nieminen" <nospam@thanks.invalid> wrote in message news:asgrk.124$eq4.109@read4.inet.fi...
| Quote: | cr88192 wrote: Indeed, I neglected the Mac game market. Oh no, wait... Don't tell me you are also one of those who has the odd misconception that there are no games for the Mac.
maybe mac is all about business and profits for the company... oh wait...
Just to make things clear, it suffices to go to apple's own website if you want games:
LINK
Let's see, The Sims, Tomb Raider Anniversary, Neverwinter Nights 2, Fable: The Lost Chapters, Age of Empires III, Spore...
Sure, there may not be as many games as for Windows, but still...
|
I was partly making a joke there...
Apples' stuff costs more, but MS makes more profits... |
| |
| | | cr88192 |  |
| Posted: Thu Aug 21, 2008 10:54 pm Post subject: Re: Whats the best language to learn... |  |
| |  | |
"Pascal J. Bourguignon" <pjb@informatimago.com> wrote in message news:87y72qcjhr.fsf@hubble.informatimago.com...
| Quote: | thomas.mertes@gmx.at writes:
On 20 Aug., 20:39, Roman Werpachowski <rom_a_n@gDELTETiHSm_ai_lo.com wrote: thomas.mer...@gmx.at wrote: I think that it is a typical reaction for a fan of language X to have the opinion that all features not present in his language are not needed or even bad. That changes in the moment such a feature is introduced to language X.
I remember several discussions of this sort: - Old FORTRAN fans arguing that recursion is bad. - Old BASIC fans arguing that structured statements are not needed. - Fans of dynamical typed languages arguing that compile-time type checks are bad. - Fans of non-OO languages arguing that OO is bad. - Fans of Java (before generics were introduced) arguing against templates / generics. - Fans of statically typed languages arguing that run-time type checks are bad.
|
no, they just eat up time if they are not needed, and in many cases obvious programming errors can be missed by dynamic typing (compile-time error reporting can be useful here).
IMO, it is better to have both options available, but leave static types as the default (most of the time, they are what is most appropriate), making dynamic types an optional type (the ability to have a convinient dynamically-typed container or values can be rather useful sometimes...).
this also makes the compiled code faster, since a much greater portion of the time, the compiler knows exactly what it is looking at (yes, inferrence works, but much of the time, it can miss really obvious cases, and often makes it an added hassle for the coder to add the needed type specifiers to make it work well).
| Quote: | - Fans of statically typed languages arguing that you mustn't run your programs before passing hours supplying statically typing compiler inadequacies.
|
this is actually backwards IME. static typechecking actually makes development faster by catching many more of the coders' errors up-front, saving time that would have otherwise been spent tracking down bugs and similar later on.
| Quote: | There is also a difference between overloading existing operator symbols and inventing new ones. For function names you are not restricted to a set of predefined function names. Why do people think that it is naturally to restrict the operator names?
Well, most of the good symbols are already taken. What new operator symbol could you add to C++?
???????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????? amongst a few others...
|
and then give people the much needed hassle of then being able to both read and type said code?...
ASCII is limited, but at least it is convinient to read and type with a variety of editors and similar... |
| |
| | | Pascal J. Bourguignon |  |
| Posted: Thu Aug 21, 2008 10:57 pm Post subject: Re: Whats the best language to learn... |  |
| |  | |
thomas.mertes@gmx.at writes:
| Quote: | - Fans of statically typed languages arguing that you mustn't run your programs before passing hours supplying statically typing compiler inadequacies. I am not sure I understand your sentence correctly. Do you think that it is necessary to supply type information for hours after finishing your programming just to make the programs acceptable for the compiler?
|
This is to say that a REPL where your program can run even if only partially entered seems to me to be in practice more expedient and faster than one where the compiler must first check that everything is fine, then the link editor must check that it has all the bits and finally you can try what you've implemented so far.
And also, that it takes me four times the time it takes me to write a routine in lisp, to translate it into C++.
| Quote: | I do not think that the programming process is slowed down with compile-time type checking. Some reasons for this opinion are here: LINK
|
Including time to debug them.
| Quote: | Your view of wasting time by thinking over types is not part of the argumentation in the FAQ (which will need to be improved). So I try to address it here:
Every good programmer (and I assume you are one) has some concept about what values will be hold by variables or parameters and what values will be returned by functions.
For example: This variable will hold a list of s-expressions. That parameter will hold the s-expression I want to process. This function will return the number of bytes used to represent the s-expression in memory. This examples might not be LISP like, but I am quite sure that you do think over such things while you are programming.
|
Indeed, types are still kept in mind, even with dynamically typed languages. But minds are not as formal as formal systems: we can deal with generic typing and unspecific typing more efficiently than with specific strict typing.
When you write a function in a dynamically typed language, most often, this function will be more generic than what you thought at the beginning. In essence, with dynamic typing you are writting generic code by default.
When you must specify static types, you always restrict the applicability of your code.
| Quote: | What I say is: Supplying type information is not something you do after you finished programming. Thinking over types (what values will be holded/returned) is something you need to do, while you are programming. You seem to deny it, but it is really part of the programming process.
|
What I say is that when you write code, that could process the most general mathematical structure (eg. a group),
1- your statically typed programming language just won't have the general notion you have in mind as a type (or you will need to write kilometers of code to teach it),
2- it is still natural to _think_ about some concrete instance of the general structure to develop your function, but there's no reason to impose the concrete example as a limit of the result.
So if I write:
(defun fact (x) (if (zerop x) 1 (* x (fact (- x 1)))))
or equivalently (in Common Lisp, (+) is the neutral of + and (*) is the neutral of *):
(defun fact (x) (if (= (+) x) (*) (* x (fact (- x (*))))))
I may write it thinking about integers, but it can work equally well on polynoms or matrices, and there's no reason to force me to specify that X must be of integer type. Even if I thought about integers, as a prototype of a field.
-- __Pascal Bourguignon__ LINK
CAUTION: The mass of this product contains the energy equivalent of 85 million tons of TNT per net ounce of weight. |
| |
| | | Guest |  |
| Posted: Thu Aug 21, 2008 11:08 pm Post subject: Re: Whats the best language to learn... |  |
| |  | |
On 21 Aug., 20:26, p...@informatimago.com (Pascal J. Bourguignon) wrote:
| Quote: | thomas.mer...@gmx.at writes: On 20 Aug., 20:39, Roman Werpachowski <rom_a_n@gDELTETiHSm_ai_lo.com wrote: thomas.mer...@gmx.at wrote: I think that it is a typical reaction for a fan of language X to have the opinion that all features not present in his language are not needed or even bad. That changes in the moment such a feature is introduced to language X.
I remember several discussions of this sort: - Old FORTRAN fans arguing that recursion is bad. - Old BASIC fans arguing that structured statements are not needed. - Fans of dynamical typed languages arguing that compile-time type checks are bad. - Fans of non-OO languages arguing that OO is bad. - Fans of Java (before generics were introduced) arguing against templates / generics.
- Fans of statically typed languages arguing that run-time type checks are bad. I do not say that they are bad, I just think that compile-time type |
checking is superior and should not be ommited. Run-time type checks can be removed under certain circumstances (we already talked about the circumstances). The always growing explanation of my reasons for compile-time type checking is here: LINK
| Quote: | - Fans of statically typed languages arguing that you mustn't run your programs before passing hours supplying statically typing compiler inadequacies. I am not sure I understand your sentence correctly. |
Do you think that it is necessary to supply type information for hours after finishing your programming just to make the programs acceptable for the compiler?
I do not think that the programming process is slowed down with compile-time type checking. Some reasons for this opinion are here: LINK
Your view of wasting time by thinking over types is not part of the argumentation in the FAQ (which will need to be improved). So I try to address it here:
Every good programmer (and I assume you are one) has some concept about what values will be hold by variables or parameters and what values will be returned by functions.
For example: This variable will hold a list of s-expressions. That parameter will hold the s-expression I want to process. This function will return the number of bytes used to represent the s-expression in memory. This examples might not be LISP like, but I am quite sure that you do think over such things while you are programming.
You may not think about this as type information, but it the base for exactly that. IMHO you have this type information already in your mind when your are programming. When your programming language supports types out of the box it has probably predefined primitive types (like integer and float) and abstract data types (like array, list, hash, struct) which support the process of bringing your concepts of which values will be holded or returned to the formalized types the compiler will accept.
What I say is: Supplying type information is not something you do after you finished programming. Thinking over types (what values will be holded/returned) is something you need to do, while you are programming. You seem to deny it, but it is really part of the programming process.
Greetings Thomas Mertes
Seed7 Homepage: LINK Seed7 - The extensible programming language: User defined statements and operators, abstract data types, templates without special syntax, OO with interfaces and multiple dispatch, statically typed, interpreted or compiled, portable, runs under linux/unix/windows. |
| |
| | | Pascal J. Bourguignon |  |
| Posted: Thu Aug 21, 2008 11:16 pm Post subject: Re: Whats the best language to learn... |  |
| |  | |
"Bartc" <bc@freeuk.com> writes:
| Quote: | I've got as far as being able to run the following, after a few hours' work; this prints a table of squares:
(setq n 1) (while (<= n 10) ((println n " " (* n n)) (setq n (+ n 1))))
I've no idea whether this is proper Lisp or not; for example given a list that does not start with a function/operator name, I just evaluate all the elements. And these 'while' and 'println' functions are built-in ones of mine (I haven't done defun yet).
Extending this is really easy, however I think I've only just scratched the surface of what Lisp is all about. If I continue with this it will be very much my own dialect (in other words, one I can get my head around).
|
Well congratulations!
It's not often that we see people advised to learn C (or any other programming language) spend a few hours' work implementing a compiler for a subset of C, instead of, eg. downloading an existing implementation and a reading tutorial from the web.
But with lisp, it's possible! What a learning experience! :-)
-- __Pascal Bourguignon__ LINK
ADVISORY: There is an extremely small but nonzero chance that, through a process known as "tunneling," this product may spontaneously disappear from its present location and reappear at any random place in the universe, including your neighbor's domicile. The manufacturer will not be responsible for any damages or inconveniences that may result. |
| |
| | | cr88192 |  |
| Posted: Thu Aug 21, 2008 11:31 pm Post subject: Re: Whats the best language to learn... |  |
"William Pursell" <bill.pursell@gmail.com> wrote in message news:9b9038b5-9b9f-4425-88ab-1709ebbe1737@56g2000hsm.googlegroups.com...
| Quote: | On 21 Aug, 00:52, Juha Nieminen <nos...@thanks.invalid> wrote:
You used an #include library in your code. Why is it ok for you to do that but not for me?
What is a "#include library"? Libraries are not included, only headers are.
|
this, of course, assumes that the poster has much real idea how any of this stuff works, or even what exactly is actually going on. at this point, I begin to have doubts...
oh well, existence vs essence and so on... |
| |
| | | cr88192 |  |
| Posted: Fri Aug 22, 2008 12:05 am Post subject: Re: Whats the best language to learn... |  |
| |  | |
"Pascal J. Bourguignon" <pjb@informatimago.com> wrote in message news:87myj5c0iy.fsf@hubble.informatimago.com...
| Quote: | "Bartc" <bc@freeuk.com> writes: I've got as far as being able to run the following, after a few hours' work; this prints a table of squares:
(setq n 1) (while (<= n 10) ((println n " " (* n n)) (setq n (+ n 1))))
I've no idea whether this is proper Lisp or not; for example given a list that does not start with a function/operator name, I just evaluate all the elements. And these 'while' and 'println' functions are built-in ones of mine (I haven't done defun yet).
Extending this is really easy, however I think I've only just scratched the surface of what Lisp is all about. If I continue with this it will be very much my own dialect (in other words, one I can get my head around).
Well congratulations!
It's not often that we see people advised to learn C (or any other programming language) spend a few hours' work implementing a compiler for a subset of C, instead of, eg. downloading an existing implementation and a reading tutorial from the web.
But with lisp, it's possible! What a learning experience! :-)
|
yes, true.
admitted, C is a total pain to write a compiler for (my case took months to even really get much of anything working, and about 1.5 years after starting the project, it is still far from "complete" as far as a strict definition goes...). of course, no one really claims that C and C++ are exactly easy languages to write compilers for (actually, I suspect they are probably some of the most difficult...).
but, much simpler languages (such as lisp and scheme, or OTOH, forth or postscript), one can have functioning implementations written very quickly, and with the parser+compiler+interpreter often taking very little code, which is a good point.
one can also end up with a 10x or more difference in terms of the compiler's code-base as well... but, then again, mine is still small vs others (for example, gcc is in the Mloc range from what I remember, ...).
none the less, these big and heavy languages have some major strong points as well.
so, the big questions are in which ways and to what extent to compete...
or such... |
| |
| Page 18 of 28 .:. Goto page Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 Next | |
|
|