diff --git a/extra/webapps/mason/grids/grids.factor b/extra/webapps/mason/grids/grids.factor index 26d7a0a94a..d975292a86 100644 --- a/extra/webapps/mason/grids/grids.factor +++ b/extra/webapps/mason/grids/grids.factor @@ -9,7 +9,7 @@ IN: webapps.mason.grids : render-grid-cell ( cpu os quot -- xml ) call( cpu os -- url label ) 2dup and - [ link [XML
<->
XML] ] + [ link [XML <-> XML] ] [ 2drop [XML XML] ] if ; @@ -27,11 +27,11 @@ CONSTANT: cpus } : render-grid-header ( -- xml ) - oses values [ [XML <-> XML] ] map ; + oses values [ [XML <-> XML] ] map ; :: render-grid-row ( cpu quot -- xml ) cpu second oses keys [| os | cpu os quot render-grid-cell ] map - [XML <-><-> XML] ; + [XML <-><-> XML] ; :: render-grid ( quot -- xml ) render-grid-header diff --git a/extra/websites/factorcode/examples.txt b/extra/websites/factorcode/examples.txt index 85f5bcb196..0772e3ce00 100644 --- a/extra/websites/factorcode/examples.txt +++ b/extra/websites/factorcode/examples.txt @@ -14,7 +14,6 @@ http.client xml xml.data xml.traversal ; ---- USING: accessors kernel math math.constants math.functions prettyprint ; -IN: shapes TUPLE: circle radius ; TUPLE: rectangle width height ; @@ -50,7 +49,8 @@ USING: sequences xml.syntax xml.writer ; [XML XML] pprint-xml ---- -USING: inspector io.files.info io.pathnames system tools.files ; +USING: inspector io.files.info +io.pathnames system tools.files ; home directory. home file-system-info free-space>> . @@ -59,5 +59,6 @@ image-path file-info describe USING: io kernel sequences ; 4 [ - "Happy Birthday " write 2 = "dear NAME" "to You" ? print + "Happy Birthday " write + 2 = "dear NAME" "to You" ? print ] each diff --git a/extra/websites/factorcode/favicon-16x16.png b/extra/websites/factorcode/favicon-16x16.png new file mode 100644 index 0000000000..816bdef22a Binary files /dev/null and b/extra/websites/factorcode/favicon-16x16.png differ diff --git a/extra/websites/factorcode/favicon-32x32.png b/extra/websites/factorcode/favicon-32x32.png new file mode 100644 index 0000000000..8413edf219 Binary files /dev/null and b/extra/websites/factorcode/favicon-32x32.png differ diff --git a/extra/websites/factorcode/favicon.ico b/extra/websites/factorcode/favicon.ico new file mode 100644 index 0000000000..d40a4eae6b Binary files /dev/null and b/extra/websites/factorcode/favicon.ico differ diff --git a/extra/websites/factorcode/index.fhtml b/extra/websites/factorcode/index.fhtml index 4d065f2be6..baec686d33 100644 --- a/extra/websites/factorcode/index.fhtml +++ b/extra/websites/factorcode/index.fhtml @@ -1,52 +1,54 @@ -<% USING: namespaces http.client kernel io.files splitting random io io.encodings.utf8 sequences -webapps.mason.version.data webapps.mason.backend webapps.mason.grids webapps.mason.downloads -webapps.mason.utils html.elements html.streams accessors -xml.writer xmode.highlight ; %> +<% + +USING: accessors html.elements html.streams http.client io io.encodings.utf8 +io.files kernel multiline namespaces random sequences splitting +webapps.mason.backend webapps.mason.downloads webapps.mason.grids +webapps.mason.utils webapps.mason.version.data xml.writer xmode.highlight ; + +%> + + + Factor programming language - -
+
Factor programming language -
- +
+ +

Why Factor

+ +

The Factor programming language is a concatenative, stack-based programming language with high-level features including dynamic types, extensible syntax, macros, and garbage collection. On a practical side, Factor has a full-featured library, supports many different platforms, and has been extensively documented.

+

The implementation is fully compiled for performance, while still supporting interactive development. Factor applications are portable between all common platforms. Factor can deploy stand-alone applications on all platforms. Full source code for the Factor project is available under a BSD license.

+ +
- -
-

Why Factor?

- -

The Factor programming language combines powerful language features with a full-featured library. The implementation is fully compiled for performance, while still supporting interactive development. Factor applications are portable between all common platforms. Factor can deploy stand-alone applications on all platforms. Full source code for the Factor project is available under a BSD license.

- -

Most of the above links point to pages on the concatenative.org wiki.

- -

Show me some code!

- -

Factor belongs to the family of concatenative languages: this means that, at the lowest level, a Factor program is a series of words (functions) that manipulate a stack of references to dynamically-typed values. This gives the language a powerful foundation which allows many abstractions and paradigms to be built on top. Reload this page to see a random code example below.

-
<%
 "resource:extra/websites/factorcode/examples.txt" utf8 file-lines
 { "----" } split random
@@ -54,23 +56,19 @@ xml.writer xmode.highlight ; %>
 xml>string write-html
 %>
-

See the example programs page on the wiki for more.

-

Downloads

<% [ %> -

To download a binary, follow the link corresponding to your computer's CPU/OS configuration. Binary packages are the recommended route for new users who wish to try Factor.

+

To download a binary, follow the link for the desired OS / CPU configuration. Binary packages are the recommended route for new users who wish to try Factor.

Stable release: <% latest-version > =href a> ] [ version>> write ] bi %>

- <% release-grid write-xml %>

Source code: @@ -78,16 +76,15 @@ xml>string write-html

Development release

- <% package-grid write-xml %> <% ] with-mason-db %> -

Stable and development releases are built and uploaded by the build farm. Follow @FactorBuilds on Twitter to receive notifications. If you're curious, take a look at the build farm dashboard.

+

Source code: available via github or gitweb.

-

Source code is stored in our GIT repository. Source can can be browsed online via github or gitweb.

+

Stable and development releases are built and uploaded by the build farm. Follow @FactorBuilds on Twitter to receive notifications. If you're curious, take a look at the build farm dashboard. You can also build Factor on your own platform from source.

-

More

+

Community

- + + diff --git a/extra/websites/factorcode/master.css b/extra/websites/factorcode/master.css index 72088b72ab..5de5fa1737 100644 --- a/extra/websites/factorcode/master.css +++ b/extra/websites/factorcode/master.css @@ -1,144 +1,93 @@ +html { + box-sizing: border-box; +} + +*, *:before, *:after { + box-sizing: inherit; +} + +a:link { text-decoration: none; color: #104e8b; } +a:visited { text-decoration: none; color: #104e8b; } +a:active { text-decoration: none; color: #104e8b; } +a:hover { text-decoration: underline; color: #104e8b; } + body { - font:75%/1.6em "Lucida Grande", "Lucida Sans Unicode", verdana, geneva, sans-serif; + font-size: 12pt; + font-family: sans-serif; + text-align: center; } -ul { - margin:10px 10px 10px 0; - padding:0 0 0 15px; -} - -li { - margin:0 0 0 10px; - padding:5px; -} - -a { - color:#222; - border-bottom:1px solid #aaa; - text-decoration:none; -} - -a:hover { - border-bottom:1px solid #ccc; -} - -ol.subnav { - margin:-10px -10px 0 -5px; - padding:0; -} - -ol.subnav li { - font:85%/0.9em "Lucida Grande", "Lucida Sans Unicode", verdana, geneva, sans-serif; - float:left; - list-style:none; - margin:0; - padding:0; -} - -ol.subnav a { - font-weight:bold; - color:#555; - border-top:2px solid #fff; - display:block; - padding:5px; - text-decoration:none; - margin:0 5px 0 0; - border-bottom:none; -} - -ol.subnav a:hover { - border-top:2px solid #943329; - color:#121212; - border-bottom:none; -} - -#downloads { - width: 520px; - padding: 0; - margin: 0; -} - -caption { - padding: 0 0 5px 0; - width: 520px; - font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; - text-align: right; -} - -th { - font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; - color: #4f6b72; - border-right: 1px solid #C1DAD7; - border-bottom: 1px solid #C1DAD7; - border-top: 1px solid #C1DAD7; - letter-spacing: 2px; - text-transform: uppercase; - padding: 6px 6px 6px 6px; - background: #CAE8EA url(bg_header.jpg) no-repeat; -} - -th.nobg { - border-top: 0; - border-left: 0; - border-right: 1px solid #C1DAD7; - background: none; +.page { + max-width: 800px; + text-align: left; + line-height: 150%; } pre { - border: 1px dashed #ccc; - background-color: #f5f5f5; - font-size: 120%; + background-color: #f5f5f5; + border: 1px dashed #ccc; + margin-top: 10px; + padding: 10px; + font-size: smaller; + width: 400px; } -td.alt { - background: #F5FAFA; - color: #797268; +ul { + margin: 10px 10px 10px 0; + padding-left: 10px; } -td.doesnotexist { - background: #E5EAEA; +li { + margin-left: 10px; + padding: 5px; } - -td.unsupported { - background: #ffaaaa; +#downloads { + width: 520px; + padding: 0; + margin: 0; } - -td.supported { - background: #aaffaa; +#downloads th { + color: #4f6b72; + border: 1px solid #C1DAD7; + border-left: none; + letter-spacing: 2px; + text-transform: uppercase; + padding: 6px; + background: #CAE8EA url(bg_header.jpg) no-repeat; + text-align: center; + vertical-align: center; } -td.supported :hover { background-color: #88ff88; } - -td.nobinary { - background: #eeee88; +#downloads th.nobg { + border: 0; + border-right: 1px solid #C1DAD7; + background: none; } -div.bigdiv { - width: 100px; - text-align: center; - color: #050; +#downloads td { + text-align: center; + vertical-align: center; } -th.spec { - border-left: 1px solid #C1DAD7; - border-top: 0; - background: #fff; - font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; +#downloads td.alt { + background: #F5FAFA; + color: #797268; } -th.specalt { - border-left: 1px solid #C1DAD7; - border-top: 0; - background: #f5fafa; - font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; - color: #797268; +#downloads td.doesnotexist { + background: #E5EAEA; } -th.allbg { - border-top: 0; - border-left: 0; - border-right: 0; - background: none; +#downloads td.unsupported { + background: #ffaaaa; +} + +#downloads td.supported { + background: #aaffaa; +} + +#downloads td.nobinary { + background: #eeee88; }