Re: Literate Programming example

2011-11-18 Thread TimDaly
On Fri, 2011-11-18 at 20:02 -0800, Daniel Jomphe wrote: > On Friday, November 18, 2011 7:17:08 AM UTC-5, TimDaly wrote: > Many of you asked me to show an example of a literate > program and demonstrate the use of the tangle function. > > I usually use Lat

The Last Programming Language

2011-07-18 Thread TimDaly
Robert Martin argues that Clojure could be the seed of the last programming language. http://skillsmatter.com/podcast/agile-testing/bobs-last-language -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

trace facility?

2010-09-19 Thread TimDaly
In common lisp I can say (trace foo) and it will print out the arguments and the return value of calls to foo. Would it be possible to create such a facility in clojure, perhaps by defining a new class loader? Java knows the types of the arguments and the return values so it should be possible to w

Events vs Threads paper

2010-04-15 Thread TimDaly
This might be interesting when the discussion of events vs threads comes up: http://www.usenix.org/events/hotos03/tech/full_papers/vonbehren/vonbehren_html/ Essentially they argue that thread programming can scale (100k threads?) -- You received this message because you are subscribed to the Goo

getRuntime exec call?

2010-03-19 Thread TimDaly
(defn cmdresult [cmdstr] (let [args (into [] (seq (.split cmdstr " ")))] (BufferedReader. (InputStreamReader. (. (. (. Runtime (getRuntime)) (exec args)) (getInputStream)) (defn readLine [cmdresult] (. cmdresult (readLine))) (def a (cmdresult "ls *.o")) This fails claiming: No

call java main from clojure

2010-03-09 Thread TimDaly
I searched the archives and google but cannot find an example. How do I call main? packge thefoo; public class Foo { public static void main(String[] args) { System.out.println(args[0]); } } I tried (import '(thefoo Foo)) (. Foo (thefoo/main ["test"])) java.lang.ClassCastException: cloj

(trace function)

2010-03-05 Thread TimDaly
Is there a (trace function) facility? One of my major debugging tools in Common Lisp is trace. I scanned the docs and did not see anything about it. Tim Daly -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure

group tag for clojure newsgroup

2010-03-04 Thread TimDaly
For the other groups that I subscribe to, the email subjects are always prefixed with the group name, e.g. Re: [sage-devel] This is the mail subject This makes it possible to reliably group the emails into folders. Is it possible to do the same for Clojure and Clojure-dev? -- You received this

Re: Binary byte reader closure

2010-03-03 Thread TimDaly
Works for me now. No idea what changed. Different day. Sigh. On Mar 3, 12:07 pm, Michael Wood wrote: > On 2 March 2010 23:57, TimDaly wrote: > > > > > I would like to have a function that returns the next binary byte of a > > file. > > I tried > > >

Re: Binary byte reader closure

2010-03-03 Thread TimDaly
) (. in (read in slightly more traditional syntax. Since (read) returns a byte each call should return a byte. On Mar 3, 9:43 am, Meikel Brandmeyer wrote: > Hi, > > On Mar 2, 10:57 pm, TimDaly wrote: > > > (defn reader (file) > >   (let [in (new java.io.FileInputS

Binary byte reader closure

2010-03-03 Thread TimDaly
I would like to have a function that returns the next binary byte of a file. I tried (defn reader (file) (let [in (new java.io.FileInputStream file] #(. in (read The idea is that I could call this function once and it would return a closure over the 'in' object. Then I could simply call