What seems to be universally fun is spending time with people who are sharing their passion. Teachers do this, so do really good presenters, friends, and leaders.
It is the experience of people sharing with you the song that their heart sings.
Author: grant
LinApple Apple 2E Emulator for Linux
LinApple is a port of AppleWin for Linux and it works great. It is a lot of fun to play around with that machine again; fond memories.
On Computing
Computing is very poorly understood. Case in point here is the litmus test I would argue to you that:
In North America you can pull any 18 year old randomly off the street and ask them to do something and it would go like this:
1. Can you build a basic bridge between a 3ft span given some materials?
2. Can you build a basic drainage system given some materials?
3. Can you organize a group of 5 people to perform a non trivial but paralleled task?
4. Can you prepare a soup like chili given materials?
5. Can you write down the computational logic to show the fibonacci sequence (given an explanation of the sequence itself)?
What percentage would you say that we pull 1000 people and given them this test? What percentage could successfully do each?
You know where I am going with this.
100% can do 1-4 and 0.01% could do 5.
There is a deep, deep lack of awareness about computation.
The problem with computation and titles around it are that very people ever think about what it is that we truly do, and often times the ones that do are relegated to the backroom. Case in point. SICP is no longer part of MIT entry program because it is too far “out there”. Kind of sad, that is part of the mystery, and the fun, what we are doing and what we can do specifically on computers, is, something that no one in history has been able to do before. We can execute things now that people have only dreamed of, computers are truly without limit. I found this special:
https://www.wisdomandwonder.com/link/979/computers-are-a-metamedium
The Lisa Project
Lisa is a production-rule system implemented in the Common Lisp Object System (CLOS), and is heavily influenced by CLIPS and the Java Expert System Shell (JESS).
Great CLIPS and JESS Posts
Here are many great posts by John Lindberg.
Geiser 0.3 is Released
Excellent for use with Racket. Get it here.
Rebootable Programs in Racket
Here is how to do it courtesy of TonyG.
Calling functions with optional arguments from the mini-buffer
Surely one of the first things VIers want to know as do the rest of us is how to move forward N characters (or backward or whatever) from the mini-buffer in EMACS. Here is how it is done, using the universal argument. So to move forward 100 chars:
C:u 100, C:f
ADDENDUM:01/13/13
Thanks FUCO for providing a better solution:
There’s also a faster way. Just hold down control key (or meta key, by default the binding is on both) and type the number, then execute the command or invoke minibuffer with M-x
So, C-2 C-0 C-f will move you 20 characters. It’s neat because you don’t have to release control, you just hit the rest of the keys in sequence.
More Basic Setup
Custom JESS REPL
If you want to use a custom JESS REPL with Emacs then set up a shell script
jsjs-repl like this:
#!/bin/bash
mvn --file /home/gcr/git/jess-sample-java-setup/jsjs/pom.xml compile -Pjess-repl
And then make this call in EMACS before calling run-jess
:
(setq inferior-jess-program "/home/gcr/git/jess-sample-java-setup/jsjs/jsjs-repl")
More Background
My background is custom software development in a consulting and stuff sup role. My work has been primarily in insurance, manufacturing, and the financial industries with clients ranging from large to small. Tech/training wise I studied mscs, computing, and computational sciences at MU; and have practiced software engineering at my day job for the past eleven years, and I mean practice, it is something I am constantly trying to get better at. Tech wise I am a pretty typical GNU/Linux & Windows person more or less, doing Java, .NET, Lisp, and recently Python.
A commonality among nearly every project I’ve worked on is the eventual occurrence of if statements 5-levels deep repeated across multiple call-sites (40+ typically) through no want/action/desire of my own. When I look at stuff like this, I feel like in addition to refactoring (regardless of the system type) there might be a better way. From what I’ve learned so far, rules engines seem like they might be a good fit.
Part of my goal here was to find a tool that not only provided a rules engine, but also helps the user to understand and debug what is happening, when, how, and why, with the intent that the developer implementing the rules can do it in a non-arcane manner and also share the behavior of the engine with business-related users to help them down the path of thinking in that manner.
jess-mode Cheat Sheet
Before tackling the CLIPS literature I felt like I ought to ramp up on the key-bindings for jess-mode in EMACS. Here are some good ones, you will find that they are basically what you would expect in the grouping that I view them in order to help the development process:
Comprehension:
-
\C-c,f
‘inf-jess-get-facts: Retrieve the fact list from the inferior Jess process. -
\C-c,r
‘inf-jess-get-rules: Retrieve the rule list from the inferior Jess process. -
\C-c,a
‘inf-jess-get-agenda: Retrieve the agenda from the inferior Jess process. -
\C-c,v
‘inf-jess-get-view: The view command displays a live snapshot of the Rete network in a graphical window. I added this one myself.
Management:
-
\C-c,g
‘inf-jess-run-engine: Run the inference engine in the inferior Jess process. -
\C-c,i
‘inf-jess-reset-engine: Reset the inference engine running in the inferior Jess process.
Evaluation:
-
\C-x\C-e
‘inf-jess-eval-last-sexp: Send the previous sexp to the inferior Jess process. Prefix argument means switch to the Jess buffer afterwards. -
\C-c,e
‘inf-jess-eval-region: Send the current region to the inferior Jess process. Prefix argument forces switch to Jess buffer afterwards. -
\C-c,b
‘inf-jess-eval-buffer: Send the entire buffer to the Inferior Jess process. Prefix argument means switch to the Jess buffer afterwards. -
\C-c,t
‘inf-jess-eval-deftemplate: Send the current deftemplate to the inferior Jess process. Prefix argument means switch to the Jess buffer afterwards. -
\M-\C-x
‘inf-jess-eval-deffunction: Send the current deffunction to the inferior Jess process. Prefix argument means switch to the Jess buffer afterwards.
I bound ‘inf-jess-val-buffer to , that is what I do for all lisp modes, but that is a personal preference thing.
To set the JESS interpreter command (make sure it is a shell scrip):
(setq inferior-jess-program "foo")
To start JESS in EMACS run:
run-jess
CLIPS Notes
For fun I worked through the CLIPS 6.30 beta literature specifically the user’s guide and basic programming guide. These are so, so helpful; they are aimed and programmers who have never worked in an expert system before. It goes in a lot more depth what you may do in CLIPS, and consequently JESS, than JESS does.
A Bit about CLIPS
JESS is a superset of CLIPS. On Linux it is a little less obvious how to get the install because CLIPS seems to come with a powerful IDE, but not on Linux. Oh well, on Ubuntu you can install it with:
sudo apt-get install clips clips-common clips-doc
Installing it provides
- the interpreter
- a nice man page
- a help file accessible within the interpreter via ‘(help)
- /usr/share/doc/clips-common/CLIPS-FAQ a compressed FAQ file readable with zcat or zless or zless to read it.
- /usr/share/doc/clips-common/html/ Local copy of the main website with links out to stuff like documentation
- /usr/share/doc/clips-common/examples/ “A number of examples of CLIPS program are available so you can test the interpreter and learn how it works. You can, for example, load one of them with (load “/usr/share/doc/clips-common/examples/wordgame.clp”) and run it using (reset) and (run).”
CLIPS seems like a great place to start with learning at least parts of JESS. I’m guessing that there is a lot of good material between the docs and examples.