The wording on question 9 (the regex one) is a little unclear: both b[l].e and ([^b]b[^b]*){3} will match blabber but not babel. Presumably the intended meaning is that the entire string must be matched, but the…
The last time I made a world generation algorithm for a voxel engine prototype I got reasonable results through the judicious combination of different types of noise, (specifically simplex, ridged and turbulence noise)…
There's no need for XML, nor for all-white video. A 32x32 icon of some color noise, stored as PNG, GIF, or BMP, takes about 2-3 KB. Writing an algorithm to procedurally generate a vaguely interesting video and music can…
And yet another short, functional solution: pairs = (>>= \ ~(x:xs) -> map ((,) x) xs) . init . tails EDIT: Or as a list comprehension: pairs xs = concat [map ((,) h) t | (h:t) <- tails xs]
I don't know if this will add much to the article, but let's go over things step by step. scanl is the same as foldl, save for the fact that it outputs a list of all intermediate values. So where foldl (+) 0 [1..10]…
As an alternative to the zipWith method of calculating the Fibonacci series, you can use scanl, resulting in (in my opinion) an even more elegant version: fibs = fix $ (1 :) . scanl (+) 1
$40? As long as Joss and the original cast are on board I'll happily pay $100, maybe even $200, even if it's only another half season. Just promise not to start this project before Castle has stopped being good, since I…
Alternatively, for those who want good-looking text but prefer the WYSIWIG approach: just use a half-decent DTP program like InDesign, which will get you everything mentioned in the article except for the per-character…
Interestingly, if you multiply 15 years by 365 days and the two hours a day mentioned at some point in the article, you get 10,950 hours, which is remarkably close to Malcolm Gladwell's claim from the book Outliers that…
I've tried it a bit, but I found the syntax rather ugly compared to Haskell. I know, I'm nitpicking and it really shouldn't matter that much, but it put me off the language. Perhaps when they finally release a…
No, I mostly make a new one per project. All the functions are pretty much one-liners anyway, so it's not too much work to make. It's more of a documentation thing; anything in Haskell.cs can be assumed to work exactly…
I can't comment on Lisp, but I've been working with Haskell for about a year or so now, so I'll cover that instead. My personal history goes something like QBasic -> Visual Basic -> PHP -> Java -> C#…
Not so much obsession as convention. Generally versions 0.x - 1.0 are the alpha and beta releases, with 1.0 being the first "stable" release. Obviously there are hundreds of projects that follow a different schema, but…
Very nice site, thanks. In case anyone from Grooveshark is reading this, here are two minor UI suggestions: - It's rather easy to miss the volume control since it's so far removed from the other play controls. Perhaps…
For some examples of high-quality prosthetics, watch the two TED talks of Aimee Mullins: http://www.ted.com/talks/aimee_mullins_prosthetic_aesthetics... http://www.ted.com/index.php/talks/aimee_mullins_on_running....
There is also a strong correlation between global warming and the amount of pirates (http://www.seanbonner.com/blog/archives/001857.php). While I agree that dismissing it a priori is a bad idea, correlation still does…
"Never ascribe to malice, that which can be explained by incompetence." I must say it's getting really hard to tell the difference in this case. "less is being paid for than ever before." Really? The second the first…
From what I understand you're supposed to get the result (in your example 6) by combining the cells in that box with the given operator (in this case times). So a "6x" box with two cells results in (1 and 6) or (2 and…
Indeed. Though there are some fairly easy steps to reduce this as much as possible. 1. Give guests full use of all the features of the site. Posting, editing, befriending, etc. Store this information by identifying them…
Obligatory: Larry Lessig's TED lecture on why remixing shouldn't be illegal. http://www.ted.com/index.php/talks/larry_lessig_says_the_law...
Reminds me of George Carlin's dissection of the language used on airplanes. Part 1: http://www.youtube.com/watch?v=DagVklB4VHQ&feature=relat... Part 2: http://www.youtube.com/watch?v=UjKciefHo38&feature=relat...
Not necessarily. In Haskell the oneliners are frequently short enough to fit on one screen. For example, I recently needed to do some Run-Length Encoding: import Control.Arrow import Data.List encodeRLE :: (Eq a) =>…
Yeah, that works for really short methods, but for anything even a little more complex you're just replacing vertical scrolling with horizontal scrolling.
Completely agree. The main reason for my preference is that one of the things I hate most in C-style languages is that one-line functions take up three or four lines (depending on whether or not you use K&R style).…
The wording on question 9 (the regex one) is a little unclear: both b[l].e and ([^b]b[^b]*){3} will match blabber but not babel. Presumably the intended meaning is that the entire string must be matched, but the…
The last time I made a world generation algorithm for a voxel engine prototype I got reasonable results through the judicious combination of different types of noise, (specifically simplex, ridged and turbulence noise)…
There's no need for XML, nor for all-white video. A 32x32 icon of some color noise, stored as PNG, GIF, or BMP, takes about 2-3 KB. Writing an algorithm to procedurally generate a vaguely interesting video and music can…
And yet another short, functional solution: pairs = (>>= \ ~(x:xs) -> map ((,) x) xs) . init . tails EDIT: Or as a list comprehension: pairs xs = concat [map ((,) h) t | (h:t) <- tails xs]
I don't know if this will add much to the article, but let's go over things step by step. scanl is the same as foldl, save for the fact that it outputs a list of all intermediate values. So where foldl (+) 0 [1..10]…
As an alternative to the zipWith method of calculating the Fibonacci series, you can use scanl, resulting in (in my opinion) an even more elegant version: fibs = fix $ (1 :) . scanl (+) 1
$40? As long as Joss and the original cast are on board I'll happily pay $100, maybe even $200, even if it's only another half season. Just promise not to start this project before Castle has stopped being good, since I…
Alternatively, for those who want good-looking text but prefer the WYSIWIG approach: just use a half-decent DTP program like InDesign, which will get you everything mentioned in the article except for the per-character…
Interestingly, if you multiply 15 years by 365 days and the two hours a day mentioned at some point in the article, you get 10,950 hours, which is remarkably close to Malcolm Gladwell's claim from the book Outliers that…
I've tried it a bit, but I found the syntax rather ugly compared to Haskell. I know, I'm nitpicking and it really shouldn't matter that much, but it put me off the language. Perhaps when they finally release a…
No, I mostly make a new one per project. All the functions are pretty much one-liners anyway, so it's not too much work to make. It's more of a documentation thing; anything in Haskell.cs can be assumed to work exactly…
I can't comment on Lisp, but I've been working with Haskell for about a year or so now, so I'll cover that instead. My personal history goes something like QBasic -> Visual Basic -> PHP -> Java -> C#…
Not so much obsession as convention. Generally versions 0.x - 1.0 are the alpha and beta releases, with 1.0 being the first "stable" release. Obviously there are hundreds of projects that follow a different schema, but…
Very nice site, thanks. In case anyone from Grooveshark is reading this, here are two minor UI suggestions: - It's rather easy to miss the volume control since it's so far removed from the other play controls. Perhaps…
For some examples of high-quality prosthetics, watch the two TED talks of Aimee Mullins: http://www.ted.com/talks/aimee_mullins_prosthetic_aesthetics... http://www.ted.com/index.php/talks/aimee_mullins_on_running....
There is also a strong correlation between global warming and the amount of pirates (http://www.seanbonner.com/blog/archives/001857.php). While I agree that dismissing it a priori is a bad idea, correlation still does…
"Never ascribe to malice, that which can be explained by incompetence." I must say it's getting really hard to tell the difference in this case. "less is being paid for than ever before." Really? The second the first…
From what I understand you're supposed to get the result (in your example 6) by combining the cells in that box with the given operator (in this case times). So a "6x" box with two cells results in (1 and 6) or (2 and…
Indeed. Though there are some fairly easy steps to reduce this as much as possible. 1. Give guests full use of all the features of the site. Posting, editing, befriending, etc. Store this information by identifying them…
Obligatory: Larry Lessig's TED lecture on why remixing shouldn't be illegal. http://www.ted.com/index.php/talks/larry_lessig_says_the_law...
Reminds me of George Carlin's dissection of the language used on airplanes. Part 1: http://www.youtube.com/watch?v=DagVklB4VHQ&feature=relat... Part 2: http://www.youtube.com/watch?v=UjKciefHo38&feature=relat...
Not necessarily. In Haskell the oneliners are frequently short enough to fit on one screen. For example, I recently needed to do some Run-Length Encoding: import Control.Arrow import Data.List encodeRLE :: (Eq a) =>…
Yeah, that works for really short methods, but for anything even a little more complex you're just replacing vertical scrolling with horizontal scrolling.
Completely agree. The main reason for my preference is that one of the things I hate most in C-style languages is that one-line functions take up three or four lines (depending on whether or not you use K&R style).…