As the title says, I'm new to programming, I've only ever done basic and slightly advanced Windows DOS language, and I know that is pretty limited in what it can/can't do. I hear that CL/Scheme are the main languages on this board, but I've also heard that they're old and obsolete, someone even told me that Lisp can't call external programs, is that true?
A couple people told me Python was a good language to learn, and I know a lot of programs are written in C/C++, and I've heard of some olders ones like COBOL, FORTRAN, Haskell, and a few others.
I've heard of these dynamic and static typing things, and I believe strong and weak typing, can anyone explain the difference? I've been involved in computers for most of my life, and I think it's time to advance my computer skills, and I could think of no better place than 4chan's /prog/, namely because I don't know of any other places, so....
Can /prog/ help me?
Name:
Anonymous2010-01-11 23:51
Honestly learn Java like every underage faggot, then expand into something like C/C++ if you want to make games or Perl/Python if you want to learn solid scripting languages.
Name:
Anonymous2010-01-12 0:03
I've also heard that they're old and obsolete, someone even told me that Lisp can't call external programs, is that true?
If you're on Window, you don't know what calling external programs means.
I know a lot of programs are written in C/C++
No programs are written in C/C++.
I've heard of these dynamic and static typing things, and I believe strong and weak typing, can anyone explain the difference?
Wikipedia can.
Can /prog/ help me?
Most certainly. It probably won't, though.
1. Read SICP
2. Learn FIOC
3. Read K&R
4. You know enough to choose for yourself
Name:
Anonymous2010-01-12 0:09
Static typing means that the code is checked for errors at a compile time, meaning that these are languages that translate from source code to an executable format. A dynamically-typed language is much like JavaScript or HTML in that the code works just by being written and that any errors are checked when the code is run. All C languages, Java, and Perl are examples of static languages that require compiling; an example of a dynamic language is Lisp, Python, and JavaScript (HTML also loosely demonstrates how dynamic typing works, even though it does not count).
A strongly-typed language has virtually immutable, common datatypes: int for whole numbers, double and float for decimals, char for single characters, String for groups of characters, and a variation of boolean data are common examples. A weakly-typed language does not always specific what type of data a variable may contain. In one line you can declare the variable with boolean data ("true"), in the next line you can reassign it a number (5.2), and several lines later that same variable can contain a string ("Hello World!"). C languages and Java have strongly-typed variables and Visual Basic is an example of weak-typing.
Note that weak- and strong-typing issues do not usually impact object-oriented polymorphism.
>>3
I don't understand how things aren't written in C, I thought Windows was C-based?
The only thing I've ever done with programming was first design a very basic python program that asked for a number, and that number corresponded to a if-elseif-else statement that ran games/applications, sort of as an extension to the Start Menu, and then later I redid it in Ruby, learning that Ruby was easier to do this in, according to a few people I asked.
I'll check up on that static/dynamic, weak/strong, and apparently manifest/implicit.
The only differences I know between C and Sepples, I lurk /prog/ on the occasion, is that C is fast and lightweight, and Sepples is bloated and can be slow, but has about every library you'd ever need.
SICP, that enormous fucking manual from some university using Scheme as the teaching language?
FIOC = Frame input/output controller?
K&R = The book The C Programming Language ?
Thank you, the only person who did what I expected. You sir, are an EXPERT PROGRAMMER
>>7 I don't understand how things aren't written in C, I thought Windows was C-based?
I think you're misunderstanding something. No programs are written in C/C++ because there is no such language.
Name:
Anonymous2010-01-12 2:40
>>7
First, if something is compiled to binary, it's just that. If you have something that can read said binary that's a program. Scripting languages also run programs, because it's a set of instructions for the computer to run till complete (hence a program). C isn't some magical language that gets compiled down to magic computer dust that works. It's compiled down to machine code that the computer executes. If anything is eventually executable, it is a program.
Just remember that computer science has as much to do with computers as astronomy has to do with telescopes. The language really has nothing to do with it.
>>7
C++ is as fast or faster than C. But C++ makes it easier to generate and hide bloat if you don't know what's going on behind the scene. It requires a lot of experience and annoying trivia to get right, unless you limit yourself to a small subset of it.
>>15
Er, that's what anyone who has a clue about programming actually believes. Where did you come from, and why don't you go back there?
Name:
Anonymous2010-01-12 9:36
>>14
Really? While we can argue whether or not HTML counts as programming, I challenge you to show us a reasonable definition of "code" that HTML doesn't match.
>>7 I don't understand how things aren't written in C, I thought Windows was C-based?
What >>3 is getting at is that lots of programs are written in C and lots in C++, but that there is no such thing as C/C++. Which in turn hints at the fact that while many people think them to be more or less the same thing, the two languages are really completely different, much more so than they seem to be at first glance.
The only differences I know between C and Sepples, I lurk /prog/ on the occasion, is that C is fast and lightweight, and Sepples is bloated and can be slow,
Correct so far... but has about every library you'd ever need.
Not by itself if doesn't. Now if you'd mean "there are many libraries available specifically for C++", there is some truth in that.
SICP, that enormous fucking manual from some university using Scheme as the teaching language?
The one and only. Not a bad book by any means, but certainly not an easy one either. FIOC = Frame input/output controller?
That too, but >>3 probably meant The Forced Indentation Of Code, a python book. K&R = The book The C Programming Language ?
Yup.
As for actual advice, it doesn't really matter what language you learn to program in; you should ultimately learn several, and the order isn't important. So pick a language you feel comfortable about (python is a fine choice, I don't know enough ruby to judge it in this matter), learn programming using it (which is not the same at all as learning the language!), and then go learn some other languages. If you want to be serious about programming, you should at least learn C, a scripting language like python, and a functional language like lisp.
Name:
Anonymous2010-01-12 10:10
>>17
Programming languages must be Turing-complete.
Name:
Anonymous2010-01-12 10:15
>>20
You might want to also learn a pure OOP language like Smalltalk. CLOS doesn't give off the pure joy of its own conditional constructs.
Name:
Anonymous2010-01-12 10:35
As the title says, I'm new to programming, I've only ever done basic and slightly advanced Windows DOS language, and I know that is pretty limited in what it can/can't do.
Windows batch scripting is limited, but it's also touring complete, however you shouldn't use it for real work or you'll tear your hairs out of your head.
I hear that CL/Scheme are the main languages on this board, but I've also heard that they're old and obsolete, someone even told me that Lisp can't call external programs, is that true?
CL and Scheme are not obsolete, at least no more than most other programming languages out there. CL's standard lacks support for multi-threading, FFI and networking, but it's de-facto implemented, so it just works. Other languages like C don't have support for these things either, but as time passed people have standardized these things(like POSIX), or implementations provided support for them(like Win32 API). You can do in them anything you could do in any other language, except they make metaprogramming a lot more easy and fun. Due to runtime library overhead, it's unlikely you'll write device drivers or loadable kernel modules in them (unless your OS is a Lisp OS), but it's possible. As for calling external programs, most implementations provide a `run-program' function, however if it didn't exist, you could just make your own using the FFI.
CL and Scheme are old languages, but why would that matter? C is an old language as well, and people still use it. A language only dies or disappears into irrelevance when something better appears making it unnecesarry. It's very hard, if not impossible to copy Lisp's features without making yet another Lisp. People would just end up reimplementing Lisp clumsily if they didn't know how to do it right(see: XML "languages").
A couple people told me Python was a good language to learn, and I know a lot of programs are written in C/C++,
Python is considered a good newbie language, and it has many libraries, but it's just another scripting language, so it shouldn't be the only thing you'll learn.
C is a glorified portable macro-assembler which can perform register allocation, which means it's almost one of the languages which produce relatively fast code as long as you have a good compiler. C++ is an "OOP" language which tries to stay compatible with C, but it ended up being quite large and having a very tricky syntax and unpredicatable characteristics. It's used in games and other places where they have a lot of complexity to deal with, but also want C's speed. There are other good alternatives to C++, but I don't expect the industry to change their ways anytime soon.
and I've heard of some olders ones like COBOL, FORTRAN, Haskell, and a few others.
COBOL is old, and unless you want to maintain ancient COBOL codebases for cold hard cash, there's no reason to learn it.
FORTRAN is liked by number-crunching people and it's basically a straightforward imperative language. It's not much different from C or Pascal at the core.
Haskell is quite a young language, why do you call it old? It's a statically typed(with type inferrance) purely functional lazy language. It shows very interesting ways to do programming, albeit I don't think it's the most practical language for writing real-world applications, but if you think in types, you should give it a chance.
I've heard of these dynamic and static typing things, and I believe strong and weak typing, can anyone explain the difference? I've been involved in computers for most of my life, and I think it's time to advance my computer skills, and I could think of no better place than 4chan's /prog/, namely because I don't know of any other places, so....
Static typing - types are tied to variables and known at compilation: either your specify the types(like C, C#, Java, ...), or the compiler can infer types from how they are used(Haskell, ML,...). Static typing can sometimes be constraining, but it allows for better speed and ability to be certain of the correctness of typing(unless you go sprinkling casts all over the place or deal with pointer arithimethic like in C, in which case things can be fairly unsafe if done wrongly).
Dynamic typing - variables are usually just names and can hold any type. Values can be typed, but variables are usually not typed. Type errors can manifest at runtime instead of compile time. This allows for much more flexible programming, but you should test your code more rigurously to avoid errors. Some implementations may even provide some type inferrance for dynamicly typed languages to help you weed out some errors and increase performance. Some dynamicly typed languages can be very safe if they have a good condition/error-handling/exception system, but others can be brain-dead when it comes to safety if they just implicitly cast values from one type to another(such as PHP does).
Can /prog/ help me?
Read SICP, K&R, learn some assembly too. Make sure to have implementations of the languages you're learning ready, as this can help greatly.
>>25
Is a markup language a real programming language? I think the context here is that programming languages are the same as general-purpose programming languages.
>>29
While I do agree that HTML isn't really 'code', code can be data and data can be code. Data can be interpreted or even compiled to perform some tasks. The action of viewing a HTML file results in code being executed.
>>30
Yeah, I walked right into that one. My point stands however, markup isn't code. It does not represent machine instructions, but rather something more abstract.
Name:
Anonymous2010-01-12 14:49
>>26,29-31
I hate to be the one to point it out, but YHBT.
OP here. I know that SICP is structured with Scheme, but could one use CL? I don't think I want to use Scheme. I'm going to look up the differences, but I hear Scheme is more for math and shit, though I'm probably wrong.
Is The Forced Indentation of Code a real book? A googling of it brings me back here...
Before I forget, is K&R structured like SICP, where you learn by doing things with C itself, or is it wildly different?
Name:
Anonymous2010-01-12 17:44
>>34
Or am I retarded and not realizing that when you said "learn" FIOC you meant to make it a habit to indent my code to make it legible?
>>30,31
HTML is not a programming language as one cannot simulate a Universal machine with it. The best one can do is simulate HTML Turing machines.
Name:
Anonymous2010-01-12 18:57
>>34 OP here. I know that SICP is structured with Scheme, but could one use CL? I don't think I want to use Scheme. I'm going to look up the differences, but I hear Scheme is more for math and shit, though I'm probably wrong.
SICP teaches programming in general, and the language it uses is Scheme. Some of the things it teaches are not always as well supported in more simple imperative languages, but the lessons are applicable in general. If you want to learn CL, there are quite a few good books teaching it (PG's ANSI CL, Practical Common Lisp, Common Lisp: A Gentle Introduction to Symbolic Computation, PAIP. The third book I mentioned is only intended for total beginners who don't have programming experience.), but they're not exactly replacements for SICP(however HtDP does aim to be one, but that uses Scheme as well). CL is a very nice language, but it might be hard if you want it to be your first language - it might be a bit too much information to digest in one go. Scheme is a minimalistic Lisp, which is why it's used more for teaching and in the academia(it can be used for practical things as well, but its initial (standardized) library is much less smaller than CL's). If you want to that route, you'll be able to read SICP and then learn CL from a book like PCL or ACL, however you might want to let go of a few arguably bad habits you learned from SICP, however I don't think it would be hard to do if you keep an open mind (that's the route I took).
Is The Forced Indentation of Code a real book? A googling of it brings me back here...
FIOC is just /prog/'s nickname for Python. It's not a real book. You can just pick any decent Python book to learn it.
Before I forget, is K&R structured like SICP, where you learn by doing things with C itself, or is it wildly different?
K&R is just C's book, it teaches how to program in C. It's also a good introduction to imperative programming.
To summarize:
You read SICP to learn the concepts and ways of designing programs. It teaches fundamentals and (pure and not so pure) functional programming. You might also learn some Lisp from it, but it's not a Lisp book by itself.
You read K&R to learn C and the imperative paradigm. Knowing C is useful for low-level tasks, but you might also want to learn some assembler to truly understand how things work under the hood.
If you want to learn other languages, just pick a good book for that languge/platform and learn it. It may be a problem for more popular languages if you don't know which are good - the higher the demand, the more saturated the market is with bad books.
Learning programming can be thought as learning programming paradigms and how to structure your code in general. If you understand a pradigm, you'll be easily be able to pick up new languages which use it.
While most books might not talk about doing shiny 'real-world' stuff that you might want to do, almost all languages support it in one way or another (portable or unportable ways). You can learn how to do interop stuff once you know your implementation and platform, and thus you'll be able to do any real world stuff in almost any real general purpose language, but that's just the dirty details that everyone gets to know.
Name:
Anonymous2010-01-12 19:14
>>39
Getting a Scheme setup now, and will start reading SICP soon, and then after that is done, will probably move on to learn Python in my interim, then C, and then maybe CL.