So have I...* yet I know Java which I was introduced to afterwards. Of course, it entirely depends on how you're being taught. If you stick to C then C++ is perhaps a little easier (due to reasons...
Type: Posts; User: satsujinka; Keyword(s):
So have I...* yet I know Java which I was introduced to afterwards. Of course, it entirely depends on how you're being taught. If you stick to C then C++ is perhaps a little easier (due to reasons...
@trent
Java is certainly a nicer language to start with then C++... Though the verbosity and forced OO does get some people. While my high school didn't offer an AP programming class while I was...
If you're having fun, then keep at it!
Especially in the beginning having fun is the most important part. So keep learning C++ and some day when you have time or the desire you can learn python...
In intro classes? Usually procedural with maybe a note at the end about objects.
That said, procedural works fine for tick-tack-toe. It's primarily a procedural game and the only benefit using...
I'm curious as to why you find functional code less accessible than OO code. As personally, I find OO code much harder to read than functional code (and much more difficult to get into a OO code base...
There's no disagreement here...
If you could give us the updated code, that'd be easier to work with. It would also help if it was complete, so that we could attempt to compile it ourselves.
As I said, I wouldn't want to do CPS in C.
I won't deny that closures are an important part of fp, but they're not necessary for most of the advantages (primarily, they serve as a more convenient...
@trent
While it certainly won't be a lisp (or other) that "takes the industry by storm" it does seem that fp already has. In that all the top languages support fp.
C#, C++, and Java (have...
Those are some nice questions (should almost pull them out and sticky them... since they're asked so much)
So I went to school for CS... with a bit of CE on the side (I could have included...
Assuming your block class has an init method that sets its location to a random coordinate that isn't already taken and a draw method that draws the block:
array.each do |x|
...
Depending on how complex your brick class is, couldn't you just make a random length array of bricks? (I assume they contain their coordinates or something, so you can then iterate over the array and...
If you really are worried about complexity then you'll want a better language. Your example of Python would be fine.
Perhaps, though your intent is that you want just 1 language for both the shell...
I'm sure I've done one of these before but...
Just a quick run down of terms:
Mastered - who needs any references? I could write an interpreter/compiler for the language off the top of my head...
To me what it sounds like the OP is saying is that, terminals don't have to be limited to just characters and that you could render images (or other graphical elements) in them without fundamentally...
Python has a facebook and twitter library in the Ubuntu repos. So that's probably as good a place to start as any.
Perl has a youtube library in addition to facebook and twitter libraries,...
Or do:
FILE *archive = fopen("archive.txt", "r");
Here's a tutorial:
http://tronche.com/gui/x/
If I may ask, why aren't you using a toolkit? GTK+ or QT are much easier to use than Xlib or XCB.
There's no need to feel guilty about studying Lisp. It's a great family of languages.
Here's as good a place to start as any:
http://tronche.com/gui/x/
It's really not that hard to find more resources if that doesn't work for you.
As has already been noted, QT, GTK+, or even...
Here's just a casual run down of possible reasons:
C is guaranteed to be available.
C has libraries for just about everything.
The underlying implementation of a great many things is in C, so...
@trent
It's not an overgeneralization. I never said convert all recursion to iteration. I said the language should take care of optimizing recursion for you. This almost entirely means tail calls.
...
Arguably, the language should optimize it for you. I know a lot of languages don't guarantee it (C and Java don't,) but many compilers do it anyways (since it's a fairly easy optimization to make.)
I'm not sure that having "faith" is the correct way of going about learning recursion.
It's probably better to start off with a few small examples and use substitution to figure out what's going...
Well, I'll point you to where I learned recursion: Structure and Interpretation of Computer Programs
Recursion isn't going away anytime soon. Recursion is (once you understand it) a much more...