I object to doing things that computers can do.
Tag: Programming
How one class brought SICP back at MIT
Zombie-like, 6.001 rises from the dead to threaten students again. Unlike a zombie, though, it’s moving quite a bit faster than it did the first time. Like the original, don’t walk into the class expecting that it will teach you Scheme; instead, it attempts to teach thought patterns for computer science, and the structure and interpretation of computer programs. Three projects will be assigned and graded. Prereq: some programming experience; high confusion threshold.
(via MIT via keegan via planethaskell)
The rational for returning the identity for expressions such as (*) and (+)
This post in comp.lang.scheme brings up a question that inevitably everyone asks.
Suppose the answer is obvious but John summed it up well:
Well, if you interpret (apply + some-list) and (apply * some-other-list) as left-folds, then a starting point is needed, something to begin accumulating from. The identity is the only value that works correctly, so it’s what gets returned when the list being folded over has length 0. Nobody would write (+) or (*) explicitly, but having them return the identity is the Right Thing nevertheless.
The same argument applies when expanding macros: in a degenerate case, a macro may expand to (+) or (*), and it’s usually not appropriate to raise an exception.
SchemaSpy: A Graphical Database Schema Metadata Browser
SchemaSpy is a Java-based tool that analyzes the metadata of a schema in a database and generates a visual representation of it in a browser-displayable format. It lets you click through the hierarchy of database tables via child and parent table relationships as represented by both HTML links and entity-relationship diagrams. It’s also designed to help resolve the obtuse errors that a database sometimes gives related to failures due to constraints.
This is an excellent tool in its own right; and if nothing else for its beautiful use of Graphviz.
See the example(s) here.
GSL Shell
GSL Shell is an interactive interface that gives access to the GSL numerical routines by using Lua, an easy to learn and powerful programming language. With GSL Shell you can access very easily the functions provided by the GSL library without the need of writing and compile a stand-alone C application. In addition the power and expressivity of the Lua language make easy to develop and tests complex procedures to treat your data and use effectively the GSL routines. You will be also able to create plot in real-time by using the powerful builtin graphical module.
GSL Shell is still a young project and it is currently not widely used. It still lacks some important features but we believe that it is very promising because it is built on top of three outstanding free software libraries: the GSL library, Lua and the AGG library. By using and combining together these software components GSL Shell gives the opportunity of doing advanced numerical calculations and produce beautiful plot of the data or mathematical functions.
(via GSL via Mike K.)
Like Mike said, looks like a nice complement to Octave or MATLAB.
The Little Schemer is on Google Books
DrScheme Style Buffer Evaluation for OCaml in Emacs
When you want to evaluate code inside of DrScheme, you hit the F5 key and the entire editor buffer gets evaluated inside of a new REPL. Unlike Emacs, the ability to send the current expression, region, or buffer to the REPL isn’t available. It might sound constricting, but in practice it is very nice because you are always working with the most up-to-date versions of your definitions. It might sound slow to start a new REPL on each run, but it isn’t; on my older desktop the new REPL comes up before my finger even comes off of the F5 key. This approach seemed like a nice to have for working with OCaml in Tuareg mode on Emacs, so I pieced together a function to do so against Tuareg 1.45.6:
(defun tuareg-eval-buffer-drscheme-style ()
"Send the buffer to a brand new Tuareg Interactive process."
(interactive)
(tuareg-kill-caml)
(sleep-for 0.25)
(if (get-buffer tuareg-interactive-buffer-name)
(kill-buffer tuareg-interactive-buffer-name))
(tuareg-eval-buffer)
(switch-to-buffer tuareg-interactive-buffer-name))
Out of the box Tuareg mode will ask you what program name to run to start OCaml each and every time you evaluate the buffer, even when the variable storing that name is defined. I didn’t find a way to avoid this prompt so I patched Tuareg such that it will not ask you if a value is already defined for the program name. Here is the patch.
Thus far it has been nice to have the option of evaluating the whole buffer in a new REPL in addition to the existing incremental evaluation options.
Tuareg mode has new maintainers
Emacs 23.2 is out
Maven and Idea
Here is how to ask Maven to generate Idea project files for you:
mvn idea:idea -DjdkName=1.5
(via Maven)