What's the best language for a complete beginner to pick up and learn?
I'm able to read through sources in various languages and understand whats happening on a fundamental level.
I want to learn a language over the next 3~5 months and i cant make any informed desicions on which.
Suggest the language best suited to an entry level programmer.
IN BEFORE SHITSTORM
Name:
Anonymous2007-04-26 4:08 ID:eiuU1als
JScript .NET
Name:
Anonymous2007-04-26 4:35 ID:lDuDf6D/
I'd say C and C++, but I'm probably biased. If you can already read source at an abstract level then you are miles ahead of being a beginner really, even if you have no clue how to write something yourself. If you already understand the idea behind variables and functions the next step is to learn the technical syntax, e.g. get a compiler and follow a tutorial to write 'hello world' in a language of your choice.
After you follow, say, 3-5 tutorials you'll know exactly which functions allow you to print to screen, how to take input from the user, and what the basic rules about variable operations are. Ostentibly it tends to just get easier from here, as you just keep following tutorials to learn the syntax for more and more advanced things, e.g. arrays, classes, etc.
Once thing that you need to learn though that a typical online tutorial could leave out is what is going on at the bit level (abstractly that is, the literal bit representations you will never need to commit to memory). Not just to understand pointers either, but so you appreciate what class inheritance does and what goes on when your program jumps from function to function.
Name:
Anonymous2007-04-26 4:43 ID:gmuymD6I
It depends what approach you want to take. If you wish to program on a relatively low level, then go for C. Otherwise choose something like VB.Net or Python for more high level.
Also, avoid stuff like Haskell or Prolog, for now.
Name:
Anonymous2007-04-26 4:55 ID:lDuDf6D/
Oh and let me add to my previous comment (>3). One barrier for beginners that people seem to forget is how you go about actually obtaining and installing a compiler in the first place. I remember I learned C/C++ through a class as an undergrad and was next to useless after the class ended because I was always had used the lab computers and had no compiler of my own.
For windows there are quite a few free C++ compilers that will install just as easily as any program. Microsoft Visual C++ (MSVC) is the standard windows compiler out there, and the 'Express edition' is free. However it is incredibly unintuitive to use (completely geared to large scale projects, I can't even figure out some of it). Dev C/C++ another compiler/IDE combo like MSVC but much more practical (personally I've had problems getting it to compile, but it might just be my end of things).
g++ is the GNU compiler that makes linux kiddies wet themselves, and it is probably tied (if not surpassing) MSVC in terms of being _the_ standard c++ compiler. It doesn't have an integrated development environment, so you'll only be interacting with it on a console/terminal to compile something you've written in notepad or what have you. The problem with g++ is that installing it (especially on windows) is one fucking pain. If you want g++ I happen to know possibly the ONLY online tutorial for installing g++ on windows that isn't made of fail.
Im stuck on a windows machine atm, my wife blatantly refuses to figure out linux (not that KDE was all that different from what she was used to, but it had no ZOMG WHERES MY ITUNES, HOW DO I TRANSFER OVER SONGS TO MY PROPRIETRY FORMAT SONY ATRAC MACHINE) the usual compatability bullshit.
So GCC + nix is out :(
Recomend me a decent c++ compiler that isnt from bloodshed.net
This is what I found to be the only pain free installation of g++ on windows. I also seem to remember using another tutorial at one point for compiling g++ from source on windows. I think it was because at the time the link I gave you didn't have the most recent version (I can see page has been updated since). In anycase the tutorial I used was
>>1
I highly recommend Python. I've never used Python, heck I don't even know Python, but it is good for beginners. It's very easy to use, and has no nonsense attached. It will also teach you good programming practices, forced indentation of code etc.
I definitely wouldn't pick up C++ right away. You'll get frustrated just trying to compile something, having to deal with stuff like ordering your classes, forward-declaring classes, header file disasters, etc. You can probably learn C right away, but it's very difficult.
Eventually though you will have to move to C/C++. It's the de facto standard for everything.
>>5 The problem with g++ is that installing it (especially on windows) is one fucking pain.
Colossal fail. To install g++ on a Debian box, apt-get install build-essentials. Most other Linux boxes have gcc pre-installed.
If you want g++ on Windows (i.e. MinGW), install Code::Blocks with integrated MinGW. It's a total joke to set up; it can even import your Linux makefile to generate a project file for Windows.
Don't use Dev-C++, and definitely DON'T use MSVC. Code::Blocks is incredibly sexy, and it's open source. Download RC2 and you'll be compiling programs with gcc on Windows in fifteen minutes.
Name:
Anonymous2007-04-26 5:49 ID:4pfsS9ku
My advice:
1. Start with anything simple. Pascal will be fine. Don't learn much of it, just the basic statements, expressions and operators, a couple of functions to play with, and how to define your own. Look for something with an IDE so that you can forget about compiling.
2. Now you have to shape your mind for it. You can read others' code, but you probably cannot figure how to write your own. Your mind needs to start working in an analytical way that will allow you to come up with your own algorithms. Play around, do simple exercises, try to think for yourself very hardly how to do things before looking at solutions.
3. Now you can do things on your own. Time to learn the tools. Forget Pascal and go for C if you want to learn things bottom-up (from a low-level perspective to abstract), or Python, Ruby or Lisp if you want to learn things top-down (from an abstract perspective to low-level). I suggest the earlier approach, because if you learn C after dynamic languages, it'll look so shitty and so much of a pain in the ass. So learn C. Use GCC on Linux and MinGW on Windows, without an IDE. Learn about compiling, libraries, and insanity. Don't bother with GNU autoconf, make and all that crap unless you have a purpose for them. You an use an IDE if you want interactive debugging though, it helps during learning. (In a few years your favourite debugging tool will probably be print, but for now let's use that.) Oh and by all means, do NOT learn Java. It'll fuck up your career and you'll end up hating it and dropping out of it. Don't bother with C++ either, too complicated.
4. Now you understand the real thing. You know how it works. But you need better abstraction, because C is very unproductive. C is only worth the time if you need to write performance critical applications or interact with the hardware or network more directly. Now you need a good programming tool. You can either read SICP for a more formal approach to it, or learn Python or Ruby for a more practical approach. Now it's the time to learn about object-oriented programming and functional programming. Pay special attention to functional programming. Enjoy the enlightening experience. You know you've been enlightened when C looks like shit and you became lazy. Again, DON'T learn Java. It's a bad language that introduces a poor object-oriented model, it doesn't properly support structured or functional programming, and it has a terrible, shitty API that will drive you insane. Don't bother with C++ either, too complicated and not a high-level language like you need.
(You will be through the "OMG OPTIMIZED" stage, where you care for performance and want things to run fast and wish your Windows games ran faster on your PC, or use Gentoo. However, your time is far more valuable than your hardware, so if you need better performance, buy better hardware and save the time. Plus early optimization will tend to fuck your programs all over.)
5. Ok, now you're all set. From now learn whatever you like to achieve satori. Or you can learn something to make bread. Prefer C++ over Java though, Java is the shit and you'll end up hating your job.
>>6
By being geared towards Xbox projects and being quite intimidating for hello world.
Like anything else, MSVC is pretty straightforward once you're used to it.
Mmm, I remember going through the "OMG OPTIMIZED" stage. What a waste of time that was. Still, I learned some interesting things I guess.
Name:
Anonymous2007-04-26 6:16 ID:WgsXgi3d
Speaking from a relatively inexperienced users perspective i torrented it, downloaded it, installed it (fucking epic install times for HUEG IDE)
then after 3 days of perseverence i deleted it.
Those 3 days where akin to a first time computer user stumbling upon /b/
Much WTF IS GOING ON?!?!?!?!?! was uttered, the real insanity is that ive got all the documentation and even a couple of text books geard towards developing in the environment. the fact is the overwhelming complexity involved in getting a console to spout "hello world" was frankly too much of a turn off to even motiveate me to attempt to begin to learn the software.
When im looking to learn a language i dont need the massive roadblock of a bloated IDE to learn on top.
Not that ive got anything negative to say against it being used by someone who understands the language first. Im sure its actualy a nice environment to use and all the multitude of features must do something to aid the experienced user, but the learning curve involved made it an intolerable hinderance at that point.
I do now remember what you mean, sort of. I had completely forgotten how difficult it is to understand at first. I started with MSVC 6 and it was quite an uphill struggle for a while.
FYI, here's how to do a Hello World using MSVC++ 2005 Express:
1. File menu -> New -> Project
2. Visual C++ -> Win32 Console Application
3. Enter hello as the project name
4. In the code editor, change program to int _tmain(int argc, _TCHAR* argv[])
{
printf("Hello world!\n");
return 0;
}
5. Build menu -> Build solution
The program is then at in [your project folder]\Debug\hello.exe
You can run it using Debug menu -> Start debugging or Debug menu -> Start without debugging if you prefer.
So, yeah it's not quite as straightforward as
$ cat > hello.c
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello world!\n");
return 0;
}
[Ctrl+D]
$ cc hello.c -o hello
$ ./hello
but again you have to know the steps to take.
Name:
Anonymous2007-04-26 7:05 ID:WgsXgi3d
:o
I just realised this thread has actualy been helpful as have the individuals whove posted in it.
WTF is going on here?
Im more used to /g/'s "OPRAH.COM" "buy a mac" "FORMAT C" "Delete system32 folder" and other ralated AIDS.
This has unnervingly restored my faith in 4chan as an intelegent place to read.
>>20
For new programmers, forced indentation of code is a good thing. It will teach them good programming style.
Name:
Anonymous2007-04-26 15:40 ID:Cu+Q1Hou
>>25 IT WILL TEACH THEM
ONE THING
ONE WORD
THE FORCED INDENTATION OF CODE
THREAD OVER
Name:
Anonymous2007-04-26 15:42 ID:4OXzZkf/
>>26 ONE RING TO RULE THEM ALL
ONE RING TO FIND THEM
ONE RING TO BRING THEM ALL
AND IN THE DARKNESS BIND THEM
Name:
Anonymous2007-04-26 15:55 ID:Cu+Q1Hou
>For new programmers, forced indentation of code is a good thing. It will teach them good programming style, I DONT KNOW ANYTHING ABOUT PROGRMAMING
fixed
Name:
Anonymous2007-04-26 17:33 ID:RqU/ARRW
>>28
What, how on earth did you read that in between the lines?
Oh, wait, this is one of those "I don't agree with this person because I'm a fag" things, right?
Name:
Anonymous2007-04-26 18:03 ID:Cu+Q1Hou
>>29
yeah because everyone who doesnt agree with you is a "fag", heh.
You really need to learn to be more open minded and accept that you may not be right 100% of the time mate.
Ideally, your programming toolbox should contain a lot of languages which you use depending on the situation. With all of the languages mentioned below, learn how to write GOOD code. Working or correct code is not good enough.
Learn Scheme. It will make you a better programmer for the rest of your days. Honestly. Read this book: http://www.htdp.org/
After that, if you find yourself able to stomach lesser languages, go for either Ruby or Python. Both are modern languages, easy to grasp, and have a large selection of libraries & tutorials available (these days). They're also fast enough for most applications, despite what you might hear some low-level fanatics say.
At this stage, learning a new language should not be a huge challenge anymore. When you know your way around one or two languages very well, similiar languages are easy to learn. Try out different coding paradigms.
Now learn C or C++. Try to understand how the computer really works at low level. Learn x86 assembler.
Try out Haskell and Prolog for variation. They're different from mainstream languages. Also, have a look at Erlang.
By now, you should be able to proceed without guidance.
Really? According to TIOBE, Haskell is the 38th most popular language. It is preceded by useful languages like Ada, COBOL and Fortran.. Guess it still beats brainfuck though.
Also don't become a language whore. Knowing the syntax of thirty different languages doesn't make you a programmer, having experienced the ENTIRE process of developing a non-trivial application be it a game or a desktop/web app makes you a programmer.
Name:
Anonymous2007-04-26 23:10 ID:O6CH+fF4
What if you've done both?
Name:
Anonymous2007-04-26 23:51 ID:O06pZgz6
>>40
Then you're a programmer that has a lot of options at his disposal.
Name:
Anonymous2007-04-27 1:38 ID:5wgPdyOo
#define NULL -1
// OHSHI-
Name:
Anonymous2007-04-27 1:54 ID:aMIaU/Cs
cobol, you get to use cruze control
Name:
Anonymous2007-04-27 2:43 ID:nKCTCyN/
If you understand C++ inside and out, know how to PROPERLY use C++, and can beat C++ compilers at their own tricks, you are well on your way to proGODhood.
Name:
Anonymous2007-04-27 2:45 ID:9ieN09Qr
>>44
Truth but if you understand C inside and out, know how to PROPERLY use C, and can beat C compilers at their own tricks, you are well on your way to proMONSTERGODhood
Name:
Anonymous2007-04-27 3:11 ID:jUla+DAo
Whatever these people say, do NOT begin with haskell. If you do, you will find that you're not an inch closer to learning real manly languages (everything except for haskell) than you were before. It's like a different world.
My suggestion: Start writing code in Python, or possibly even Ruby *shrug*. Then feel free to move to Java or C, since you should know some of the basics by then. Then move back to Python unless you are teh elite (which I am, sadly, not)
Name:
Anonymous2007-04-27 3:13 ID:dNIew7fG
FREEBASIC OR GTFO
Name:
Anonymous2007-04-27 4:43 ID:nKCTCyN/
Basic doesn't count as a language. A five year old could master it; and when I was five, I did.
>>30
I'm >>25 and not >>29, and your opinion is wrong. There are no reasons for new programmers to want to write free-form code. Force them to use good style when they're new, and they'll use it forever. This is why university-level programming courses will fail you for using things like bad variable/function naming styles. They need to hammer good styles into you to make you want to write maintainable code.
>>34
>Learn Scheme. It will make you a better programmer for the rest of your days. Honestly. Read this book: http://www.htdp.org/
No, don't learn Scheme, at least not yet. It's too difficult/frustrating for a new programmer, and you won't find it any fun because there just isn't as much online help for writing cool things with it; for example there are a billion tutorials on writing games in C++, and virtually none for Scheme. Python is easy enough that you'll be able to write fun and interactive programs.
Also, don't bother learning assembler. Read through a basic description of how it works (see what the opcodes look like, see a basic description of the internals of a processor, etc), and that's enough to give you an understanding of what a compiler breaks your code down to. You will never, *ever* use assembler, unless programming will be your career; it's only really useful if you're doing speed-critical applications (certain math functions in games, high-level math research/computation, etc).
>>37
Fortran is not surprising, because it's still widely used (in fact it's probably the most common language) in the pure sciences. I did my honours project in physics doing particle accelerator simulations using Fortran. There is *so much* mathematical/scientific legacy code in Fortran that it's just easier to use it instead of something newer, because half the work is already done for you.
As for Ada and COBOL, I don't know what to say. Haskell is just not catching on.
You have a valid point, there is not much material available that teaches how to do "cool" stuff with Scheme. However, somehow I got the feeling that (1) OP is serious about learning how to program and (2) has little prior exposure to languages. With combination of these two attributes, I really recommend learning Scheme right away.
When I was learning how to program, having the computer print anything at all was a blast. It's true that there are better facilities for writing games, namely Python and C++ (in that order for novices), but it's quite possible to have fun while writing Scheme. You also suggest that programs written in Scheme would not be interactive - not true.
If Scheme doesn't spark your interest, learning Ruby or Python straight away is a good alternative.
Also, I am aware of Fortran still being used widely in the pure sciences. I hope people would just move on.. Ada and COBOL are much more illustrative examples of languages that are way past their prime. Haskell has some very advanced stuff in it, which makes it worth your while if you have the motivation to learn and need such features.
>>53
Well I am not a "EXPERT PROGRAMMER." You have no right to call me that if I made mistakes. This site should have some rules about harrassments, threats, and name calling. I am still in the need of more help in that regards.
JScript .NET is much better than python. Prototype-based OO, class-based OO, lots of functional programming features, no retarded __pythonic__ gayness, no FORCED INDENTATION, support for both static typing and dynamic typing, C-like syntax...
LOL jk, ive got a couple of ideas for different little tools for my os.
Basicly i just want to make a couple of tools that will interface with various other parts of the operating systems. nothing seriously major at this point just toys and tools that will make things i do regularly (that seem awkward or convolouted) much more straight forward.
For instance ive got a daughter whos always downloading HUEG files, she has a torrent client, p2p probably limewire or ares or some shit, downloads running in msn and itunes running with always over 9000 files saturating my bandwidth.
When i need to free up some bandwidth i go through the process of going into
start... run... cmd... netsend [ipaddy] <msg>
I figure i could easily start out by coding a nice little gui wrapper that interfaces with netsend directly thusly saving myself like 2 minuites a week.
Something simple like a box that allows me to type message contents, and a pulldown server setup (like ventrillo)
Ive got ideas for hundreds of little pojects like this that although not major accomplishments, will save me a few seconds and more importantly give me the motivation to actualy get off my ass and learn to code.
Hence the reason ive never actualy googled around to see if any of them actualy already exist.
Besides im heading back to college and will be forced to write bus route programs and shit that will basicly use arrays, loops and conditional statements.
So for the tl;dr crowd, nothing major just some shitty little tools and very likely assignment work.
Name:
Anonymous2007-04-27 9:09 ID:tXSSMHDD
>>56
It's called traffic shaping, get/build a router. Smoothwall and IPCOP are your friends.
If you're interested in building desktop applications (as it seems you are) learn C++/QT. Or */QT, it doesn't really matter.
>>58
They overlap only partly. HTDP concentrates largely on general program design. If you're only going to read one of them, it has to be definitely SICP.
Name:
Anonymous2007-04-27 12:01 ID:sty3WT1t
Hey guys, let's use QT for a commercial application and pay $2500 per developer
LOL
Name:
Anonymous2007-04-27 12:05 ID:Zxa0m97i
>>62 Hey guys, let's use QT for a proprietary application and pay $2500 per developer
Fixed.
Name:
Anonymous2007-04-28 8:44 ID:vy4+fOeu
>>56 I figure i could easily start out by coding a nice little gui wrapper that interfaces with netsend directly thusly saving myself like 2 minuites a week.
Windows has this thing called mailslots you might be interested in for the network stuff.
Name:
Anonymous2007-04-28 9:01 ID:vCBT6+MF
I said, "I am an EXPERT PROGRAMMER."
She said, "Oh, I'm sorry!"
I responded, "You should be, it's no fun being one."
Name:
Anonymous2007-04-28 9:29 ID:61CFzjNt
Ruby.
Seriously, this is by far the most beginner friendly language while at the same time being powerful. It's very straight forward. you won't have to spend time being sodomized by declaration and types, you just do whatever shit you want straight off and it works. And if you by any reason want to learn something else after that, ruby will have given you a solid stepping stone for that.
If ruby were a car you'd have 2 components, Steering wheel and throttle. Your speed would be perfectly bound to the throttle, take your foot off it and you instantly stop. Everything else would be perfectly handeled behind the scenes, it would feel like the road was your slave, no, the world would be your slave. You'd just go out and laugh at all your neighbours scraping snow off their cars in -75°c. While your car would be snow free and shining with the light of the gods, just sit down in your comfortably warm car and the seat belt will fasten onto you, put your foot on the throttle(you wouldn't even need to turn the ignition key) and the car instantly starts to move without a sound. You still laugh as you leave the parking lot where your neigbours are still stuck with their primitive cars while your own cars caressing lips close around your cock and start to suck it while at the same time serving you breakfast.
While Ruby is indeed decent for beginners (having taught basics to a few people myself), I don't understand how people can say that
>>you won't have to spend time being sodomized by declaration and types
is good. Types are like free extra comments, a compile-time sanity check and a cure for many runtime problems. At least, if your type system is sane. i.e. Haskell :-)
Name:
Anonymous2007-04-28 10:32 ID:61CFzjNt
>>67
I don't know of haskells type system and i'm not much of an EXPERT PROGRAMMER, but it seems to me that declarations and types limit how dynamic code you can generate. Granted, most software is rather specialized and as such may benefit from being rigid. But having it forced is rather fail and AIDS.
Name:
Anonymous2007-04-28 11:06 ID:Wcor5mWC
>>68
If you don't know Haskell's type system, don't comment on it. I used to be a dynamic typing fanboy before learning about Haskell. Nowadays, I consider dynamic typing a bug, not a feature.
Name:
Anonymous2007-04-28 11:21 ID:61CFzjNt
>>69
Clearly, you're retarded. Types are of no use and should've been rendered obsolete before they were implemented into whatever manner of aids that were first to use them.
>>72
Yes, but having to exclaim "I WILL HAS A SHUVEL!" before picking upp your bloody shovel is outright retarded. And screaming "OMG TYPE ERROR!" when your boss tries to give you a pickaxe instead of a shovel is not very clever either.
>>77
That's because you didn't extend 'sin' to accept strings.
Name:
Anonymous2007-04-28 16:28 ID:7bVPpdan
>>66 If ruby were a car you'd have 2 components, Steering wheel and throttle. Your speed would be fixed to SLOW
Fixed
>>67
Data types are anal. QUACK QUACK. Can you "close" this "window"? Ok, then I don't fucking care if it's a window or it's my sister's vagina, I can call close. That's how things should be done. Also, variables shouldn't need type or declaration.
>>69
Types aren't a bug nor a feature; they are the lack of a feature.
>>72
"DESU" is a string, it can't be sinned, no quack possible, thus it raises an undefined property exception.
>>73
Wins thread. Threads can be won, so I call thread.win(73).
Name:
Anonymous2007-04-28 16:39 ID:+D5c7n94
Start with machine-code.
And I don't mean using any fancy assembler or something.
You have to study the documentation of the chipset until you know how to use every opcode, and then code everything by hand.
>>84
And haskell fanboys are outright scary, they prophetize about the superior truth but you've never seen any proof of haskell actually doing anything useful.
It's like religious people.
and >>86
uuh, what's your point really? how do you copy arrays in haskell that's oh so bloody much more efficient/easier?
Name:
Anonymous2007-04-28 18:56 ID:mR97LAJC
I see merits in both methods, I however use none of them. FOR I AM AN EXPERT PROGRAMMER.
Name:
Anonymous2007-04-28 18:56 ID:7bVPpdan
>>87
You can surely come up with a deep copy function if Ruby doesn't come with one, right?
Something like:
>>> from copy import *
>>> a = [[1,2],[3,4]]
>>> b = deepcopy(a)
>>> a
[[1, 2], [3, 4]]
>>> b
[[1, 2], [3, 4]]
Name:
Anonymous2007-04-28 19:09 ID:61CFzjNt
>>89
Eh? what are you onto? that's it's possible to copy an array by calling a function which copies arrays? Well no shit sherlock, i could never belive such a thing was possible! You've revolutionized programming!
Name:
Anonymous2007-04-28 19:18 ID:7bVPpdan
>>90
Lol. It was more of a suggestion to do it right now and post it so >>86 would STFU.
Name:
Anonymous2007-04-28 19:30 ID:61CFzjNt
>>91
well, >>85 already showed how to copy any kind of object in ruby. so it feels rather redunant to provide more ways.
>>94
Now now, just because your language is worthless for any practical applications doesn't mean you have to be angry when it turns out other languages can do your languages fancy moves just as gracefull, you just have to accept that you're coding aids incarnate and go cry in a corner instead.
Name:
Anonymous2007-04-29 6:40 ID:T93Sfnyq
OP here:
Ok ive decided to go with C++ (generaly because i have my majority of experience with it which places it above every other language at this point)
Anyway, ive installed Code::Blocks (the stable release rather than a nightly) and im wondering about setting up QT, its downloading right now (qt-in-opensource-src-4.2.3.zip) and i was wondering do i need to compile it myself?
Or is it just a fuckton of libraries llike the various OpenGL packages around?
Or does it install itself to some location and i need to set up my compiler to link to it?
Ive read through some of the faq's and documentation but it really doesnt make anything aparent, the only thing that leads me to think i need to compile it is the fact it has src in the filename.
Guidance would be appreciated.
Name:
Anonymous2007-04-29 7:38 ID:hHz3hmyb
What's the best language for a complete beginner to pick up and learn?
JESUS FUCKING CHRIST I HATE FUCKING NUBS THAT 'GO WITH C++ AND DOWNLOAD QT' SO THEY CAN START MAKING GUI PROGRAMS, AND WELL WHO KNOWS MAYBE THE NEXT WoW.
.
.
.
JESUS FUCKING CHRIST
Name:
Anonymous2007-04-29 7:38 ID:T93Sfnyq
ok apparently ive got to build it myself, not really a problem i figured, i followed the documentation and used "configure -platform win32-g++"
This seemed to do the trick right up till it spewed forth
Creating qmake...
execute: File or path not is not found (mingw32-make)
execute: File or path not is not found (mingw32-make)
Cleaning qmake failed, return code -1
I figured i should manualy install GCC so i did that, edited my environment variables to reflect this and BAM still the same shit.
I need to go to work but i'll have a play later, if anyone has any insights then id be glad to hear them.
Name:
Anonymous2007-04-29 8:09 ID:qnqwT4GN
>>99
Enjoy your aids and coding at 9000 levels above your actual level of expertise.
>>99 C++ hits! C++ bites! C++ drains your will to live--more--
C++ tears at you! You try to do something nontrivial in C++ and fail--more--
C++ hits! C++ drains your will-power! C++ hits! You die...--more--
Would you like your posessions identified? [ynq]
Name:
Anonymous2007-04-29 8:43 ID:T93Sfnyq
>>98 >>100
Why assume that its OVER NINE THOUSAND levels above my expertise?
And even if this turns out to be the case i can easily get hold of readily available documentation and actualy figure out what im doing wrong and what to do to correct it.
I can read and follow whats going on in source code (of which theres a fuckton available) and at the end of the day i'll wind up with a very good understanding of a language thats actualy of some use in the real world.
I made no assumptions anywhere that learning c++ was going to be a straightforward and easy task, but nothing worthwhile ever really is.
I could do a lot worse, i could be learning pascal or basic or any other multitude of languages that serve no proven real world application.
Im also under no allusions that i will be programming any MMORPG software, i'll leave that up to the Koreans. My interests don't lay with developing games, i rarely even play the things.
If you had read the post you would see exactly what im trying to achieve, nothing hueg just small projects geared towards learning the learning curve shouldnt be all that steep and im pretty sure i'll wind up advancing to a timescale that suits me.
I dont need to know a language inside and out yesterday, im happy taking my time on smaller details knowing that i will benifit my education in the longer term.
Name:
Anonymous2007-04-29 8:49 ID:VQ1c7vP/
>>102
If you can't figure out how to compile QT then C++ is definitely 9000000000000000000 levels above you. May I suggest VB.NET? It has a nice clickity-click interface you'd just loooove.
Name:
Anonymous2007-04-29 9:53 ID:yUhuLQPU
To put this in a non-condescending tone, this really is way above your current skill level. There is a crapload of stuff in C++ to sink your teeth into before you even get anywhere near setting up GUI libs, let alone using them. I've been programming for years, and even I don't like the C++/QT combination.
New to programming? Python, or any of the other suggestions in this thread.
Starting with C++ and GUI programming is nuts. It's too abstract and it's too easy to shoot yourself in the foot. Learning how to program in any language is not a straightforward or easy task. Why make it even harder?
Reconsider Python or Ruby. They are, in contrast to what you suggest, 'real world' languages. Lots of companies are starting to take them seriously, as they should. Nasa, Intel, Google, Microsoft and HP to name a few big companies. _why has written an excellent tutorial for you: http://poignantguide.net/ruby/
I'm not saying you should not learn C++. Just don't start with it. Come to it when you really, really need that extra speed (even then, you could write only those few parts in C and the rest in Python or Ruby). For most programming tasks there are better tools available.
Name:
Anonymous2007-04-29 18:28 ID:6WhDT4ww
PYTHON キタ━━━━━━(゚∀゚)━━━━━━ !!!!
Name:
Anonymous2007-04-29 21:54 ID:Z6FxxcYm
One word, The forced indentation of code. Thread over.
Name:
Anonymous2007-04-30 3:04 ID:scgqEpdV
I don't understand why some people are so adamantly against typed variables.
Why do some people not like static typing? Because it's more boilerplate, code, and effort. Unfortunately, some people also fail to notice that dynamic typing causes some errors to take a long time to be caught. That's bad for development time too. What takes longer: catching a type error with a test case or during compilation?
The correct answer is optional and inferred typing. Unfortunately, not a lot of languages have optional typing at the moment, but the least the Ruby and Python fanboys could have done is ripped off Perl's lexical typing and strict mode; it's better than nothing, without losing anything.
Show me an implementation of a heterogeneous list in a statically-typed language that's as short as almost any dynamically-typed language. x = [1, "z", [3.141]] is pretty hard to beat.
Or what about message and dynamic dispatch or polymorphism? Sure takes less code than interfaces or class hierarchies, wouldn't you say?
>>113
lol heterogenous lists, i have never wanted them. it's a completely retarded feature to make up for your lack of type classes and algebraic data types.
go back to your basement and cry me an enterprise web 7.0 ruby-on-fails blog, you incompetent developer.
>>114
Go back to /newpol/ where people are stupid enough to fall for your trolling, kthnx.
>>115
That's not a heterogeneous list, mate. That's an array of a single type.
>>116
It's just an example demonstrating that the list can contain elements of different types with little boilerplate. Have you never use polymorphism or (in C) structs with an element for id?
Name:
Anonymous2007-04-30 6:34 ID:whdQMUlC
Why are you bragging about having to use something retarded like heterogenous lists because your language lacks an easy way of making a data structure?
how would anonymous make something like data Term = Add Term Term
| Mul Term Term
| Number Intin a dynamically typed language?
Name:
Anonymous2007-04-30 7:14 ID:f+6Y4mUW
Personally, I prefer to have all my types defined before I compile. It's more logical and neat that way. I can't stand the sloppiness and carefree lazy attitude of dynamic typing. But then, I do program 99.99% uptime systems that have to be rock solid.
>>119
I guess you're some rabid piece of military personell that can't stand the carefree lazy attitude of sitting in a comfortable position either, So you have a 3 foot rebar welded to your chair so you can have a stabilizer put up your ass.
Name:
Anonymous2007-04-30 8:07 ID:FjFYxUBz
>>108 I don't understand why some people are so adamantly against typed variables.
Because I like my free time, I don't want to waste my time explaining the obvious, and I quack like a duck. Dynamic typing is this, everything works as long as it works. If you can apply a particular method/function to a particular object, then it's applied! Such an amazing concept, it deserves the nobel prize of obvious. Why would you want to put stones in your path and shoot your foot with stupid restrictions on how to do your work? It's not like you can screw up unless you're a terrible programmer and find ugly, ambiguous names for your methods/functions.
dynamic typing causes some errors to take a long time to be caught
Almost never had a problem with dynamic typing. I agree that automatic type conversion (as done in Perl or PHP with strings and numeric types, for example) is stupid and dangerous, but other languages are strong typed, yet dynamically typed. Objects have types, variables not, and there's ubiquitous polymorphism which means anything as long as it works, and naturally, only things that have been defined work.
What takes longer: catching a type error with a test case or during compilation?
Catching a pain in the ass of a bug once takes less time than having to define every stupid thing and wasting time thinking of type hierarchies and/or casting here and there.
Catching a pain in the ass of a bug once takes less time than having to define every stupid thing and wasting time thinking of type hierarchies and/or casting here and there.
I agree that hierarchies are a pain. I don't like them either.
I disagree with the other assertions though. I've worked on a large project with a dynamically-typed language, which is why I feel that such languages should be optionally-typed. Instead of catching the bug after a couple seconds (compile), it would take anywhere between ten to a hundred times longer (test cases). And sometimes such bugs slipped through anyway (incomplete test case) and were seen by customers.
That slowed down my dev cycle terribly, because such flaws were quite easy to make with the code I was working on.
Name:
Anonymous2007-04-30 12:11 ID:scgqEpdV
>>118
Someone will first have to explain to me what that does.
Name:
Anonymous2007-04-30 12:59 ID:whdQMUlC
>>125
It's a calculator domain-specific language. Here's the full code
[code]
data Term = Number Double
| Inverse Term
| Add Term Term
| Mul Term Term
>>Because I like my free time,I don't want to waste my time explaining the obvious
that's why you're on 4chan rite? Cuz time is moneys.
AUTOMATIC TYPE INFERENCE. Have you heard of it? It's the novel concept that--holy shit--the compiler figures out the types for you! That way, you never have to write the types of functions or variables in your code, but the compiler still catches stuff like sin("DESU"), which would be a-okay in a web-developer language such as the one you use.
Prelude> :t 1
1 :: (Num t) => t
Prelude> :t \x -> x + 1
\x -> x + 1 :: (Num a) => a -> a
Prelude> :t \x -> x ++ x
\x -> x ++ x :: [a] -> [a]
Prelude> :t foldr
foldr :: (a -> b -> b) -> b -> [a] -> b
Prelude> :t \x -> putStr x
\x -> putStr x :: String -> IO ()
Prelude> :t \x -> (putStr . show) x
\x -> (putStr . show) x :: (Show a) => a -> IO ()
(defun evcon. (c a)
(cond ((eval. (caar c) a)
(eval. (cadar c) a))
('t (evcon. (cdr c) a))))
(defun evlis. (m a)
(cond ((null. m) '())
('t (cons (eval. (car m) a)
(evlis. (cdr m) a)))))
Name:
Anonymous2007-04-30 13:34 ID:/49XgMPp
>>128
What does this have to do with the topic? Or is this just your way to say "I've read SICP"?
Name:
Anonymous2007-04-30 14:11 ID:scgqEpdV
>>126
Hmm, that's interesting. I'm not sure what that has to do with dynamically- versus statically-typed though.
sub Number($x) { $x }
sub Inverse($x) { 1/$x }
sub Add($t1, $t2) { $t1 + $t2 }
sub Mul($t1, $t2) { $t1 * $t2 }
>>130
He meant that the part Inverse (Add (Mul (Number 2) (Number 3)) (Number 2)) is a value, which is passed to the function eval, which recursively evaluates it.
Name:
Anonymous2007-04-30 15:19 ID:scgqEpdV
Fair enough. Try no.2:
sub Number($x) { $x }
sub Inverse($x) { 1 / $x }
sub Add(lazy $t1, lazy $t2) { $t1 + $t2 }
sub Mul(lazy $t1, lazy $t2) { $t1 * $t2 }
That code sucks, though. You could have easily included at least the words `convergence' and `assimilation' in it.
Name:
Anonymous2007-04-30 16:42 ID:79UaK1BV
>>130
hay I gno lets use haskell its easy to write "DSL" - DOMAIN SPECIFIC LISPS!
Name:
Anonymous2007-04-30 16:55 ID:scgqEpdV
>>134
I admit it's not pretty; it's full of noise. That's Perl for you.
I'm just pointing out that there's no inherent reason why a dynamically-typed language can't do the same. I am convinced that statically-typed languages can at best (with inference, pattern matching, and the like) match dynamically-typed languages for expressiveness and terseness, and that it rarely happens in practice. Is there any feature that statically-typed languages have that dynamically-typed cannot incorporate well? Multimethods maybe?
That's ignoring the problems with dynamic typing though, which drive me batshit sometimes, and the ruby/python apologists don't help. I really hope optional typing becomes the norm one day, because I want the best of both worlds.
However, if anybody can point otherwise, I'd be happy to learn.
Name:
Anonymous2007-04-30 17:24 ID:/49XgMPp
>>136
YHBT. Someone copypastaed my post from another thread.
Totally unrelated to that, I don't believe there's anything statically typed languages can do that dynamically typed can't (after all, all they do is to place additional restrictions on what you can do). The whole point of static typing (as I understand) is that you can prove a larger part of the correctness of your program at compile time - which is a really, really good thing, as far as I can tell.
Name:
Anonymous2007-04-30 17:28 ID:79UaK1BV
could someone possibly write up or link to a convicing draft on why strong typing is important and type-safe dynamic languages are horrrible?
I really dont feel what you people are saying, but id like to understand where you are coming from.
Name:
Anonymous2007-04-30 17:57 ID:scgqEpdV
on why strong typing is important and type-safe dynamic languages
A type-safe dynamically-typed language is a strongly-typed language. Likewise for statically-typed: ML is a strongly-typed, while C is quite weak. Just ask yourself how easy it is to subvert the type system.
>>138
I don't think anything or anyone can convince you, but I'm writing what happened to me.
I wasted almost ten years writing C, and got pretty good with it. I also made the mistake of thinking that this is pretty much all there is to programming. Then I read SICP and understood I sucked. Period.
I started heavily using Lisp, Ruby (years before it became big outside Japan, mind it) and a few years later replacing the latter with Python for purely practical reasons (more users -> more libraries -> less work for me, also, too bad Ruby *really is* slow as fuck compared to even Python). All this time I naturally had to write some C to support whatever I was doing. Also, Java, C++. They sucked very badly and still do, and I want them to go away.
I wasn't having very much problems with what I was using, or so I thought, after all, I used unit testing, wrote functional, clear code whenever possible and otherwise avoided all kinds of asshattery.
Then I found out about Haskell. Or not really ``found out about''; more like I had read enough blog entries about it and wanted to say ``fuck you idiots, Lisp has been around for 40 years and you're reinventing the wheel without noticing'' or something like that.
When I started learning about Haskell, I immediately recognized two things: it's *purely* functional, which was completely new for me (but turned out to be a very good idea), and it was statically typed, but this time static typing didn't mean spelling out the obvious for the compiler but having the compiler spell out the obvious for me before I tried to make my objects quack, just to understand they don't even have a fucking mouth. I also understood that it would solve a large subset of the problems I'd had with Lisp and Python.
Alone, even static typing with type inference would be very restricting. What makes it shine is:
- The lack of effort needed to create new data types
- Type classes and generalized types, which give me almost all of the shut-the-fuck-up-and-just-do-what-I-mean properties of dynamic typing (with no extra work!) and compile-time type safety, which means that my variables are guaranteed to quack the right way when I want them to
I've not turned into a static typing fanboy, but right now I see properly implemented static typing as a HUGE improvement over any kind of dynamic typing.
This has nothing to do with this topic, >>140, but please listen to me! I wasted almost ten years writing C, and got pretty good with it. I also made the mistake of thinking that this is pretty much all there is to programming. Then I read SICP and understood I sucked. Period.
I started heavily using Lisp, Ruby (years before it became big outside Japan, mind it) and a few years later replacing the latter with Python for purely practical reasons (more users -> more libraries -> less work for me, also, too bad Ruby *really is* slow as fuck compared to even Python). All this time I naturally had to write some C to support whatever I was doing. Also, Java, C++. They sucked very badly and still do, and I want them to go away. I wasn't having very much problems with what I was using, or so I thought, after all, I used unit testing, wrote functional, clear code whenever possible and otherwise avoided all kinds of asshattery.
Then I found out about Haskell. Or not really ``found out about''; more like I had read enough blog entries about it and wanted to say ``fuck you idiots, Lisp has been around for 40 years and you're reinventing the wheel without noticing'' or something like that.
When I started learning about Haskell, I immediately recognized two things: it's *purely* functional, which was completely new for me (but turned out to be a very good idea), and it was statically typed, but this time static typing didn't mean spelling out the obvious for the compiler but having the compiler spell out the obvious for me before I tried to make my objects quack, just to understand they don't even have a fucking mouth. I also understood that it would solve a large subset of the problems I'd had with Lisp and Python. Alone, even static typing with type inference would be very restricting. What makes it shine is:
- The lack of effort needed to create new data types
- Type classes and generalized types, which give me almost all of the shut-the-fuck-up-and-just-do-what-I-mean properties of dynamic typing (with no extra work!) and compile-time type safety, which means that my variables are guaranteed to quack the right way when I want them to. I've not turned into a static typing fanboy, but right now I see properly implemented static typing as a HUGE improvement over any kind of dynamic typing.
And that's why you, >>140, should stick with today's special.
This has nothing to do with this topic, >>140, but please listen to me! I wasted almost ten years writing C, and got pretty good with it. I also made the mistake of thinking that this is pretty much all there is to programming. Then I read SICP and understood I sucked. Period.
I started heavily using Lisp, Ruby (years before it became big outside Japan, mind it) and a few years later replacing the latter with Python for purely practical reasons (more users -> more libraries -> less work for me, also, too bad Ruby *really is* slow as fuck compared to even Python). All this time I naturally had to write some C to support whatever I was doing. Also, Java, C++. They sucked very badly and still do, and I want them to go away. I wasn't having very much problems with what I was using, or so I thought, after all, I used unit testing, wrote functional, clear code whenever possible and otherwise avoided all kinds of asshattery.
Then I found out about Haskell. Or not really ``found out about''; more like I had read enough blog entries about it and wanted to say ``fuck you idiots, Lisp has been around for 40 years and you're reinventing the wheel without noticing'' or something like that.
When I started learning about Haskell, I immediately recognized two things: it's *purely* functional, which was completely new for me (but turned out to be a very good idea), and it was statically typed, but this time static typing didn't mean spelling out the obvious for the compiler but having the compiler spell out the obvious for me before I tried to make my objects quack, just to understand they don't even have a fucking mouth. I also understood that it would solve a large subset of the problems I'd had with Lisp and Python. Alone, even static typing with type inference would be very restricting. What makes it shine is: - The lack of effort needed to create new data types - Type classes and generalized types, which give me almost all of the shut-the-fuck-up-and-just-do-what-I-mean properties of dynamic typing (with no extra work!) and compile-time type safety, which means that my variables are guaranteed to quack the right way when I want them to. I've not turned into a static typing fanboy, but right now I see properly implemented static typing as a HUGE improvement over any kind of dynamic typing.
And that's why you, >>140, should stick with today's special.
>>1400000 When I started learning aboutside Japand-just-do-wheel without notically typed, Japan, minking that thistake of thinking (with now I so I thous for me befor 40 years and to writ all there is to programming aboy, but turned or so I thon. Alog entries fuck clear the compiler but problems with what-I-mean pround for 40 years writing very much problems with what It. I also und you'really ``found out to be a very generalized static types - The lack you idiots, Lis time static turning about Haskell. Or not turned into a few years lately new functional, which wasses and otherwisp and Python. I also understood I suckell. Or not to understand they don't even have whenever post all of as a HUGE I nattery.
>>139
This is not the question I asked, or the topic of discussion
>>140
Youve given me the motivation to use haskell again for some future project, seems like its possible for people not to become haskell-fagboy static-typing faggots.
also, one question, is that even relevant to the topic, or is it just your (long winded) way of saying "Ive read SICP"?
Name:
Anonymous2007-04-30 21:00 ID:scgqEpdV
This is not the question I asked
I was pointing out that your terminology was wrong. It's "static" typing, not "strong" typing. There's a difference between the two. As for the answer to your question, read the linked thread.
What, you wanted a simple answer? Static/dynamic has been debated for decades, man.
or the topic of discussion
a) Then don't ask an off-topic question.
b) Who gives a shit about where you want the discussion to go, Mr. Wanna B. Mod.
Name:
Anonymous2007-04-30 23:31 ID:BI/6iiVh
off topic? this isnt yahoo groups bitch. this is 4chan!!!!
>>168
Pointless programming, motherfucker, do you know of it? isGreaterThanSICP = const False
Name:
Anonymous2008-12-12 15:34
Bampu
Name:
Anonymous2008-12-12 19:48
Small Basic it has a turt/e
Name:
Anonymous2008-12-12 19:54
nice job bumping old shitty threads from over a year ago.. you must love sifting through archives. go die.
Name:
Anonymous2008-12-12 20:27
>>172
This thread is not shitty; it's an excellent reminder of what /prog/ used to be, and is historically interesting for several different reasons. Also, why would I waste my whole day reading through old stuff if it was recently linked from another currently-active thread. (Also because I was here back then, so what's the point.)
Nice job having zero sense of appreciation or understanding of this board. Go die.
Name:
Anonymous2009-02-25 7:08
Calling FUNCTIONS IN PYTHON to post a message here I can find cool.