Re: Idea around SCMs and Clojure

2012-07-22 Thread Tim Snyder
There are/have been some implementations of the ideas mentioned in the original post: 1. Smalltalk - I used the Squeak implementation in college and found it terribly frustrating when the image would crash. 2. IBM VisualAge for Java - I used this about 15 years ago. It still used files for each

Re: Screencast of the Emacs front end to the Clojure Debugging Toolkit:

2010-10-01 Thread Tim Snyder
Fantastic work George! On Oct 1, 4:32 pm, George Jahad wrote: > For your delectation:http://www.vimeo.com/15462015 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new

Re: Getting Clojure into the workplace, how do you do it?

2010-07-06 Thread Tim Snyder
On Jul 6, 4:50 am, Nick Mudge wrote: > One of the things I like about Clojure is it is a way to get lisp and > functional programming into workaday programming work; into the many > places and businesses that use Java. > > I'd be very interested to hear stories or experiences of getting > Clojur

Re: holding types or units in metadata vs pattern matching

2010-04-03 Thread Tim Snyder
One approach to consider is using clojure.contrib.types, which provides general and abstract data types. If you're familiar with pattern matching from Scala, you'll feel right at home. On Apr 2, 6:47 pm, strattonbrazil wrote: > What's the best way to keep track of what kind of value something is

Re: Parallel version of list comprehension

2010-02-08 Thread Tim Snyder
de you could paste? > > On Feb 7, 11:53 pm, Tim Snyder wrote: > > > > > Is there a straight-forward way to get parallelization when using list > > comprehension? > > The form of "for" syntax is much preferable to the closest I could > > come up with usin

Parallel version of list comprehension

2010-02-07 Thread Tim Snyder
Is there a straight-forward way to get parallelization when using list comprehension? The form of "for" syntax is much preferable to the closest I could come up with using pmap. I also was having trouble getting the correct level of nesting down when using pmap, though probably because I'm tired.

Re: Lazy Exceptions

2009-08-27 Thread Tim Snyder
lazy sequence may no longer be within the dynamic confines of the 'try' in which it was called and thus should be considered a runtime exception? Tim Snyder wrote: > Thanks for the replies. I'll have a look at the impl. of LazySeq > tonight and see if that helps. It sou

Re: Lazy Exceptions

2009-08-27 Thread Tim Snyder
Brandmeyer wrote: > Hi, > > On Aug 27, 5:47 am, Tim Snyder wrote: > > > > > > > I'm trying to understand how laziness affects exception handling.  I > > keep finding my exceptions wrapped in RuntimeExceptions. > > > If I have code that just throw

Lazy Exceptions

2009-08-27 Thread Tim Snyder
I'm trying to understand how laziness affects exception handling. I keep finding my exceptions wrapped in RuntimeExceptions. If I have code that just throws an exception, I get what I'd expect: (throw (Exception. "Plain Exception")) --> Plain Exception [thrown class java.lang.Exception] On the

Re: Function of clojure.templates

2009-07-21 Thread Tim Snyder
apply-template is used internal to the template namespace by the do- template macro. The do-template macro that allows you to apply some code to groups of arguments. In order to get what I think you're after, use do-template in the following fashion: (do-template (+ _1 _1) 2) --> (+ 2 2) On Jul

Re: Clojure Partial Evaluator

2009-07-20 Thread Tim Snyder
Thanks for the interest. As Meikel said, the point is to move the computation to compile time. But it goes a little deeper than that. You can imagine any program as a set of operations on data. Some of this data is known at compile time and some is only known at run time. Partial evaluation tr

Clojure Partial Evaluator

2009-07-20 Thread Tim Snyder
I completed a 0.1 version of a Clojure partial evaluator. It consists of a macro "par-eval" that analyses the form it is passed and replaces all the sub-forms that can be reduced at macro-expand time with their reduced versions, provided a printable form exists. It can be obtained from git://git

Loop, Recur, and Binding

2009-07-17 Thread Tim Snyder
I was experimenting with how binding behaves within a loop and found some inconsistent results: (def y 0) (loop [x 0] (println "x " x) (binding [y (inc y)] (println "y " y) (if (< x 10) (recur (inc x) The printed lines are what you'd expect: x 0 y 1 x 1 ... x 10 y 11 But if

Accessing dynamic and lexical bindings

2009-07-14 Thread Tim Snyder
I'm trying to determine if there is a way to gain access to the dynamic and lexical bindings tables at both run-time and compile- time. In general this seems like a bad idea, but I'd like to be able to modify the evaluation environment while performing compile-time partial evaluation. Last night

Compile Time Partial Evaluation

2009-07-11 Thread Tim Snyder
Hey Everyone, I had typed a long post last night and it somehow was lost. Maybe I'll be more succinct today. I'm trying to write a macro that will evaluate it's syntax tree where possible and return a tree representing all the calculations that must be performed at run-time. A calculation that

Compile Time Partial Evaluation

2009-07-11 Thread Tim Snyder
Hello Everyone! I've been experimenting with the idea of performing compile-time partial evaluation of calls where possible, using a macro. I must preface this discussion that I realize it is a bit of an abuse of macros. The reasons for this abuse are 1) an attempt to mimic performance improvem