Sign in
Code Monkey Have Fun
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
Ape
Calculators
Concatenative Languages
Continuations
CPS
Curiosities
DCPU-16
Demo Code
F#
Forth
FRP
FScheme
HP-35
HPCalcs
Interpreters
Logo
Magimathics
Pages
Project Euler
Recursion
RPN
Scheme
TransForth
Turtle Graphics
VMs
Archive
Archives
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 Kirby-Green
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
Fixing Decades-old Bugs in the HP-35
Posted
over 3 years ago
by
Ashley Nathan Feniello
2
Comments
[Part 2 of the HP Calc series ] Making the JavaScript-based HP-35 microcode emulator has been a fun little project. Last time we disassembled the original bits from the ROM. I say “disassemble” but really our microcode instructions were...
Code Monkey Have Fun
Microcode-level HP-35 Emulator (in JavaScript!)
Posted
over 3 years ago
by
Ashley Nathan Feniello
1
Comments
[Part 1 of the HP Calc series ] I recently started a super-geeky side hobby of collecting vintage calculators and got my hands on a pair of HP calcs. The more I learned about the internals of the devices, the more intrigued I was. Jacques Laporte...
Code Monkey Have Fun
FScheme - Scheme in F#
Posted
over 3 years ago
by
Ashley Nathan Feniello
6
Comments
[Part 1 of the FScheme series ] One of my New Year’s goals is to re-read Lisp in Small Pieces and implement all 11 interpreters and 2 compilers. As much as I like the "Lisp in Lisp" idea and enjoyed the eureka moment in SICP when Sussman writes...
Code Monkey Have Fun
Project Euler Problem #13
Posted
over 3 years ago
by
Ashley Nathan Feniello
0
Comments
First ten digits of sum of following one-hundred 50-digit numbers. It would be interesting to do without BigInts. Could use doubles with enough precision for just the first ten digits or some such thing, but just wanted the correct answer to plug into...
Code Monkey Have Fun
Project Euler Problem #12
Posted
over 3 years ago
by
Ashley Nathan Feniello
0
Comments
First triangle number to have over five hundred divisors. let naturals = Seq.unfold ( fun i -> Some(i, i + 1)) 1 // from prob7 let triangleNums = Seq.scan (+) 0 naturals let isFactor n d = n % d = 0 let factors n = seq { 1..int (sqrt (float n))...
Code Monkey Have Fun
Project Euler Problem #11
Posted
over 3 years ago
by
Ashley Nathan Feniello
2
Comments
Greatest product of four adjacent numbers (up, down, left, right, or diagonally) in this 20x20 grid: let grid = [|08;02;22;97;38;15;00;40;00;75;04;05;07;78;52;12;50;77;91;08; 49;49;99;40;17;81;18;57;60;87;17;40;98;43;69;48;04;56;62;00; 81;49;31;73;55;79;14;29;93;71;40;67;53;88;30;03;49;13;36;65;...
Code Monkey Have Fun
Project Euler Problem #10
Posted
over 3 years ago
by
Ashley Nathan Feniello
0
Comments
Sum of primes below two-million. Easy problem, but way too slow (taking several minutes) with the naïve prime number generator from problem 7 . This new version is 10x faster, based on this paper: http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP...
Code Monkey Have Fun
Project Euler Problem #9
Posted
over 3 years ago
by
Ashley Nathan Feniello
0
Comments
Pythagorean triplet where a + b + c = 1000 (2, 1) |> Seq.unfold ( fun (m, n) – > Some([m * m - n * n; 2 * m * n; m * m + n * n], if n + 1 < m then m, n + 1 else m + 1, 1)) |> Seq...
Code Monkey Have Fun
Project Euler Problem #8
Posted
over 3 years ago
by
Ashley Nathan Feniello
2
Comments
Largest products of five consecutive digits in this 1000-digit number. open System.Numerics let digits n = Seq.unfold ( fun i – > if i = 0I then None else Some(i % 10I, i / 10I)) n let consecutive = Seq.unfold ( function (a : BigInteger) ...
Code Monkey Have Fun
Turtles All The Way Down
Posted
over 3 years ago
by
Ashley Nathan Feniello
1
Comments
What do you think this “code” does? 0(1adf89r)720x Well, it’s a ridiculously terse, stack-based Logo-like language with single character commands. Beginning with 0, it repeatedly (720 times) increments the top stack value and moves forward by that amount...
Code Monkey Have Fun
Wolfram – A New Kind of Turing Machine
Posted
over 3 years ago
by
Ashley Nathan Feniello
4
Comments
Stephen Wolfram ’s book, “ A New Kind of Science ” is flippin’ brilliant! (or perhaps I'm just not brilliant enough to realize he's a mad man) 1,280 pages packed with beautiful insights and Tufte-worthy visualizations. I remember...
Code Monkey Have Fun
Functional I/O (Historical Debugging)
Posted
over 3 years ago
by
Ashley Nathan Feniello
2
Comments
[Part 14 of the FScheme series ] Historical Debugging in VS2010 is quite the engineering feat! We can actually pull off something similar in our interpreter with amazing ease. Because of the pure nature of our functional I/O system (last two posts...
Code Monkey Have Fun
Functional I/O (including “I” this time)
Posted
over 3 years ago
by
Ashley Nathan Feniello
0
Comments
[Part 13 of the FScheme series ] Now to add input to our Functional I/O system; following up on the previous post . We already had bouncing balls so how ‘bout we add a mouse-controlled paddle and make a primitive “Pong”? Mouse...
Code Monkey Have Fun
Functional I/O (or at least “O”)
Posted
over 3 years ago
by
Ashley Nathan Feniello
2
Comments
[Part 12 of the FScheme series ] I just watched Matthias Felleisen’s talk on Functional I/O and read this paper and decided to bolt on a little I/O system to the FScheme interpreter we’ve been building. It’s a pretty nice FRP-type...
Code Monkey Have Fun
Playing Dice with the Universe
Posted
over 3 years ago
by
Ashley Nathan Feniello
0
Comments
[Part 11 of the FScheme series ] We’re now taking the first small step into the world of nondeterministic logic programming (chapter 16 of Bill Hails’ book ). Hopefully you enjoyed the last post about continuation passing and found the...
Code Monkey Have Fun
Turning Your Brain Inside Out with Continuations
Posted
over 3 years ago
by
Ashley Nathan Feniello
7
Comments
[Part 10 of the FScheme series ] We’re into one of the most magical chapters in Bill Hails’ book . We’re about to add a very strange and dangerous feature to the interpreter: ‘call/cc’ (“call with current continuation”...
Code Monkey Have Fun
Recursion Is The New Iteration
Posted
over 3 years ago
by
Ashley Nathan Feniello
1
Comments
I remember the strange feeling as a kid the first time I saw structured BASIC after having been doing everything with line numbers. Any time I happened to walk into a Radio Shack in the early 80s I’d just have to leave this behind: I was in a GOTO...
Code Monkey Have Fun
Language vs. Library
Posted
over 3 years ago
by
Ashley Nathan Feniello
0
Comments
[Part 9 of the FScheme series ] Primitives Perhaps this post should have gone along with the one about macros and how Lisp is a “programmable programming language.” The common tension in any language or runtime design is how much to...
Code Monkey Have Fun
Oh, The Humanity!
Posted
over 3 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 3 years ago
by
Ashley Nathan Feniello
0
Comments
[Part 7 of the FScheme series ] The Soul of Scheme We’re now getting into the language-oriented features of Scheme. This is why Scheme is one of my very favorite languages. Scheme is of course a multi-paradigm language; functional, imperative...
Code Monkey Have Fun
What's Lisp Without Lists?!
Posted
over 3 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 3 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 3 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 3 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 all-powerful ‘lambda’! Since we’ve already done all the environment...
Code Monkey Have Fun
Just ‘let’ Me Be Already!
Posted
over 3 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...
Page 2 of 3 (72 items)
1
2
3
MSDN Blogs
>
Code Monkey Have Fun
Social Media Sharing