Feature - Implemented bitwise operators

Winterbay

Active member

Oh, that's a language I haven't used in a while. We had to use Fortran 95 at uni to code up our chemical calculations :)
However I can't remember ever having used ** for anything. I'll have to see if I have any old code snippets saved...

Also: Not having used any logic handling or bitwise operators I think that ^ is a very normal way to represent power.
 

Fluxxdog

Active member
The bunny... it haunts me...

Seriously though, the caret is rather well known as a mathematical operator. The fact that it's also well known in its use a a logical operator makes this the difficult part.

If anything, I think the issue might even center around which would be used more in ash, raising a number to a power (used primarily for librams as was pointed out) or an XOR operator. I honestly can't think of a scenario where it would be important to, say, have one item or another, but absolutely not both.
 

Winterbay

Active member
Would ti be possible to have ^ for power and ^^ for XOR? Or you could perhaps use XOR as a reserved word for just that feature? (no idea if that would work)
 

matt.chugg

Moderator
You are looking at how the svn feed chose to display the svn log. The actual log is precisely as you suggested.

Hmm, the feed seems fine when I view it in various browsers, http://msurl.net/kolmafia/rss.ashx

Not quite sure whats happened there, the data is good and the feed is good, (for varying definitions of good). Since its xml all < > are escaped to > and < and interpretted by the reader. since rss bot can post html, it maybe that the board itselft removed something for its on well being.

if anyone cares enough i'll investigate some more!
 
Last edited:

jasonharper

Developer
Python is a rather more modern example of a language that uses ** for exponentiation. It's also available via a pow() built-in function, but that's mainly to support a 3-parameter form that wouldn't work as an operator (and is utterly useless for mafia, unless gameplay suddenly starts requiring advanced cryptographic calculations).
 

fronobulax

Developer
Staff member
advanced cryptographic calculations

Am I the only one who has heard the rumor that the Knob Goblin Encryption Key is going to be expanded to a user solved puzzle? ;-)

First time I found a bug in code that was not my own was an optimizing FORTRAN 66 compiler. Team project in a numerical analysis course. Code was setting an array to have 0, +1 and -1 values for testing matrix manipulation routines. However the results after using the array were not as expected. Turns out the optimizer thought it had a +1 in a register and just stored it when in reality there was a -1 there. Extremely educational experience because there was a lot of finger pointing on the team and the code worked, albeit slowly with optimization turned off.
 
Top