re-factor.blogspot.com
Re: Factor: Genuine Sieve of Eratosthenes
http://re-factor.blogspot.com/2015/06/genuine-sieve-of-eratosthenes.html
Factor: the language, the theory, and the practice. Monday, June 8, 2015. Genuine Sieve of Eratosthenes. Iain Gray posted on the mailing list. About a paper called the Genuine Sieve of Eratosthenes. By Melissa O'Neill, a Professor of Computer Science at Harvey Mudd College. It begins with a discussion about some clever looking Haskell code that is just trial division. And not the Sieve of Eratosthenes. As a followup to the three versions that I posted about recently. And filter the next. 2 3 5 7 } product.
re-factor.blogspot.com
Re: Factor: December 2014
http://re-factor.blogspot.com/2014_12_01_archive.html
Factor: the language, the theory, and the practice. Thursday, December 18, 2014. Is relatively dated now, but when it was first released in 1991, it had a number of modern features that we would later enjoy in the World Wide Web. In particular, in RFC 1436. It lists these features:. A file-like hierarchical arrangement that would be familiar to users. A system that can be created quickly and inexpensively. Extending the file system metaphor, such as searches. Url { [ host ] [ port 70. 0 - plain text.
re-factor.blogspot.com
Re: Factor: February 2015
http://re-factor.blogspot.com/2015_02_01_archive.html
Factor: the language, the theory, and the practice. Saturday, February 28, 2015. A couple days ago, Verizon posted a press release. Complaining about the FCC's recent changes to Internet regulations. Normally, I wouldn't really bother with things like this, but they posted their statement using morse code. While it would be easy enough to read their English version. I thought it would be fun to decode it using Factor. Step 1. Download the blog post and parse the HTML. Subscribe to: Posts (Atom). Youre sm...
re-factor.blogspot.com
Re: Factor: Text-to-PDF
http://re-factor.blogspot.com/2010/10/text-to-pdf.html
Factor: the language, the theory, and the practice. Friday, October 15, 2010. In this article, we will be building step-by-step a program for converting text files into PDF. The PDF specification is at version 1.7 (approximately 750 pages plus some supplements) and is available for download. From the Adobe website. The entire solution listed below is approximately 140 lines of code, and compares favorably to a 600 line Python version. And a 450 line C version. D 0 obj n. Creator (created with Factor).
re-factor.blogspot.com
Re: Factor: Automated Reasoning
http://re-factor.blogspot.com/2015/08/automated-reasoning.html
Factor: the language, the theory, and the practice. Thursday, August 6, 2015. There was a post about Automated Reasoning in F#, Scala, Haskell, C , and Julia. That uses a simple algorithm from John Harrison's book Handbook of Practical Logic and Automated Reasoning. To simplify this equation:. E = (1 (0 * x) * 3) 12. Has support for ML-style pattern matching. And I thought it would be fun to contribute a simple solution using the match. We want to define a few types of expressions:. X ] } { T{ Add f.
re-factor.blogspot.com
Re: Factor: April 2015
http://re-factor.blogspot.com/2015_04_01_archive.html
Factor: the language, the theory, and the practice. Wednesday, April 29, 2015. The Burrows–Wheeler transform. Is a reversible method of rearranging text used to improve the performance of compression algorithms, such as bzip2. We will implement transform,. And inverse transform,. First with a slow and simple algorithm, and then second with a faster version. We start with the pseudocode suggested in the Wikipedia article. In Python, this might look like:. In Factor, using all-rotations. K, s): def. Is ava...
re-factor.blogspot.com
Re: Factor: File Monitor
http://re-factor.blogspot.com/2015/05/file-monitor.html
Factor: the language, the theory, and the practice. Tuesday, May 5, 2015. Has a cross-platform file-system change monitor. Which supports detecting changes to file names, attributes and contents under a specified directory. There is some minor platform differences. Between Mac OS X, Windows, and Linux which may be worth looking at if you are building on top of the io.monitors. Some code to monitor for changed paths recursively in a directory and print each one out:. Next-change path print flush. Source c...
re-factor.blogspot.com
Re: Factor: Sieve of Eratosthenes
http://re-factor.blogspot.com/2015/06/sieve-of-eratosthenes.html
Factor: the language, the theory, and the practice. Sunday, June 7, 2015. I noticed that the Crystal Programming Language. Homepage has an example of the Sieve of Eratosthenes. Algorithm for finding prime numbers. I thought it would be fun to show a few simple variations of that algorithm in Factor. The algorithm works by iteratively marking as not prime the multiples of each prime, starting with the multiples of 2. In pseudocode, it looks like this:. Initially all set to true. N i range [ j f. Calculati...
re-factor.blogspot.com
Re: Factor: August 2015
http://re-factor.blogspot.com/2015_08_01_archive.html
Factor: the language, the theory, and the practice. Sunday, August 30, 2015. Today we are going to explore building a bowling. Score calculator using Factor. In particular, we will be scoring ten-pin bowling. There are a lot of ways to "golf" this, including this short version in F#. A sample game might look like this:. Our first transformation is to convert each character to a number of pins that have been knocked down for each ball. Strikes are denoted with. And normal hits with a number. We can solve ...