Thursday, April 23, 2009
IE still sucks...
I didn't 'have' to support IE for this project but decided that I'd finish the project and then see how the new IE8 faired.
Well... I was, not surprisingly, let down again by IE. Here are a few things I noticed right off the bat.
1) No canvas support :( STILL!!! Firefox, Safari, Chrome and Opera support this. I guess MS is not being pro-active about supporting new standards as the canvas tag is part of the HTML5 spec. There is however this project ExplorerCanvas which does some nice javascript conversions to VML for IE so that you can use most of the features of the canvas tag.
2) Proposed ECMAScript Harmony features have been left out. This is funny since MS was one of the big proponents of limiting the proposed features of ES4 and yet they still can't get the limited functionality implemented (of which Firefox and Safari already support). For instance the new getters/setters and 'foreach' function of arrays makes IE8 confused (these are just a couple I noticed).
I wasn't too surprised by this lack of new features. But I was surprised to see some CSS3 selectors working, and that the site rendered very close to how Firefox and Safari/Chrome did (but not exactly, as there where still some things that where off). So I guess I'm happy that IE has made a huge jump since IE7, but it's still not there which sucks since IE6 is still one of the most dominant browsers used so I guess we can all look forward to missing things in IE8 for the foreseeable future. Ugghh..
Wednesday, May 14, 2008
missing ( before formal parameters
Thursday, February 28, 2008
Some Fun Generating 'the power of' With F#
So for my first bit of fun with F# I figured it'd be fun to play with the BigNum (used for crazy big numbers) I figured I write up some quick functions that simple generate the power of some number, resulting in some crazy big numbers :)
(*all of my examples include '#light')
My first function doesn't use the BigNum but it's very simplistic.
let rec pwrof x y =
if y = 1 then
x
else
x * pwrof x (y - 1)
So for everyone new to F# 'pwrof' is a recursive function that takes 2 ints. 'rec' lets the compiler know that the function is recursive and the 2 parameters get resolved down to being ints at compile time. This came pretty naturally for me coming from a C# world, so lets try to mix it up a bit.
let rec pwrof x y =
match y with
| 1 -> x
| _ -> x * pwrof x (y - 1)
This function does the exact same thing, but instead of using a familiar if/else statement we're using pattern matching (these are widely used in F#). It's like a switch statement. If y matches 1 then we return x, otherwise if y matches anything else, '_', then we recurse.
These were kinda fun, but I wanted to calculate crazy big power of calculations like 5000^5000. So here's an example that resembles my first function
let bpwrof x y =
let x = Microsoft.FSharp.Math.BigNum.of_int x
let pwr = x
let rec pwrof x y =
if y = 1 then
x
else
pwrof (x * pwr) (y - 1)
pwrof x y
And here's an example that resembles my second function
let bpwrof x y =
let x = Microsoft.FSharp.Math.BigNum.of_int x
let pwr = x
let rec pwrof x y =
match y with
| 1 -> x
| _ -> pwrof (x * pwr) (y - 1)
pwrof x y
These are tail recursive so you can create some really, REALLY big numbers. If you call one of the last 2 functions you can calculate say 5000 to the 9000th power. It ends up taking a lot more time to print the result to the screen than it does to do the calculation(its pages and pages of number madness). I even tried 5000 to the 90,000th pwr, that's a big number.
Oh well, that's all for now...
Sunday, February 17, 2008
F# again
I'm not one that enjoys scouring the web for information on things so I usually just go buy a book on whatever it is that I'm interested in. I decided the other day to head down to the local Borders and there was one copy left of Robert Pickering's F# book, titled 'Foundations of F#'. I'm currently only a few chapters in but it seems like a pretty good book thus far. It hasn't required a background in functional programming which is good and also seems to be a good read for the novice to expert programmers.
Well that's all for now, maybe next time I'll have some F# knowledge to share :)
Monday, November 19, 2007
14% done VS-2008
But we couldn't find it listed in the DevTools section..
We ended up finding it on the main page of MSDN(before you log in).
It's under the 'Top Downloads' section..