Sign in
Code Monkey Have Fun
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
Calculators
ChuckMoore
Color
colorForth
Concatenative Languages
Curiosities
Demo Code
F#
F18
Forth
FRP
FScheme
GA144
GreenArrays
HP35
HPCalcs
Interpreters
Pages
Project Euler
Recursion
RPN
Scheme
TransForth
Turtle Graphics
VMs
Archive
Archives
September 2014
(1)
July 2014
(1)
November 2013
(2)
October 2013
(1)
September 2013
(2)
April 2013
(1)
March 2013
(1)
April 2012
(3)
February 2012
(1)
January 2012
(2)
December 2011
(1)
September 2011
(2)
August 2011
(1)
June 2011
(1)
April 2011
(1)
March 2011
(2)
February 2011
(5)
January 2011
(2)
November 2010
(1)
October 2010
(1)
September 2010
(9)
June 2010
(2)
March 2010
(3)
February 2010
(3)
January 2010
(9)
December 2009
(2)
October 2009
(1)
September 2009
(4)
August 2009
(7)
April 2009
(3)
December 2008
(1)
September 2007
(1)
April 2007
(3)
November 2005
(1)
February 1996
(1)
Blog  Link List
Blogroll
Tomas Petricek
Harry Pierson
Dustin Campbell
Don Syme
Luca Bolognese
Luke Hoban
Matthew Podwysocki
James Iry
Steve Horsfield
Tom KirbyGreen
Mads Torgersen
Wes Dyer
Retro Programming  John Metcalf
Gram Wheeler
Favorites
Talks
Posts
Quotes
Posts
Subscribe via RSS
Sort by:
Most Recent

Most Views

Most Comments
Excerpt View

Full Post View
Code Monkey Have Fun
Oh, The Humanity!
Posted
over 4 years ago
by
Ashley Nathan Feniello
0
Comments
[Part 8 of the FScheme series ] 'set', 'begin', 'define' Here we implement chapters 10 and 11 of Bill Hails’ book . We’re about to do something hideous and horrible to the language (and to our interpreter). We’re about to add assignment...
Code Monkey Have Fun
No Wait, Macro the Ultimate!
Posted
over 4 years ago
by
Ashley Nathan Feniello
0
Comments
[Part 7 of the FScheme series ] The Soul of Scheme We’re now getting into the languageoriented features of Scheme. This is why Scheme is one of my very favorite languages. Scheme is of course a multiparadigm language; functional, imperative...
Code Monkey Have Fun
What's Lisp Without Lists?!
Posted
over 4 years ago
by
Ashley Nathan Feniello
1
Comments
[Part 6 of the FScheme series ] Once again, I must plug Bill Hails’ book Lists How could we even be pretending this is Lisp when we have yet to add lists! We need to add the standard ‘cons’, ‘car’, and ‘cdr’...
Code Monkey Have Fun
What ‘letrec’ Can’t Do
Posted
over 4 years ago
by
Ashley Nathan Feniello
0
Comments
[Part 5 of the FScheme series ] In this series I’m glossing over all the gory details. You really should read Bill Hails’ book ! Simultaneous 'let' We just added ‘letrec’ to solve the issue of bindings referring back to...
Code Monkey Have Fun
Rinse and Recurse
Posted
over 4 years ago
by
Ashley Nathan Feniello
0
Comments
[Part 4 of the FScheme series ] Recursive ‘let’ Normal ‘let’ can’t be used to bind names to recursive expressions (ones referring back to the names) because the expressions end up being evaluated in the calling environment...
Code Monkey Have Fun
Lambda the Ultimate!
Posted
over 4 years ago
by
Ashley Nathan Feniello
1
Comments
[Part 3 of the FScheme series ] Continuing along in Bill Hails’ book . Be sure to follow the previous posts . Lambda Now we’re going to add the allpowerful ‘lambda’! Since we’ve already done all the environment...
Code Monkey Have Fun
Just ‘let’ Me Be Already!
Posted
over 4 years ago
by
Ashley Nathan Feniello
1
Comments
[Part 2 of the FScheme series ] Still working through Bill Hails’ awesome book . Adding to the FScheme interpreter from this previous post . Now we’ll add ‘let’. To do this we’re changing the evaluation model into an environment...
Code Monkey Have Fun
Ants
Posted
over 4 years ago
by
Ashley Nathan Feniello
0
Comments
Gram's blog has been pretty fun to follow. Like with Project Euler , I constantly want to implement each thing he talks about (e.g. Monadic Coconuts , Towers of Hanoi ). Here now is " The Wondering Ant ": open System.Drawing open System.Windows...
Code Monkey Have Fun
Monadic Piles of Coconuts
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
After reading the “coconut” problem over on my friend’s blog , I thought it would be fun to solve it with a silly brute force approach. First, go read his post and then come back here. let take n = let m = n  1 // give one to...
Code Monkey Have Fun
Towers of Hanoi
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
A friend of mine is starting a pretty fun looking math blog . His first post is on Towers of Hanoi . I'm sure he'll tackle it with some slick mathematics, but my usual M.O. is to convert everything to code. I remember this "Hello Recursive World" from...
Code Monkey Have Fun
TinyRPN Calculator
Posted
over 5 years ago
by
Ashley Nathan Feniello
1
Comments
It’s fun dorking around with the HP 41CX emulator on the iPhone. It’s a nearperfect rendition. I forgot how much I loved RPN calculators. The 48GX looks even more interesting with Reverse Polish Lisp but I haven’t figured out how to use it yet. The 41CX...
Code Monkey Have Fun
Babbage’s Difference Engine
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
";" galleryimg="no"> Babbage's Difference Engine is pretty fascinating. I had wanted to go see the one on display at the Computer History Museum in Mountain View, but now Nathan Myhrvold has the thing back in his living room! Maybe I’ll build...
Code Monkey Have Fun
Project Euler Problem #7
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
Find the 10001st prime let naturals = Seq.unfold ( fun i > Some(i, i + 1 )) let primes = naturals 2 > Seq.filter ( fun n > seq { 2.. int (sqrt (float n)) } > Seq.forall ( fun x > n % x <> 0 )) Seq.nth 10000 primes
Code Monkey Have Fun
Project Euler Problem #6
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
Difference between sum of the squares and the square of the sum of 1  100 : ( fun ns > let sqr x = x * x (sqr (List.sum ns))  (List.map sqr ns > List.sum) ) [1..100]
Code Monkey Have Fun
Project Euler Problem #5
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
Smallest number divisible by each of 1 to 20 : First cut (takes almost an hour to execute!): let isFactor n d = n % d = 0 {1..Int32.MaxValue} > Seq.find ( fun n > [1..20] > List.forall (isFactor n)) Second cut (takes a...
Code Monkey Have Fun
Project Euler Problem #4
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
Largest palindrome from product of two 3digit numbers : let isPalendrome n = let s = n.ToString() > List.of_seq s = List.rev s seq { for a in 100..999 do for b in a..999 > a * b } > Seq.filter isPalendrome > Seq.max
Code Monkey Have Fun
Project Euler Problem #3
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
Largest prime factor of 600851475143 : let primeFactors n = let isFactor n d = n % d = 0L let nextFactor n d = seq {d..n} > Seq.find (isFactor n) (n, 2L, []) > Seq.unfold ( fun (n, d, a) > if isFactor n d then Some(d, ((n...
Code Monkey Have Fun
Project Euler Problem #2
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
Sum of even terms in Fibonacci sequence which are < fourmillion : (1, 1) > Seq.unfold ( fun (a, b) > Some(a, (b, a + b))) // fibs > Seq.takeWhile ( fun x > x <= 4000000) > Seq.filter ( fun x > x % 2 = 0) ...
Code Monkey Have Fun
Project Euler Problem #1
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
Project Euler is pretty darn cool. It’s a bunch of mathematical problems that require programming to solve. I’m having fun doing them in F#. They start very simple but quickly become more difficult. Problem 1 is to find the sum of all the multiples...
Code Monkey Have Fun
Turtle Soup
Posted
over 5 years ago
by
Ashley Nathan Feniello
0
Comments
I've been reading Seymour Papert 's Mindstorms book about Logo ; very interesting! I'm just dying to add Turtle Graphics to my little toy language from last post (BTW, a friend suggested I call it "Ape" and I think I will!). Logo with a twist What...
Code Monkey Have Fun
Ape  New Toy Language
Posted
over 5 years ago
by
Ashley Nathan Feniello
2
Comments
I read “ Thinking Fourth ” and also played with Joy and Cat some time ago, but honestly I had written them off as “toy” languages. Recently I’ve had renewed interest in concatenative languages after watching Slava Pestov’s...
Code Monkey Have Fun
Cryptarithm
Posted
over 5 years ago
by
Ashley Nathan Feniello
1
Comments
A recent post to the Puzzles and Logic Problems alias at work: The problem below is an example of a cryptarithm – a basic math problem made more difficult by obscuring each digit with a letter or other symbol. B A R...
Code Monkey Have Fun
The Lambda Calculus
Posted
over 6 years ago
by
Ashley Nathan Feniello
3
Comments
Mads Torgersen’s post the other day was very cool! The first time I really understood Lambda Calculus was from this little 8page paper . Relating it to Scheme made it stick for me. After reading Dr. T’s post I was just now having some fun playing with...
Code Monkey Have Fun
Sweeping Mines... Functionally
Posted
over 7 years ago
by
Ashley Nathan Feniello
0
Comments
Mr. GeekRaver and I were walking between buildings and, for some reason, talking about how silly it is that good ol’ Minesweeper was “glossed up” for Vista. He said he had written it for DOS in some tiny amount of C code ( http://www.bradygirl.com/Work...
Code Monkey Have Fun
Streams
Posted
over 7 years ago
by
Ashley Nathan Feniello
0
Comments
These SICP lectures are great I tell ya! The two lectures on Streams (6a/6b) talk about implementing things with lazy lists. His examples are in Scheme but here’s my translation to C# using some of the new features in 3.0. For example, here is a lazy...
Page 3 of 4 (79 items)
1
2
3
4
MSDN Blogs
>
Code Monkey Have Fun
Social Media Sharing