Front Page All Articles Recent Changes Random Article

Contents

Concatenative language

  • ACL
  • Ait
  • Aocla
  • Breeze
  • Cat
  • Cognate
  • colorForth
  • CoSy
  • Deque
  • Elymas
  • Enchilada
  • ETAC
  • F
  • Factor
  • Forth
  • Freelang
  • Gershwin
  • Joy
  • Kitten
  • lang5
  • Lviv
  • min
  • mjoy
  • Mlatu
  • Ode
  • Om
  • Onyx
  • Plorth
  • Popr
  • Porth
  • PostScript
  • Quackery
  • r3
  • Raven
  • Retro
  • Staapl
  • Stabel
  • Trith
  • Worst
  • xs
  • XY
  • 5th
  • 8th

Other languages

  • APL
  • C++
  • Erlang
  • FP trivia
  • Haskell
  • Io
  • Java
  • JavaScript
  • Lisp
  • ML
  • Oberon
  • RPL
  • Self
  • Slate
  • Smalltalk

Computer Science

  • Type systems
  • Language paradigms
  • Compilers
  • Interpreters
  • Garbage collection

Meta

  • Search
  • Farkup wiki format
  • People
  • Etiquette
  • Sandbox

Factor/Examples

Examples

Here are a few of my favorite example programs.

Simple

  • hello-world
  • hello-unicode

Networking/web

  • time-server - simple TCP/IP server
  • webapps.calculator - simple webapp
  • webapps.wiki - the source code to this wiki
  • smtp - send e-mail via SMTP, with optional SSL support
  • syndication - parse RSS and Atom feeds, write Atom feeds

Algorithms

  • rot13 - rot13 "encryption"
  • roman - convert numbers to and from roman numerals
  • morse - convert strings to morse code and vice versa, and play morse code with OpenAL
  • base64
  • id3 - ID3 parser
  • usa-cities - parse a CSV file and extract information
  • benchmark.mandel - Mandelbrot fractal generator

Running the examples

Some of these demos define a MAIN: word. This means they are runnable from the Factor listener, by issuing a command such as the following,

"hello-unicode" run

Others are libraries, which means that after loading them with a command like,

USE: roman

you can then get a list of words,

"roman" about

and play around,

( scratchpad ) 123 >roman .
"cxxiii"

More

To see more examples of Factor code, download the Factor distribution and take a look in the core/, basis/ and extra/ directories. Also be sure to browse the online help, either from the Factor UI or online at http://docs.factorcode.org.

This revision created on Fri, 17 Jul 2009 23:07:16 by slava

Latest Revisions Edit

All content is © 2008-2023 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.