Commit 781faea2 authored by Dave Cooper's avatar Dave Cooper
Browse files

updated gorg site

parent 1e90078c
(:gwl-graphics :html-template)
\ No newline at end of file
;;(:gwl-graphics :html-template)
(:html-template)
\ No newline at end of file
......@@ -3,7 +3,7 @@
(asdf:defsystem #:gorg :description
"The Gendl™ gorg Subsystem" :author "Xinyue (Cherie) Yang" :license
"Affero Gnu Public License (http://www.gnu.org/licenses/)" :serial t
:version "20150613" :depends-on (:gwl-graphics :html-template)
:version "20150613" :depends-on (:html-template)
#-asdf-unicode :defsystem-depends-on #-asdf-unicode (:asdf-encodings)
#+asdf-encodings :encoding #+asdf-encodings :utf-8
:components
......
;; Copyright 2002-2011, 2012 Genworks International
;;
;; This source file is part of the General-purpose Declarative
;; Language project (GDL).
;;
;; This source file contains free software: you can redistribute it
;; and/or modify it under the terms of the GNU Affero General Public
;; License as published by the Free Software Foundation, either
;; version 3 of the License, or (at your option) any later version.
;;
;; This source file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public
;; License along with this source file. If not, see
;; <http://www.gnu.org/licenses/>.
;;
(in-package :glsite)
(let ((static (namestring
(make-pathname
:name nil
:type nil
:defaults (merge-pathnames "../static/"
(translate-logical-pathname
(glisp:source-pathname)))))))
(publish-directory :prefix "/" :destination static))
(publish-gwl-app "/" "glsite:landing")
(in-package :glsite)
;;
;; FLAG -- this is built-in in gdl1587p006 and later.
;;
(defun glisp:source-pathname ()
#+allegro excl:*source-pathname*
#+lispworks dspec:*source-pathname*
#+sbcl (error "need source-pathname in sbcl~%")
#+ccl ccl:*loading-file-source-file*
#+clisp (error "need source-pathname in ccl~%")
#+abcl (extensions:source-pathname)
)
;;
;; In a production environment (where source directory might not be
;; there) this parameter must be set at initialization/startup time to
;; the correct location.
;;
(defparameter *templates-folder*
(translate-logical-pathname
(make-pathname :name nil :type nil
:defaults (merge-pathnames "../static/templates/"
(glisp:source-pathname)))))
(defparameter *cache-static-content?* nil)
;;
;; Quick hack for a read-from-static function with local demand-filled
;; hash table, which can be used by all object instances so they can
;; share the static data. If we have a toplevel Gendl object presiding
;; over all session root-level objects, we might be able to do
;; something for this which is more elegant and uniform with Gendl
;; style:
;;
(let ((templates-folder *templates-folder*)
(static-content-ht (make-hash-table)))
(defun clear-static () (clrhash static-content-ht))
(defun read-static (name)
(let ((key (make-keyword name)))
(or (gethash key static-content-ht)
(let ((value
(let ((template
(merge-pathnames (format nil "~a.html" name) templates-folder)))
(if (probe-file template)
(with-open-file (stream template)
(let ((data (make-string (file-length stream))))
(read-sequence data stream) data))
(let ((warn-string (format nil "<p>No template found for ~a<p>" template)))
(progn (warn warn-string) warn-string))))))
(if *cache-static-content?*
(setf (gethash key static-content-ht) value) value))))))
; the landing page computes the header and footer
; and also holds references for all of the pages.
(define-object landing (base-ajax-sheet)
:computed-slots
((section-names (list "about" "license" "downloads" "documentation" "demos" "getinvolved"))
(main-sheet-body
(with-cl-who-string ()
(str (read-static "header"))
;;
;; FLAG - this wants to go at the top of every "page"
;;
(when gwl:*developing?* (str (the development-links)))
(str (reduce #'(lambda (x y) (concatenate 'string x y))
(mapsend (the sections) :main-sheet-body)))
(str (read-static "footer")))))
:objects
((sections :type 'section
:sequence (:size (length (the section-names)))
:name (nth (the-child index) (the section-names)))))
(define-object section (base-ajax-sheet)
:input-slots
(name)
:computed-slots
((main-sheet-body
(concatenate 'string
(with-cl-who-string () ((:a :name (the name))))
(read-static (the name))))))
(in-package :glsite)
;;
;; FLAG -- this is built-in in gdl1587p006 and later.
;;
(defun glisp:source-pathname ()
#+allegro excl:*source-pathname*
#+lispworks dspec:*source-pathname*
#+sbcl (error "need source-pathname in sbcl~%")
#+ccl ccl:*loading-file-source-file*
#+clisp (error "need source-pathname in ccl~%")
#+abcl (extensions:source-pathname)
)
;;
;; FLAG -- In a production environment (where source directory might
;; not be there) this parameter must be set at initialization/startup
;; time to the correct location.
;;
(defparameter *templates-folder*
(translate-logical-pathname
(make-pathname :name nil :type nil
:defaults (merge-pathnames "../static/templates/"
(glisp:source-pathname)))))
(defparameter *cache-static-content?* nil)
;;
;; Quick hack for a read-from-static function with local demand-filled
;; hash table, which can be used by all object instances so they can
;; share the static data. If we have a toplevel Gendl object presiding
;; over all session root-level objects, we might be able to do
;; something for this which is more elegant and uniform with Gendl
;; style:
;;
(let ((templates-folder *templates-folder*)
(static-content-ht (make-hash-table)))
(defun clear-static () (clrhash static-content-ht))
(defun read-static (name)
(let ((key (make-keyword name)))
(or (gethash key static-content-ht)
(let ((value
(let ((template
(merge-pathnames (format nil "~a.html" name) templates-folder)))
(if (probe-file template)
(with-open-file (stream template)
(let ((data (make-string (file-length stream))))
(read-sequence data stream) data))
(let ((warn-string (format nil "<p>No template found for ~a<p>" template)))
(progn (warn warn-string) warn-string))))))
(if *cache-static-content?*
(setf (gethash key static-content-ht) value) value))))))
; the landing page computes the header and footer
; and also holds references for all of the pages.
(define-object landing (base-ajax-sheet)
:computed-slots
((section-names (list "about" "license" "downloads" "documentation" "demos" "getinvolved"))
(main-sheet-body
(with-cl-who-string ()
(str (read-static "header"))
;;
;; FLAG - this wants to go at the top of every "page"
;;
(when gwl:*developing?* (str (the development-links)))
(str (reduce #'(lambda (x y) (concatenate 'string x y))
(mapsend (the sections) :main-sheet-body)))
(str (read-static "footer")))))
:objects
((sections :type 'section
:sequence (:size (length (the section-names)))
:name (nth (the-child index) (the section-names)))))
(define-object section (base-ajax-sheet)
:input-slots
(name)
:computed-slots
((main-sheet-body
(concatenate 'string
(with-cl-who-string () ((:a :name (the name))))
(read-static (the name))))))
......@@ -21,21 +21,35 @@
(in-package :glsite)
(defparameter *gorg-hosts*
(list "localhost" "trusty"
"gendlformacosx.com" "www.gendlformacosx.com"
"gendlformacos.com" "www.gendlformacos.com"
"gendlformacosx.org" "www.gendlformacosx.org"
"gendlformacos.org" "www.gendlformacos.org"
"macos.gendl.com" "www.macos.gendl.com"
"macos.gendl.org" "www.macos.gendl.org"
"macosx.gendl.com" "www.macosx.gendl.com"
"macosx.gendl.org" "www.macosx.gendl.org"
"gendl.org" "www.gendl.org"
"gendl.com" "www.gendl.com"))
(defun initialize ()
(let ((static (namestring
(or
(probe-file
(make-pathname
:name nil
:type nil
:defaults (merge-pathnames "../static/"
(translate-logical-pathname
(glisp:source-pathname)))))
(when (glisp:source-pathname)
(probe-file
(make-pathname
:name nil
:type nil
:defaults (merge-pathnames "../static/"
(translate-logical-pathname
(glisp:source-pathname))))))
(probe-file (merge-pathnames "gorg-static/" glisp:*gdl-program-home*))))))
(dolist (host (list "gendl.org" "gendl.com"))
(publish-directory :prefix "/" :destination static :host host)))
(dolist (host *gorg-hosts*)
(publish-directory :prefix "/gorgstat/" :destination static :host host)))
;;
......@@ -45,10 +59,8 @@
;;(publish-gwl-app "/" "glsite:landing")
;;
(dolist (host (list "gendl.org" "gendl.com"))
(dolist (host *gorg-hosts*)
(publish-shared :host host :path "/" :object-type 'landing)))
(initialize)
<div class="fullpage about">
<h1>About Gendl</h1>
<p>Gendl is derived from "GENeral-purpose Declarative
Language". Embedded in Common Lisp, Gendl allows for high-level
declarative and object-oriented problem solving and application
development. At the heart of Gendl lies the <tt>define-object</tt>
macro. To solve a problem in Gendl, you formulate it with
a <tt>define-object</tt> form, which allows you to specify inputs,
outputs, and child objects. These combine to generate a "tree" of
objects, which can contain your problem solutions. Working with this
"functional tree" is a useful way of decomposing the complexity of
almost any kind of problem.</p>
<h2>Then</h2>
<p>Gendl has its roots in a discipline called "knowledge-based
engineering". Knowledge-based engineering (KBE) is the application
of knowledge-based systems to manufacturing design and
production. KBE has been used in cutting-edge companies since the
mid 1980s for tackling the toughest design and engineering
challenges, usually involving geometry. For more information,
see
the <a href="http://en.wikipedia.org/wiki/Knowledge-based_engineering">Wikipedia
article on KBE</a>.</p>
<p> Back in the day, companies like Boeing, Airbus, and Rolls-Royce
invested hundreds of thousands of dollars in software and
workstations to achieve KBE capabilities. Because it was so costly
and so specialized, KBE was only ever used by high-end companies on
the most challenging problems --- the technique never saw mainstream
use. </p>
<h2>Now</h2>
<p>In Gendl today, you have the same powerful workhorse at your
fingertips, running on commodity hardware and free, open-source
software. So the door is now open to apply this technology to
routine everyday problems, as well as the high-end engineering and
geometry challenges.</p>
<p>Gendl contains the entire language kernel, web interface
components, and basic geometry primitives. Its commercial sibling,
<a href=http://genworks.com>Genworks&reg; GDL</a>. GDL adds
proprietary licensing (for closed-source application deployment),
commercial technical support, a world-class NURBS surface and solid modeling
kernel, and a choice of commercial Common Lisp engines.</p>
<p>Knowledge-based engineering uses something called knowledge models to represent parts of the design process. For more information on what KBE is, see the <a href="http://en.wikipedia.org/wiki/Knowledge-based_engineering">wikipedia article on KBE</a>.</p>
</div>
<div class="fullpage about">
<h1>About Gendl</h1>
<p>Gendl is derived from "GENeral-purpose Declarative
Language". Embedded in Common Lisp, Gendl allows for high-level
declarative and object-oriented problem solving and application
development. At the heart of Gendl lies the <tt>define-object</tt>
macro. To solve a problem in Gendl, you formulate it with
a <tt>define-object</tt> form, which allows you to specify inputs,
outputs, and child objects. These combine to generate a "tree" of
objects, which can contain your problem solutions. Working with this
"functional tree" is a useful way of decomposing the complexity of
almost any kind of problem.</p>
<h2>Then</h2>
<p>Gendl has its roots in a discipline called "knowledge-based
engineering". Knowledge-based engineering (KBE) is the application
of knowledge-based systems to manufacturing design and
production. KBE has been used in cutting-edge companies since the
mid 1980s for tackling the toughest design and engineering
challenges, usually involving geometry. For more information,
see
the <a href="http://en.wikipedia.org/wiki/Knowledge-based_engineering">Wikipedia
article on KBE</a>.</p>
<p> Back in the day, companies like Boeing, Airbus, and Rolls-Royce
invested millions of dollars in software and workstations to achieve
KBE capabilities. Because it was so costly and so specialized, KBE
was only ever used by high-end companies on the most challenging
problems --- the technique never saw mainstream use. </p>
<h2>Now</h2>
<p>In Gendl today, you have the same powerful workhorse at your
fingertips, running on commodity hardware and free, open-source
software. So the door is now open to apply this technology to
routine everyday problems, as well as the high-end engineering and
geometry challenges.</p>
<p>Gendl contains the entire language kernel, web interface
components, and basic geometry primitives. Its commercial sibling,
<a href=http://genworks.com>Genworks&reg; GDL</a>. GDL adds
proprietary licensing (for closed-source application deployment),
commercial technical support, a world-class NURBS surface and solid modeling
kernel, and a choice of commercial Common Lisp engines.</p>
<p>Knowledge-based engineering uses something called knowledge models to represent parts of the design process. For more information on what KBE is, see the <a href="http://en.wikipedia.org/wiki/Knowledge-based_engineering">wikipedia article on KBE</a>.</p>
</div>
<html>
<head>
<title>Gendl</title>
<link href='http://fonts.googleapis.com/css?family=Iceberg' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link href="/css/styles.css" rel="stylesheet" media="screen">
<script type="text/javascript">
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 500);
return false;
}
}
});
});
</script>
</head>
<body>
<a name="home"></a>
<div class="fullpage landing" id="first">
<div class="banner">
the
<span class="gendl">
gendl</span>
project
<!--
<div class="showcase">
<img src="/imgs/03.png">
<img src="/imgs/05.png">
<img src="/imgs/04.png">
</div>
-->
</div>
</div>
<a name="about"></a>
<div class="fullpage two">
<img src="/imgs/logo.png" align="left">
<h1>About Gendl, or, What can you do with emacs and a web browser?</h1>
<p>Gendl (or GenDL) stands for "GENeral-purpose Declarative Language". Gendl is a language, embedded in Common Lisp, that allows for high-level declarative and object-oriented problem solving and application development. At the heart of Gendl lies the <tt>define-object</tt> macro. To solve a problem in Gendl, you formulate it with <tt>define-object</tt>, which allows you to specify inputs, outputs, and child objects. These combine to give you the ability to generate a "tree" of objects, a useful way of decomposing complexity.</p>
<h2>"Knowledge-based engineering"?</h2>
<p>You'll often here Gendl associated with something called "knowledge-based engineering". Knowledge-based engineering (KBE) is the application of knowledge-based systems to manufacturing design and production. It's especially important with computer-aided design (CAD) software because such software happens to be intensively knowledge-based.</p>
<p>Knowledge-based engineering uses something called knowledge models to represent parts of the design process. For more information on what KBE is, see the <a href="http://en.wikipedia.org/wiki/Knowledge-based_engineering">wikipedia article on KBE</a>.</p>
</div>
<a name="license"></a>
<div class="fullpage three license">
<img src="/imgs/agpl.png" align="left">
<h1>License: The Affero GNU Public License</h1>
<blockquote><p>The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.</p>
<p>
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee <b>your freedom to share and change all versions of a program</b>--to make sure it remains <b>free software</b> for all its users.
</p><p>
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.</p>
<p>- The AGPL Preamble (<a href="http://www.gnu.org/licenses/agpl-3.0.html">link</a>)</blockquote>
<p>Gendl is licensed under the Affero GNU Public License (AGPL). For writers of Gendl applications, this means that your applications also need to be released under AGPL. There are no restrictions against commercial use of this free system, but the source code for your system must be made available.</p>
<p>For those with closed-source needs, the commercial Genworks GDL is available. See <a href="http://genworks.com/">here</a> for more information. </p>
</div>
<a name="downloads"></a>
<div class="fullpage two">
<h1>Downloads</h1>
<p>Current stable version:</p>
<a href="http://downloads.genworks.com/gendl1587p008-ccl-linux.zip"><div class="download">Linux</div></a>
<a href="http://downloads.genworks.com/gendl1587p008-windows-oss.exe"><div class="download">Windows</div></a>
<a href="http://downloads.genworks.com/gendl1587p008-ccl.dmg"><div class="download">Mac</div></a>
<p>Current development version:</p>
<div class="download">Linux</div>
<div class="download">Windows</div>
<div class="download">Mac</div>
<p>Older downloads:</p>
<p>
<ul>
<li>version 007:
<a href="">linux</a> |
<a href="">windows</a> |
<a href="">mac</a>
</li>
<li>version 006:
<a href="">linux</a> |
<a href="">windows</a> |
<a href="">mac</a>
</li>
<li>version 005:
<a href="">linux</a> |
<a href="">windows</a> |
<a href="">mac</a>
</li>
</ul>
</p>
</div>
<a name="documentation"></a>
<div class="fullpage three docs">
<h1>Documentation/Resources</h1>
<p>We're currently working on some web-based documentation. For now: </p>
<ul>
<li><p>Please see the <a href="http://genworks.com/downloads/tutorial.pdf">GDL manual</a>. This user manual is written for the commercial Genworks GDL; however, this has enough in common with Gendl that it is still relevant.</p></li>
<li><p>Check out our new series of <a href="http://www.youtube.com/watch?v=lUE8dGkJIlE&feature=youtu.be&list=PLRhCdLP6SHQ-BIvUEBuVW0Ip5npMR9M4x">video tutorials</a>. Note: This is still a work in progress.</li>
<li><p>Here's some <a href="https://www.dropbox.com/sh/utdoexvoxrajju4/AAC6OIfhtgHb0CkmZeye1zhqa">example code</a> to get you used to what Gendl code looks like. </p></li>
</ul>
</div>
<a name="demos"></a>
<div class="fullpage two">
<h1>Demos</h1>
</div>
<a name="getinvolved"></a>
<div class="fullpage three">
<h1>Get Involved</h1>
<img src="/imgs/github.png" align="right" />
<p>Do you love Gendl and want to become a part of something awesome? You can get started by forking our Github repository at <a href="https://github.com/genworks/gendl">genworks/gendl</a>. </p>
</div>
<div class="footer">
<a href="#home">
Home
</a>
<a href="#about">About</a>
<a href="#license">License</a>
<a href="#downloads">Downloads</a>
<a href="#documentation">Documentation</a>
<a href="#demos">Demos</a>
<a href="#getinvolved">Get Involved</a>
</div>
</body>
</html>
<html>
<head>
<title>Gendl</title>
<link href='http://fonts.googleapis.com/css?family=Iceberg' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link href="/gorgstat/css/styles.css" rel="stylesheet" media="screen">
<script type="text/javascript">
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 500);
return false;
}
}
});
});
</script>
</head>
<body>
<a name="home"></a>
<div class="fullpage landing" id="first">
<div class="banner">