Haskell does have side effects, just like any other useful programming language. However, you can't put side effects just anywhere in a Haskell program; you have to explicitly specify which functions have side effects.
This is done using the type system so that the return values of all functions that can have side effects must be IO x (ie. IO<x> in C++/Java notation). This way, you (and the compiler) can be sure that any function that DOESN'T have the type IO x is 100% side effect free, allowing easy parallelization, many types of optimizations, etc. In other words, all side effects are put in a separate "side effect bin".
Another big thing to understand is that Haskell makes it impossible (well, not really, but strongly discouraged) to return a value from IO back to the pure part of the program. Any computation that may depend on the result of some side effect is considered to have side effects of its own; removing a value from the "side effect bin" is a side effect. Essentially, side effect code can call both side effect code and pure code, but pure code can only call other pure code.
Since every useful program has at least some side effects (reading input, returning output), every Haskell program has a main function which has the type IO () (ie. has side effects, doesn't return anything). The main function can then call the rest of the program, just like in other programming languages.
In order to keep this type of programming from being a total pain in the ass to program with, Haskell uses monads (which are an unrelated concept, they are used for lots of other things as well) to make it easy to compose smaller IO functions into larger, more higher-level IO functions.
I find ctrl-a and ctrl-x to be very useful. In fact, I have a nifty script in my.vimrc that uses ctrl-a.
" this function repeats the given command for the given amount of times function! Repeat(times, cmd) let i = a:times if i <= 0 let i = 1 endif while i > 0 execute a:cmd let i = i - 1 endwhile endfunction
" define CTRL-Z to copy this line to the next line, but increment the number " under the cursor for that line. sets the 'q' mark and overwrites the unnamed " register with the line that has the number incremented. nmap <C-Z>:<C-U>call Repeat(v:count, "normal mqyyp`qj<C-A>yy")<CR>
Very useful when you have a line of code with a number on it, and you need to replicate that many times and increment the number. Like with case statements:
case DEFINED_123_CONSTANT_0:
It accepts numeric arguments, so you can move your cursor past the '123' and then press 4ctrl-z and you get:
case DEFINED_123_CONSTANT_0: case DEFINED_123_CONSTANT_1: case DEFINED_123_CONSTANT_2: case DEFINED_123_CONSTANT_3: case DEFINED_123_CONSTANT_4:
Never before, and never since, has there been a more skill-intensive FPS. You needed excellent teamplay as well as top-notch individual skills to win a clan match.
As is often the case with guides like this, the strategy guide itself displays the authors' phenomenal understanding of the game and fighting games in general.
Quoth the guide:
The system allows you to hit your opponent out of their combo string by executing a well-timed attack that goes under or over their blows.
This statement (and some other statements about "combo strings") is unclear and stupid. A "combo" in fighting games is, by definition, a series of attacks which cannot be interrupted or escaped, no matter what you do. A "string" is a series of attacks which is not a combo. In other words, it is possible to escape a string by acting correctly (may require guessing correctly). It is unclear whether the author means a combo or a string here (it obviously cannot be a combo, never mind what the author actually says).
Now, it could be argued that the DoA series does not deserve to be called a "fighting game" (the terms "counter contest" or "ogle-fest" could be used instead), rendering this post moot, but if they are calling it one, they should at least use the proper terminology correctly.
There is always Ultima Online. Some freeshards, like Metropolis, have been created especially for skill-based PvP. Try it, free as in beer!
They use old-school game mechanics, which means that while experienced characters do end up being more powerful, they are still rather fragile. In WoW you can have characters with thousands of hitpoints, which makes the advanced characters totally invulnerable to the weaker ones. In old-school UO, even a 7xGM character can have no more than 100 permanent hit points, while a newly created character has 10-50. Those 100 hps vanish quickly (in seconds) once the Energy Bolts and Flame Strikes start flying around, and skill is the only way to survive.
Re:hats off to Bram, Bill Joy, and ATT
on
Vim 6.4 Released
·
· Score: 1
For text between second and third commas, I'd use:
02f,lct,<arbitrary text>
As for columns 20-23, with vim I'd use either Visual Block mode, like this:
019l^V<amount of columns>j3lcabcd<Esc>
or macros, like this:
qq019lc4labcd<Esc>jq
and then repeat the macro for all desired lines using @q.
Plain vi doesn't support recording macros using q, so I'd have to type the macro in manually first (the part between qq and q), then put in some register. To use the register q, one would use "qd$ to delete the current line into register q. After that, you can use @q like you would in vim.
Anyone who is willing to pay subscription fees and pay substantial sums of money for advantages in a video game needs to have their priorities checked. The fact that there are people making a living selling those advantages is just sad.
I mean, seriously, there are better games than MMORPGs out there. Games that don't require hours upon hours of grinding for experience and/or real money to even get you started playing competitively. Not to mention all the other things you can do with your money.
Haskell does have side effects, just like any other useful programming language. However, you can't put side effects just anywhere in a Haskell program; you have to explicitly specify which functions have side effects.
This is done using the type system so that the return values of all functions that can have side effects must be IO x (ie. IO<x> in C++/Java notation). This way, you (and the compiler) can be sure that any function that DOESN'T have the type IO x is 100% side effect free, allowing easy parallelization, many types of optimizations, etc. In other words, all side effects are put in a separate "side effect bin".
Another big thing to understand is that Haskell makes it impossible (well, not really, but strongly discouraged) to return a value from IO back to the pure part of the program. Any computation that may depend on the result of some side effect is considered to have side effects of its own; removing a value from the "side effect bin" is a side effect. Essentially, side effect code can call both side effect code and pure code, but pure code can only call other pure code.
Since every useful program has at least some side effects (reading input, returning output), every Haskell program has a main function which has the type IO () (ie. has side effects, doesn't return anything). The main function can then call the rest of the program, just like in other programming languages.
In order to keep this type of programming from being a total pain in the ass to program with, Haskell uses monads (which are an unrelated concept, they are used for lots of other things as well) to make it easy to compose smaller IO functions into larger, more higher-level IO functions.
I find ctrl-a and ctrl-x to be very useful. In fact, I have a nifty script in my .vimrc that uses ctrl-a.
Very useful when you have a line of code with a number on it, and you need to replicate that many times and increment the number. Like with case statements:
It accepts numeric arguments, so you can move your cursor past the '123' and then press 4ctrl-z and you get:
I've found this useful very, very often.
Tribes = win
Never before, and never since, has there been a more skill-intensive FPS. You needed excellent teamplay as well as top-notch individual skills to win a clan match.
As is often the case with guides like this, the strategy guide itself displays the authors' phenomenal understanding of the game and fighting games in general.
Quoth the guide:
This statement (and some other statements about "combo strings") is unclear and stupid. A "combo" in fighting games is, by definition, a series of attacks which cannot be interrupted or escaped, no matter what you do. A "string" is a series of attacks which is not a combo. In other words, it is possible to escape a string by acting correctly (may require guessing correctly). It is unclear whether the author means a combo or a string here (it obviously cannot be a combo, never mind what the author actually says).Now, it could be argued that the DoA series does not deserve to be called a "fighting game" (the terms "counter contest" or "ogle-fest" could be used instead), rendering this post moot, but if they are calling it one, they should at least use the proper terminology correctly.
There is always Ultima Online. Some freeshards, like Metropolis, have been created especially for skill-based PvP. Try it, free as in beer!
They use old-school game mechanics, which means that while experienced characters do end up being more powerful, they are still rather fragile. In WoW you can have characters with thousands of hitpoints, which makes the advanced characters totally invulnerable to the weaker ones. In old-school UO, even a 7xGM character can have no more than 100 permanent hit points, while a newly created character has 10-50. Those 100 hps vanish quickly (in seconds) once the Energy Bolts and Flame Strikes start flying around, and skill is the only way to survive.
For text between second and third commas, I'd use:
As for columns 20-23, with vim I'd use either Visual Block mode, like this:
or macros, like this: and then repeat the macro for all desired lines using @q.Plain vi doesn't support recording macros using q, so I'd have to type the macro in manually first (the part between qq and q), then put in some register. To use the register q, one would use "qd$ to delete the current line into register q. After that, you can use @q like you would in vim.
Anyone who is willing to pay subscription fees and pay substantial sums of money for advantages in a video game needs to have their priorities checked. The fact that there are people making a living selling those advantages is just sad.
I mean, seriously, there are better games than MMORPGs out there. Games that don't require hours upon hours of grinding for experience and/or real money to even get you started playing competitively. Not to mention all the other things you can do with your money.
You can get an Intellisense plugin for vim too, check it out at http://insenvim.sourceforge.net/
IANAL, but doesn't this mean that Microsoft just patented Graphics accelerators?
I always thought CVS could be used to do something like this. I mean, keeping programmers productively occupied.
I haven't really studied it all that much, so I could be wrong(probably am).