These are known bugs that occur on Windows platforms. There are instructions for fixing them somewhere on the forum, but I can't find them. It has something to do with using forward slashes in path names instead of back slashes. So if you see something like this anywhere in the Arc source code:
(= some-var "arc/logs/srv")
change it to
(= some-var "arc\\logs\\srv")
Alternatively, switch to Anarki as jmatt suggested. That seems to be what most people use.
I got arc2 to work on linux and windows initially through searching the forums and finding bugs. It was an interesting exercise but overall I'd recommend arkani. arkani has more bug fixes and all sorts of interesting code to look at and/or use.
how can it be so much faster? its written in C or something? its built in the language somehow i guess, its not possible to recreate for me by writing a def?
It is probably written in C and does not check its args every time it is called. Basically, every time you call 'is, '<, '+, or any other primitive operation, it checks whether its arguments are numbers, then performs the operation. All these checks are useless since, within the body of your function, you know the type of your args are numbers, but you cannot avoid them anyway. Optimization will come, later :)
They aren't ignored, they just don't do anything. for can take any number of arguments: the first is the symbol, the second the start value, the third the end value, and the rest are all the body of the loop. They all get executed in every iteration. For example:
In this case it's not causing a problem. You're allowed to give parameters whatever name you want, but if you name the parameter after the function then you can't call the function from within itself because the name will now refer to the argument.
So if you don't need to call the function recursively, there's no harm. It's just a bit confusing.
You don't need to nest if expressions in Arc, you can do this:
(if a b
c d
e f
g)
For defining power, it's easier to use a recursive function:
(def power (n p)
(if (is p 0) 1
(> p 0) (* n (power n (- p 1)))
(/ 1 (power n (* -1 p)))))
If you want to use for then the problem is indeed (for x 0 power -1). for only counts up, so (= acc (/ acc nbr)) never gets executed because 0 is already greater than power.