Re: Excellent intro to core.logic

2011-07-19 Thread Tassilo Horn
David Nolen  writes:

Hi David,

> Ambrose has submitted a patch which I need to go over. Even so, I
> don't think docstrings are going to help you that much.

It doesn't teach you logic programming, but at least it could explain
the arguments.  Something like:

(defmacro exist [[& x-rest] & g-rest]
  "Takes a vector of symbols that are provided as fresh vars in body."
  {:arglists '([[sym*] & body])}
  `(fn [a#]
 (inc
  (let [~@(lvar-binds x-rest)]
(bind* a# ~@g-rest)

> If you want to dig in I recommend reading:
>
> - The Reasoned Schemer

Yes, it's on my reading list. :-)

> When it comes to logic programming it does help to have a basic
> understand of the execution model.
>
> - William Byrd's thesis on miniKanren,
> https://scholarworks.iu.edu/dspace/handle/2022/8777

Got it.

> At this point you'll still be at loss as far as practical applications
> - for that you need to look at some Prolog literature:
>
> - Bratko's Prolog Programming for Artificial Intelligence
> - Sterling & Shapiro's Art of Prolog
>
> Attempting to compete with the existing high-quality literature is a
> non-goal for me at least.
>
> I admit that diving into core.logic is a bit of an adventure at this
> point (though I'd like to think a very rewarding one). As more people
> give it a shot I hope others will weigh in with wonderful
> tutorial/guides such as Ambrose's.

I'm looking forward to reading more of those. :-)

Bye,
Tassilo

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: use of subseq on a vector which I know is already sorted

2011-07-19 Thread Sunil S Nandihalli
thanks Miekel, Bennyand Ken for your responses..
Sunil.

On Mon, Jul 18, 2011 at 7:15 PM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:

> Hi everybody,
>
> I have a situation where I know that the sequence I have at hand is sorted
> but does not implement the Sorted interface. How can I use subseq for
> example on a vector without actually creating a sorted-set out of it which I
> think may be wasteful.. Am I mis-informed about creation of sorted-set being
> wastefull? If I am right in assuming what I said above, how can efficiently
> make something like following work? can I like just implement Sorted for
> Vector in the namespace I am working in?
>
> (subseq [1 2 3 4] < 3)
>
> thanks,
> Sunil.
>

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: :require farms in Clojure?

2011-07-19 Thread Meikel Brandmeyer
Hi,

Am Mittwoch, 20. Juli 2011 06:38:27 UTC+2 schrieb Chas Emerick:
>
> Try:
>
> (ns myfuns
>(:require
>(foo.baz [a :as a]
> [b :as b]
> [c :as c]))
>
I think he wants more something like this:

(ns require.farm)

(def xxx '[[foo.bar [a :as a] [b :as b]] frob.nicate])
(def yyy '[[foo.bar.c :as c]])

(ns require.userA
  (:require [require.farm :as requires]))

(apply require requires/xxx)

(ns require.userB
  (:require [require.farm :as requires]))

(apply require requires/xxx)
(apply require requires/yyy)

Sincerely
Meikel

 

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Error running Clojure 1.3 in Eclipse

2011-07-19 Thread Sean Corfield
On Tue, Jul 19, 2011 at 4:57 PM, Chas Emerick  wrote:
> Depends on what you're using out of contrib 1.2.0.  There are a number of 
> namespaces that do not run afoul of the changes in Clojure 1.3.0.

Good to know some parts do work. So far every 3rd party project I've
tried to use with Clojure 1.3.0 that depends on contrib 1.2.0 has
fallen over so I'm not feeling much love for old contrib right now :)
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Sean Corfield
On Tue, Jul 19, 2011 at 5:14 PM, Adam Richardson  wrote:
> the value placed on the last language being
> homoiconic (without much justification)

Yeah, that was definitely a weak point of his talk. I thought there
was a lot of interesting stuff in there tho' and it was entertaining
(which was mostly why I enjoyed it - so many talks, even keynotes, can
be pretty dull even if the information is good :)
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: :require farms in Clojure?

2011-07-19 Thread Chas Emerick
Stu,

Try:

(ns myfuns
   (:require
   (foo.baz [a :as a]
[b :as b]
[c :as c]))

Cheers,

- Chas

On Jul 20, 2011, at 12:36 AM, stu wrote:

> Hi,
> 
> In larger Clojure projects with nested namespaces I've found there are
> less namespace pollution issues if I avoid (ns... :use...) forms in
> preference to (ns... :require...) forms.  This approach sometimes
> leads to namespace constructs like:
> 
> (ns myfuns
>(:require
>[foo.baz.a :as a]
>[foo.baz.b :as b]
>[foo.baz.c :as c...]))
> 
> Is there an idiomatic way of coalescing these :require clauses into
> a :require "farm" that can be simply :require'd or is this the wrong
> way to manage namespaces in Clojure projects?
> 
> Any advice much appreciated,
> 
> Stu
> 
> 
> -- 
> 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 members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


:require farms in Clojure?

2011-07-19 Thread stu
Hi,

In larger Clojure projects with nested namespaces I've found there are
less namespace pollution issues if I avoid (ns... :use...) forms in
preference to (ns... :require...) forms.  This approach sometimes
leads to namespace constructs like:

(ns myfuns
(:require
[foo.baz.a :as a]
[foo.baz.b :as b]
[foo.baz.c :as c...]))

Is there an idiomatic way of coalescing these :require clauses into
a :require "farm" that can be simply :require'd or is this the wrong
way to manage namespaces in Clojure projects?

Any advice much appreciated,

Stu


-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Increasing indent level in pprint

2011-07-19 Thread Tom Faulhaber
Hmmm, looking back at the code, I see that I mis-remembered the fact
that lists and vectors were different. They both (along with maps)
will break rather than fill. Arrays and sets both fill rather than
break.

I'm not sure how much logic there is around this. It just fit my
intuition about how the different structures would be most likely used
when I wrote it. It still seems about right. But if folks think it
should be different, it's easy to change.

On Jul 19, 1:19 pm, Sean Corfield  wrote:
> On Tue, Jul 19, 2011 at 12:03 AM, Tom Faulhaber  
> wrote:
> > Sean's remark is right for writing code, but not really relevant for
> > pretty printed data structures. The pretty printer will either avoid
> > "(foo a" followed by a line break or fill that line full. (By default,
> > for lists it breaks the lines and for vectors it fills them.)
>
> Interesting. I didn't realize it took a different approach.
>
> Out of curiosity, what is the thinking behind the difference between
> lists and vectors?
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View --http://corfield.org/
> World Singles, LLC. --http://worldsingles.com/
> Railo Technologies, Inc. --http://www.getrailo.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread daly
On Tue, 2011-07-19 at 22:27 -0400, Adam Richardson wrote:
> On Tue, Jul 19, 2011 at 9:04 PM, daly 
> wrote:
> 
> On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote:
> > On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt
>  wrote:
> > What's this awk-a-mel he speaks of?  Ocaml,
> pronounced
> > oh-camel, I ...
> >
> >
> > I will confess that as I listened to the presentation (when
> I got the
> > email with Tim's link, I just started the video while I was
> working on
> > some drudgery), I felt like he missed some of the language
> features
> > promoted in functional languages.
> >
> >
> > He worded functional programming contributions in terms of
> advancing
> > the idea of limiting/protecting variable assignment
> (immutability),
> > and to me, that's missing the points of first class
> functions (which,
> > in light of what he says OOP languages brought to the table,
> actually
> > provided protected function pointers through purely
> functional
> > languages without any need for OOP) and an emphasis on
> function purity
> > and limiting the scope of unpure functions (to me, this goes
> beyond
> > merely protecting assignment.)
> >
> >
> > These omissions, coupled with the mispronunciations of
> functional
> > programming language names, and the value placed on the last
> language
> > being homoiconic (without much justification) had me
> wondering how
> > much he actually has used languages such as OCaml or
> Haskell.
> 
> 
> Homoiconic representation is fundamentally important and
> lacking
> in other languages. The programs == data idea is what makes
> the
> macro facility work, allows dynamic program construction,
> compile
> to core, etc. There is a story going around that McCarthy
> attended
> a python talk where they made the claim that python IS a
> lisp-like
> language. John pointed out that if it lacks homoiconicity it
> cannot
> be a lisp. (I probably have the details wrong).
> 
> 
> 
> I tend to take the position that Micheal L. Scott does in his book
> "Programming Language Pragmatics", when he states that:
> 
> 
> Metaprogramming requires, at the least, that we have true
> first-class functions in the strict sense of the term, that
> is, that we be able to generate new functions whose behavior
> is determined dynamically. A homoiconic language can simplify
> metaprogramming [emphasis added] by eliminating the need to
> translate between internal (data structure) and external
> (syntactic) representations of programs or program extensions.
> (p. 563)
> 
> 
> Homoiconic does simplify the process, but I'm not sold it's a
> requirement for productive metaprogramming. For instance, Template
> Haskell is a very powerful, usable tool for integrating
> metaprogramming into programs written in Haskell, a language that is
> not considered homoiconic:
> http://www.haskell.org/haskellwiki/Template_Haskell
> 
> 
> That said, I appreciate the syntax of Clojure and CL very much, but
> there are also times I appreciate the syntax  of non-Lisp languages,
> too :)

Indeed it is ALMOST possible to do some things by referencing the
abstract syntax tree version of Haskell. If the AST version were
the actual language of Haskell you could build the syntactic-sugar
version on top of it. Unfortunately, they started the other way
around.

And, you'll note, the Template Haskell language has various
restrictions (e.g. non-recursive, separate files, etc) that make
it not-quite-first-class Haskell. This is more than a matter of
syntactic elegance. There are things you simply cannot do by 
machine that you can do by hand (well, technically you can but
only with a lot of special case programming).

Eventually you need a Haskell parser you can invoke at 
compile time. One of my AI programs "learned" by doing self
modification at run time. It rewrote itself to optimize the
cases and saved the changes. During execution, the program
gradually shifted until the code I originally wrote no longer
existed. I can't imagine doing that in Haskell or C++ or any
other language except maybe assembler.

A standard example is to write a dumb Rubics cube program that
rewrites itself when it discovers a shorter solution. You can
do this by interpreting a data structure but in lisp, the program
IS the data structure. It is fun to watch the program learn.
It is a shame we don't teach students to do this.

Imagine what Google COULD be if they bothered to unify programs
and data, letting Google learn by

Re: Exception testing with clojure.test

2011-07-19 Thread Jonathan Cardoso
Thank's a lot. That's exactly what I was looking for and didn't realize 
there was a thrown? function in the API =S

Thanks.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: The Last Programming Language

2011-07-19 Thread Adam Richardson
On Tue, Jul 19, 2011 at 9:04 PM, daly  wrote:

> On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote:
> > On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt  wrote:
> > What's this awk-a-mel he speaks of?  Ocaml, pronounced
> > oh-camel, I ...
> >
> >
> > I will confess that as I listened to the presentation (when I got the
> > email with Tim's link, I just started the video while I was working on
> > some drudgery), I felt like he missed some of the language features
> > promoted in functional languages.
> >
> >
> > He worded functional programming contributions in terms of advancing
> > the idea of limiting/protecting variable assignment (immutability),
> > and to me, that's missing the points of first class functions (which,
> > in light of what he says OOP languages brought to the table, actually
> > provided protected function pointers through purely functional
> > languages without any need for OOP) and an emphasis on function purity
> > and limiting the scope of unpure functions (to me, this goes beyond
> > merely protecting assignment.)
> >
> >
> > These omissions, coupled with the mispronunciations of functional
> > programming language names, and the value placed on the last language
> > being homoiconic (without much justification) had me wondering how
> > much he actually has used languages such as OCaml or Haskell.
>
> Homoiconic representation is fundamentally important and lacking
> in other languages. The programs == data idea is what makes the
> macro facility work, allows dynamic program construction, compile
> to core, etc. There is a story going around that McCarthy attended
> a python talk where they made the claim that python IS a lisp-like
> language. John pointed out that if it lacks homoiconicity it cannot
> be a lisp. (I probably have the details wrong).
>
>
I tend to take the position that Micheal L. Scott does in his book
"Programming Language Pragmatics", when he states that:

Metaprogramming requires, at the least, that we have true first-class
> functions in the strict sense of the term, that is, that we be able to
> generate new functions whose behavior is determined dynamically. A
> homoiconic language can simplify metaprogramming [emphasis added] by
> eliminating the need to translate between internal (data structure) and
> external (syntactic) representations of programs or program extensions. (p.
> 563)


Homoiconic does simplify the process, but I'm not sold it's a requirement
for productive metaprogramming. For instance, Template Haskell is a very
powerful, usable tool for integrating metaprogramming into programs written
in Haskell, a language that is not considered homoiconic:
http://www.haskell.org/haskellwiki/Template_Haskell

That said, I appreciate the syntax of Clojure and CL very much, but there
are also times I appreciate the syntax  of non-Lisp languages, too :)

Interesting points.

Adam

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Exception testing with clojure.test

2011-07-19 Thread Brian Marick
On Jul 19, 2011, at 3:48 PM, Jonathan Cardoso wrote:

> Hi guys,
> 
> I want to test some code that throws exceptions, but I don't want exceptions 
> to be thrown in the console. 

jcrit.server=> (use 'midje.sweet)
jcrit.server=> (fact
(f) => (throws NullPointerException))
true

-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Occasional consulting on Agile
www.exampler.com, www.twitter.com/marick

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: leiningen 1.6.1 not compatible with lein-nailgun 1.1.0

2011-07-19 Thread Wei Hsu
Thanks for the tips, Phil! This may be somewhat of a newbie question,
but what's the best way to modify lein-nailgun and include that local
fork in my project using leiningen?

On Jul 17, 9:49 pm, Phil Hagelberg  wrote:
> On Sun, Jul 17, 2011 at 8:37 AM, Phil Hagelberg  wrote:
> > * It starts a background thread without blocking the main thread.
> > (interferes with Leiningen's workaround to this Clojure bug:
> >http://dev.clojure.org/jira/browse/CLJ-124)
>
> I've documented the issue with threading in Leiningen's plugin documentation:
>
> https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md
>
> Anyone writing a plugin that uses threads would do well to read the
> "Threads" section of that document.
>
> -Phil

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread daly
On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote:
> On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt  wrote:
> What's this awk-a-mel he speaks of?  Ocaml, pronounced
> oh-camel, I
> know very well, but I've never heard of this awk-a-mel.  :-)
> 
> Seriously, his pronunciation of "ocaml" highlights, I think,
> the core
> problem of his talk.  There has been significant development
> in
> languages, just not in the popular languages.  It's been over
> there in
> the "fringe" languages.
> 
> 
> I will confess that as I listened to the presentation (when I got the
> email with Tim's link, I just started the video while I was working on
> some drudgery), I felt like he missed some of the language features
> promoted in functional languages. 
> 
> 
> He worded functional programming contributions in terms of advancing
> the idea of limiting/protecting variable assignment (immutability),
> and to me, that's missing the points of first class functions (which,
> in light of what he says OOP languages brought to the table, actually
> provided protected function pointers through purely functional
> languages without any need for OOP) and an emphasis on function purity
> and limiting the scope of unpure functions (to me, this goes beyond
> merely protecting assignment.)
> 
> 
> These omissions, coupled with the mispronunciations of functional
> programming language names, and the value placed on the last language
> being homoiconic (without much justification) had me wondering how
> much he actually has used languages such as OCaml or Haskell.

Homoiconic representation is fundamentally important and lacking
in other languages. The programs == data idea is what makes the
macro facility work, allows dynamic program construction, compile
to core, etc. There is a story going around that McCarthy attended
a python talk where they made the claim that python IS a lisp-like
language. John pointed out that if it lacks homoiconicity it cannot
be a lisp. (I probably have the details wrong).

OCaml came from ML but the ideas came before either one. Lisp supported
functional programming long before either language. I believe the point
Robert was trying to make was that very few languages have increased our
stock of fundamental ideas. OCaml is not one of them.

Indeed languages (like Spad) built on lisp STILL support ideas I have
not seen anywhere else (e.g. dispatching on the return type as well as
the argument types).

Robert suggests that we need to develop a standard language.
Good luck with that.

I participated in the reviews of the X3J13 Common Lisp standard
(behind the scenes by passing on my comments and markups to people who
had the proposal directly). Trying to define a "standard programming
language" would be the ultimate language war. It has been tried several
times before (PL/I included everything and C++0x is trying hard to
include everything).

At best I believe we will muddle along and I will continue to be
rejected during job interviews for working in python 2.7 and not
"knowing" python 3.0. Forty years of lisp programming just makes
me too old to hire for any "real" programming job. Heck, I probably
don't know the difference between OCaml and awk-a-mel so I clearly
cannot program. :-)


> 
> 
> I don't need to know how many digits somebody can recite Pi to, but I
> would like to know how his experience with awk-a-mel lead him to
> believe that functional programming comes down to protecting variable
> assignment :)
> 
> 
> That all said, if Clojure is the seed for the last language, I'd be a
> happy man.

I believe that Robert missed the fundamental point though. It is
NOT just the space of ideas that makes lisp "the right language". 
Another key reason is "impedance matching". (An impedance mismatch 
is when you hook a soda straw to a firehose).

Programs exist to bridge the gap between the idea domain and the
machine domain. Some languages are close to the machine, like assembler,
so you have to "carry your idea" all the way to the machine. Some
languages are close to the problem (e.g. Mathematica) but the compiler
has to cross the gap to the machine. This is where the ability to
create domain-specific languages in the same syntax matters.

Lisp is the only language I know that allows you to work across the
whole spectrum in a single language. It is possible to say
   (integrate (car x))
which takes the 0 displacement off the x pointer (machine) and then
does a mathematical integration routine (problem) and does it all with
the same syntax and semantics.

I wouldn't worry that we will stop creating new languages.
We have yet to explore the space of unicode replacements for the
semi-colon (although Fortress is starting). Kanji semi-colons.
I can't wait!

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@googlegroups.c

Re: The Last Programming Language

2011-07-19 Thread Adam Richardson
On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt  wrote:

> What's this awk-a-mel he speaks of?  Ocaml, pronounced oh-camel, I
> know very well, but I've never heard of this awk-a-mel.  :-)
>
> Seriously, his pronunciation of "ocaml" highlights, I think, the core
> problem of his talk.  There has been significant development in
> languages, just not in the popular languages.  It's been over there in
> the "fringe" languages.


I will confess that as I listened to the presentation (when I got the email
with Tim's link, I just started the video while I was working on some
drudgery), I felt like he missed some of the language features promoted in
functional languages.

He worded functional programming contributions in terms of advancing the
idea of limiting/protecting variable assignment (immutability), and to me,
that's missing the points of first class functions (which, in light of what
he says OOP languages brought to the table, actually provided protected
function pointers through purely functional languages without any need for
OOP) and an emphasis on function purity and limiting the scope of unpure
functions (to me, this goes beyond merely protecting assignment.)

These omissions, coupled with the mispronunciations of functional
programming language names, and the value placed on the last language being
homoiconic (without much justification) had me wondering how much he
actually has used languages such as OCaml or Haskell.

I don't need to know how many digits somebody can recite Pi to, but I would
like to know how his experience with awk-a-mel lead him to believe that
functional programming comes down to protecting variable assignment :)

That all said, if Clojure is the seed for the last language, I'd be a happy
man.

Adam

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Error running Clojure 1.3 in Eclipse

2011-07-19 Thread Chas Emerick

On Jul 19, 2011, at 4:24 PM, Sean Corfield wrote:

> On Tue, Jul 19, 2011 at 10:08 AM, ron peterson
>  wrote:
>> In the project.clj I made a mistake, it should be
>> 
>> (defproject Test "1.0.0-SNAPSHOT"
>>  :dependencies [[org.clojure/clojure "1.3.0-beta1"]
>> [org.clojure/clojure-contrib "1.2.0"]
> 
> I'm pretty sure you can't use contrib 1.2.0 with Clojure 1.3.0...

Depends on what you're using out of contrib 1.2.0.  There are a number of 
namespaces that do not run afoul of the changes in Clojure 1.3.0.

- Chas

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread daly
It is an object extension to the AWK programming language :-)

On Tue, 2011-07-19 at 19:31 -0400, Adam Richardson wrote:
> On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt  wrote:
> What's this awk-a-mel he speaks of?  Ocaml, pronounced
> oh-camel, I
> know very well, but I've never heard of this awk-a-mel.  :-)
> 
> Seriously, his pronunciation of "ocaml" highlights, I think,
> the core
> problem of his talk.  There has been significant development
> in
> languages, just not in the popular languages.  It's been over
> there in
> the "fringe" languages.
> 
> 
> 
> 
> 
> You'd think the camel icon on the official website would give it
> away :)
> 
> 
> Adam
> 
> -- 
> 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 members are moderated - please be patient
> with your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en


-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Adam Richardson
On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt  wrote:

> What's this awk-a-mel he speaks of?  Ocaml, pronounced oh-camel, I
> know very well, but I've never heard of this awk-a-mel.  :-)
>
> Seriously, his pronunciation of "ocaml" highlights, I think, the core
> problem of his talk.  There has been significant development in
> languages, just not in the popular languages.  It's been over there in
> the "fringe" languages.
>
>

You'd think the camel icon on the official website would give it away :)

Adam

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: The Last Programming Language

2011-07-19 Thread Alan Malloy
On Jul 19, 3:23 pm, Brian Hurt  wrote:
> What's this awk-a-mel he speaks of?  Ocaml, pronounced oh-camel, I
> know very well, but I've never heard of this awk-a-mel.  :-)
>
> Seriously, his pronunciation of "ocaml" highlights, I think, the core
> problem of his talk.  There has been significant development in
> languages, just not in the popular languages.  It's been over there in
> the "fringe" languages.

Well, that's good to know. I noticed he mispronounced a lot of stuff,
and I *thought* his pronunciation of ocaml was wrong, but I was left
with some uncertainty since I wasn't that confident to begin with.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Brian Hurt
What's this awk-a-mel he speaks of?  Ocaml, pronounced oh-camel, I
know very well, but I've never heard of this awk-a-mel.  :-)

Seriously, his pronunciation of "ocaml" highlights, I think, the core
problem of his talk.  There has been significant development in
languages, just not in the popular languages.  It's been over there in
the "fringe" languages.

On Tue, Jul 19, 2011 at 4:23 PM, Sean Corfield  wrote:
> On Tue, Jul 19, 2011 at 4:50 AM, Ken Wesson  wrote:
>> What video? The only video I see linked from there is over an hour
>> long. Obviously you can't mean that one, since no one around here has
>> that kind of spare time at this hour on a Tuesday. :)
>
> Yes, an hour. It's an excellent talk. There's a higher quality video
> of his NDC talk on this topic (same conclusion, different anecdotes)
> but that needs to be downloaded and then skip the first five minutes
> as they had the camera running before the talk started:
>
> http://ndc2011.no/agenda.aspx?cat=1071&id=-1&day=3726
>
> Ken, you might be surprised what an hour's investment will bring :)
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
> Railo Technologies, Inc. -- http://www.getrailo.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> 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 members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Alan Malloy
On Jul 19, 1:23 pm, Sean Corfield  wrote:
> On Tue, Jul 19, 2011 at 4:50 AM, Ken Wesson  wrote:
> > What video? The only video I see linked from there is over an hour
> > long. Obviously you can't mean that one, since no one around here has
> > that kind of spare time at this hour on a Tuesday. :)
>
> Yes, an hour. It's an excellent talk. There's a higher quality video
> of his NDC talk on this topic (same conclusion, different anecdotes)
> but that needs to be downloaded and then skip the first five minutes
> as they had the camera running before the talk started:
>
> http://ndc2011.no/agenda.aspx?cat=1071&id=-1&day=3726
>
> Ken, you might be surprised what an hour's investment will bring :)

I confess that I turned this on for an hour this morning, and don't
really think it was worth the time. I would sum it up for Ken as:

Wouldn't interoperation be great if we all used the same language,
like mathematicians do? Such a language would have to be really good,
with features XYZ [no particular motivation for why all these features
are good]. I can't think of any other features we could possibly want,
either, because we seem to have already had all the interesting ideas
in language design. Look, Clojure has all of these features! It might
be a good start towards language standardization.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Exception testing with clojure.test

2011-07-19 Thread Sam Ritchie
Yup, this should do the trick:

(defn only-odds
  [x]
  {:pre [(odd? x)]}
  x)

(deftest only-odds-test
(is (thrown? AssertionError (only-odds 2)))
(is (= 1 (only-odds 1

On Tue, Jul 19, 2011 at 4:48 PM, Jonathan Cardoso
wrote:

> Hi guys,
>
> I want to test some code that throws exceptions, but I don't want
> exceptions to be thrown in the console.
>
> Is there a way to do that with *is* function?
> What is the best way to test my code with try-catch blocks?
>
> --
> 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 members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Exception testing with clojure.test

2011-07-19 Thread Jonathan Cardoso
Hi guys,

I want to test some code that throws exceptions, but I don't want exceptions 
to be thrown in the console. 

Is there a way to do that with *is* function?
What is the best way to test my code with try-catch blocks?

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Error running Clojure 1.3 in Eclipse

2011-07-19 Thread Sean Corfield
On Tue, Jul 19, 2011 at 10:08 AM, ron peterson
 wrote:
> In the project.clj I made a mistake, it should be
>
> (defproject Test "1.0.0-SNAPSHOT"
>  :dependencies [[org.clojure/clojure "1.3.0-beta1"]
>                 [org.clojure/clojure-contrib "1.2.0"]

I'm pretty sure you can't use contrib 1.2.0 with Clojure 1.3.0...
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Sean Corfield
On Tue, Jul 19, 2011 at 4:50 AM, Ken Wesson  wrote:
> What video? The only video I see linked from there is over an hour
> long. Obviously you can't mean that one, since no one around here has
> that kind of spare time at this hour on a Tuesday. :)

Yes, an hour. It's an excellent talk. There's a higher quality video
of his NDC talk on this topic (same conclusion, different anecdotes)
but that needs to be downloaded and then skip the first five minutes
as they had the camera running before the talk started:

http://ndc2011.no/agenda.aspx?cat=1071&id=-1&day=3726

Ken, you might be surprised what an hour's investment will bring :)
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Increasing indent level in pprint

2011-07-19 Thread Sean Corfield
On Tue, Jul 19, 2011 at 12:03 AM, Tom Faulhaber  wrote:
> Sean's remark is right for writing code, but not really relevant for
> pretty printed data structures. The pretty printer will either avoid
> "(foo a" followed by a line break or fill that line full. (By default,
> for lists it breaks the lines and for vectors it fills them.)

Interesting. I didn't realize it took a different approach.

Out of curiosity, what is the thinking behind the difference between
lists and vectors?
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


[ANN] clojure.java.jdbc 0.0.5 available

2011-07-19 Thread Sean Corfield
Changes in 0.0.5:

* Add prepare-statement function to ease creation of PreparedStatement
with common options:
  - see docstring for details
* with-query-results now allows the SQL/params vector to be:
  - a PreparedStatement object, followed by any parameters the SQL needs
  - a SQL query string, followed by any parameters it needs
  - options (for prepareStatement), a SQL query string, followed by
any parameters it needs
* Add support for databases that cannot return generated keys (e.g., HSQLDB)
  - insert operations silently return the insert counts instead of
generated keys
  - it is the user's responsibility to handle this if you're using
such a database!

Changes in 0.0.4:

* Fix JDBC-2 by allowing :table-spec {string} at the end of
create-table arguments:
  (sql/create-table :foo [:col1 "int"] ["col2" :int] :table-spec
"ENGINE=MyISAM")
* Fix JDBC-8 by removing all reflection warnings
* Fix JDBC-11 by no longer committing the transaction when an Error occurs
* Clean up as-... functions to reduce use of (binding)
* Refactor do-prepared*, separating out return keys logic and
parameter setting logic
  - in preparation for exposing more hooks in PreparedStatement
creation / manipulation

Changes in 0.0.3:

* Fix JDBC-10 by using .executeUpdate when generating keys (MS SQL
Server, PostgreSQL compatibility issue)

Changes in 0.0.2:

* Fix JDBC-7 Clojure 1.2 compatibility (thanx to Aaron Bedra!)

Changes in 0.0.1 (compared to clojure.contrib.sql):

* Exposed print-... functions for exception printing; no longer writes
exceptions to *out*
* Add clojure.java.jdbc/resultset-seq (to replace
clojure.core/resultset-seq which should be deprecated)
* Add support for naming and quoting strategies - see
http://clojure.github.com/java.jdbc/doc/clojure/java/jdbc/NameMapping.html
  - The formatting is a bit borked, Tom F knows about this and is
working on an enhancement to auto-doc to improve it
* Add ability to return generated keys from single insert operations,
add insert-record function
* Clojure 1.3 compatibility
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Excellent intro to core.logic

2011-07-19 Thread David Nolen
On Tue, Jul 19, 2011 at 3:31 PM, Tassilo Horn wrote:

> David Nolen  writes:
>
> Hi David,
>
> > I highly recommend checking this out if you're curious about
> > core.logic, https://github.com/frenchy64/Logic-Starter/wiki
>
> I've just read it, and I think I've grasped most of it although my last
> prolog encounter is quite some time back.  But how am I supposed to go
> from here?  I mean, there's no single function or macro in core.logic
> that has at least a docstring!?!
>

Ambrose has submitted a patch which I need to go over. Even so, I don't
think docstrings are going to help you that much. If you want to dig in I
recommend reading:

- The Reasoned Schemer

When it comes to logic programming it does help to have a basic understand
of the execution model.

- William Byrd's thesis on miniKanren,
https://scholarworks.iu.edu/dspace/handle/2022/8777

At this point you'll still be at loss as far as practical applications - for
that you need to look at some Prolog literature:

- Bratko's Prolog Programming for Artificial Intelligence
- Sterling & Shapiro's Art of Prolog

Attempting to compete with the existing high-quality literature is a
non-goal for me at least.

I admit that diving into core.logic is a bit of an adventure at this point
(though I'd like to think a very rewarding one). As more people give it a
shot I hope others will weigh in with wonderful tutorial/guides such as
Ambrose's.

David

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Result of translation of fnparse library

2011-07-19 Thread vdim
Hi, all.
I try to use fnparse library for creating translator which is built on
parser-combinators and I have question: what is the correct approach
to  keep intermediate result of translation? Can I use for this
purpose state object?
For example, see code [1] for parsing simple arithmetical expression
where intermediate computation of expression saving in :result field
of state object.
Thank you.

[1] https://github.com/vdim/clj-probe/blob/master/src/name/vdim/expr.clj
(any critics and ideas for this code are welcome).

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Excellent intro to core.logic

2011-07-19 Thread Tassilo Horn
David Nolen  writes:

Hi David,

> I highly recommend checking this out if you're curious about
> core.logic, https://github.com/frenchy64/Logic-Starter/wiki

I've just read it, and I think I've grasped most of it although my last
prolog encounter is quite some time back.  But how am I supposed to go
from here?  I mean, there's no single function or macro in core.logic
that has at least a docstring!?!

Bye,
Tassilo, who's going to check if his university's library has a reasoned
schemer copy...

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Books

2011-07-19 Thread Abbas
Clojure in Action seems to be a great start if you have some
experience with Java.

On Jul 18, 10:59 am, Teena Mathew  wrote:
> Hey!
>
> Which are the recommended books for Clojure newbie?
>
> Thanks!
> Teena

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Aw: Re: Clojure Books

2011-07-19 Thread finbeu
- Practical Clojure (APress) is an excellent reference book. I use it all 
the time + the clojure cheat sheet.

- Programming Clojure is good to start with, but I really didn't like all 
the Lancet stuff that was included as example. 

- Joy of clojure: Great. But not easy (was my third book). 

-Finn

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Lars Nilsson
On Mon, Jul 18, 2011 at 5:14 PM, abp  wrote:
> Why is it necessary to press TAB at all? Couldn't auto-indent be the
> default for a line and only manually reindented lines opt-out until
> one opts in again using TAB or something?

If I add an expression around existing code, I tend to use TAB if
small regions are used to reindent the affected line(s) that are
suddenly contained within a new expression and as a result should be
reindented as if I had originally typed the entire expression. If for
some reason larger blocks of code are affected, I would likely use the
region/file reindent functionality in Emacs. In other words, I usually
use TAB for lines that were written earlier, to align it better with
new code, not to affect indentation of the line I'm currently typing.

Lars Nilsson

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Books

2011-07-19 Thread octopusgrabbus


On Jul 19, 1:06 am, Sean Corfield  wrote:
> On Mon, Jul 18, 2011 at 8:01 PM, Felix Filozov  wrote:
> > Clojure in Action - http://www.manning.com/rathore/

And there is also an upcoming web course based on this book.
http://codelesson.com/courses/view/introduction-to-clojure
>
> Targeting Clojure 1.2.0. Nice introduction, good, practical examples.
>
> > Programming Clojure - http://pragprog.com/book/shcloj/programming-clojure
>
> Aaron Bedra et al are working on a new edition of this, bringing it up
> to Clojure 1.3.0. The original targets Clojure 1.1 (I think? Or 1.0?).
> I don't have this book.
>
> > Practical Clojure - http://www.apress.com/9781430272311
>
> Targeting Clojure 1.2.0. I don't have this book.
>
> > Joy of Clojure (not for beginners) - http://joyofclojure.com/
>
> Not for beginners but an excellent "why" book! I love this book - I
> keep re-reading it.
>
> Also:
>
> Clojure Programming -http://oreilly.com/catalog/0636920013754
>
> Currently in Rough Cuts. Targeting Clojure 1.3.0. Really enjoying this too.
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View --http://corfield.org/
> World Singles, LLC. --http://worldsingles.com/
> Railo Technologies, Inc. --http://www.getrailo.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Books

2011-07-19 Thread Jeremy Heiler
On Tue, Jul 19, 2011 at 9:19 AM, Foge  wrote:
> I'm currently reading Joy of Clojure and I definitely like it.
>

+1 for the Joy of Clojure. I am really enjoying reading it. It's a
book that assumes you know what you're doing, which is very much
welcomed.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Result of translation of fnparse library

2011-07-19 Thread Vyacheslav Dimitrov
Hi, all.
I try to use fnparse library for creating translator which is built on
parser-combinators and I have question: what is the correct approach to
 keep intermediate result of translation? Can I use for this purpose state
object?
For example, see code [1] for parsing simple arithmetical expression where
intermediate computation of expression saving in :result field of state
object.
Thank you.

[1] https://github.com/vdim/clj-probe/blob/master/src/name/vdim/expr.clj (any
critics and ideas for this code are welcome.)

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: (count-all str1 str2)

2011-07-19 Thread Tuba Lambanog
That works well. Thank you very much!
Tuba

On Jul 19, 1:47 am, Meikel Brandmeyer  wrote:
> Hi,
>
> how about this: (count (filter (set "abc") "abracadabra"))?
>
> Sincerely
> Meikel

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Error running Clojure 1.3 in Eclipse

2011-07-19 Thread ron peterson
In the project.clj I made a mistake, it should be

(defproject Test "1.0.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.3.0-beta1"]
 [org.clojure/clojure-contrib "1.2.0"]
  :dev-dependencies [[lein-eclipse "1.0.0"]]
  )

I've tried with the standalone contrib and any other variations but it
didn't seem to download from the repository.
On Jul 18, 5:25 pm, Sean Corfield  wrote:
> The stack trace shows:
>
> Caused by: java.lang.UnsupportedOperationException: Cannot recur
> across try
>        at clojure.lang.Compiler$RecurExpr$Parser.parse(Compiler.java:6045)
>
> This looks like an incompatibility between your code (or something
> you're using) and Clojure 1.3.0. You can't have recur inside try - 
> seehttp://dev.clojure.org/jira/browse/CLJ-31- sounds like it was allowed
> in 1.2 but didn't work properly so now it's been disallowed?
>
> I notice that your project file refers to old contrib 1.2.0 - that
> won't run on Clojure 1.3.0 as far as I can tell (I had to update
> CongoMongo because of 1.3.0 compatibility problems that seemed to stem
> from contrib 1.2.0). You might try:
>
> [org.clojure.contrib/standalone "1.3.0-SNAPSHOT"]
>
> instead but at this point you might need to start looking at the new
> contrib libraries and migrating to those:
>
> http://dev.clojure.org/display/design/Contrib+Library+Names
>
> HTH,
> Sean
>
>
>
> On Mon, Jul 18, 2011 at 4:01 PM, ron peterson  
> wrote:
> > I've upgraded my projects in Eclipse 3.7  to use Clojure 1.3 beta1
> > release, however when I try running it in Eclipse the REPL console
> > throws the following exception. Other versions of Clojure 1.3 alpha
> > gave the same exception: (but clojure 1.2.1 works fine)
>
> ...
> > Exception in thread "main" java.lang.UnsupportedOperationException:
> > Cannot recur across try, compiling:(clojure/tools/nrepl.clj:107)
> ...
> > Caused by: java.lang.UnsupportedOperationException: Cannot recur
> > across try

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Arthur Edelstein
Hi Dave,

> Cool project, especially if it manages to *stay* lightweight :)

Thanks -- I hope it will! :)

> * You might want to take a look at JSyntaxPane
> (https://code.google.com/p/jsyntaxpane/) for the editor. In theory
> adding Clojure syntax highlighting should be straightforward and they
> already cover stuff like line numbers, etc.

An interesting suggestion.

> * Consider using actions for your menu items so you can reuse them in
> toolbars and elsewhere in the UI

Yes, I probably need to overhaul this at some point.

> * getCaretPosition (and almost all Swing methods) is not thread-safe
> so calling it from an agent is asking for trouble :)

Oops! It's interesting I haven't run into an error yet. Added to
github issues.

> Good luck!

Thanks! :)

Arthur

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Arthur Edelstein
> FWIW I just double-clicked on the clooj jar and it launched like any other 
> application -- I didn't have to know that it was a jar or even what a jar is. 
> Assuming that this also works on other OSes (I'm using Mac OS X) then I think 
> this is already beginner friendly. I *think* it also includes everything that 
> a newbie needs for a complete workflow without any other tools or Terminal 
> interactions...

Perhaps the main thing that's missing (besides various code-editing
features) is an option for compiling and building the project. I'm
thinking about bundling in leiningen for that. But if anyone has a
better idea, do let me know. :)

- Arthur

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Books

2011-07-19 Thread Vincent
The Blackstag Blog Post # 5 -> Guide to Programming in Clojure for 
Beginners


-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Books

2011-07-19 Thread daly
Depending on what you want to know about lisp I would recommend:

Learning lisp: Practical Common Lisp

  This is an excellent text for people who are Java programmers.

Really learning lisp: Let Over Lambda

  This will give you ways to think about Lambda as the 
  fundamental mechanism. Let is just Lambda binding.
  Let over Lambda gives shared local variable scope.
  Lambda over Let over Lambda gives objects, etc.

Really, really learning lisp: Lisp In Small Pieces

  This literate document walks you through the real
  internals of a lisp system using the actual executable
  code of the interpreter and compiler. The beauty of this
  book is that you can read the source code like a novel.

Learning Clojure: Clojure in Small Pieces

  Ok, this is my attempt to mimic Lisp In Small Pieces
  for Clojure. It would be great if people would contribute
  chapters for understanding the internals of Clojure. We
  would then have a book that could be read like a novel 
  which would allow people to fully understand Clojure.

  The CISP book includes a complete Clojure source code
  distribution. By following the instructions you can
  automatically generate a running Clojure REPL and a
  PDF containing the explanation (such as it is so far).
  http://daly.literatesoftware.com/clojure.pdf (pdf doc)
  http://daly.literatesoftware.com/clojure.pamphlet (pdf source)

Tim Daly
  

On Tue, 2011-07-19 at 08:28 -0700, CuppoJava wrote:
> Let Over Lambda is more a collection of advanced and narrow tricks
> that a experienced Lisper would find interesting (and maybe useful).
> It assumes you know the good practices already, and then proceeds to
> break them for awe and effect. I would not suggest it to a newcomer.
>   -Patrick
> 
> On Jul 19, 9:19 am, Foge  wrote:
> > I'm currently reading Joy of Clojure and I definitely like it.
> >
> > What do folks think about Let Over Lambda by Doug Hoyte? I realize
> > that it focuses on Lisp, but will it have any useful information for
> > Clojure programmers?
> >
> > Thanks,
> > Kevin
> 


-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread gaz jones
this made me lol :D
a big will smith fan??? not that i know you at all other than reading
your posts here, but i really didnt see that coming...

On Tue, Jul 19, 2011 at 9:11 AM, Ken Wesson  wrote:
> An hour of Will Smith blasting aliens "flies by". An hour of a talking
> head is better presented as text.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Books

2011-07-19 Thread Jeff Heon
There is also this nice online introduction for absolute beginners to
Clojure and Lisp:

Guide to Programming in Clojure for Beginners
http://blackstag.com/blog.posting?id=5

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Books

2011-07-19 Thread CuppoJava
Let Over Lambda is more a collection of advanced and narrow tricks
that a experienced Lisper would find interesting (and maybe useful).
It assumes you know the good practices already, and then proceeds to
break them for awe and effect. I would not suggest it to a newcomer.
  -Patrick

On Jul 19, 9:19 am, Foge  wrote:
> I'm currently reading Joy of Clojure and I definitely like it.
>
> What do folks think about Let Over Lambda by Doug Hoyte? I realize
> that it focuses on Lisp, but will it have any useful information for
> Clojure programmers?
>
> Thanks,
> Kevin

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Books

2011-07-19 Thread Foge
I'm currently reading Joy of Clojure and I definitely like it.

What do folks think about Let Over Lambda by Doug Hoyte? I realize
that it focuses on Lisp, but will it have any useful information for
Clojure programmers?

Thanks,
Kevin

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Namespace Docstrings?

2011-07-19 Thread OGINO Masanori
I search on JIRA, but as far as I know there is no issue discussed in
this thread.
Is it an issue that (resolve 'clojure.core) throws an exception?

Thanks.

-- 
Name:  OGINO Masanori (荻野 雅紀)
E-mail: masanori.og...@gmail.com

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Colin Yates
Quite - you don't get the "ants in your pants" vibe from plain text :)

On 19 July 2011 15:18, Ben Smith-Mannschott  wrote:

> On Tue, Jul 19, 2011 at 16:11, Ken Wesson  wrote:
> > On Tue, Jul 19, 2011 at 10:05 AM, Colin Yates 
> wrote:
> >> I find his videos very easy to watch - I think it was around a hour, but
> the
> >> time flies by.
> >
> > An hour of Will Smith blasting aliens "flies by". An hour of a talking
> > head is better presented as text. An hour of talking head + slides is
> > better presented as text + inline images. Particularly since text is
> > searchable and video, for the foreseeable future, is not. :)
>
> True enough, though I should hasten to point out that Uncle Bob is an
> unusually entertaining "talking head".
>
> // ben
>
> --
> 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 members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: The Last Programming Language

2011-07-19 Thread Ben Smith-Mannschott
On Tue, Jul 19, 2011 at 16:11, Ken Wesson  wrote:
> On Tue, Jul 19, 2011 at 10:05 AM, Colin Yates  wrote:
>> I find his videos very easy to watch - I think it was around a hour, but the
>> time flies by.
>
> An hour of Will Smith blasting aliens "flies by". An hour of a talking
> head is better presented as text. An hour of talking head + slides is
> better presented as text + inline images. Particularly since text is
> searchable and video, for the foreseeable future, is not. :)

True enough, though I should hasten to point out that Uncle Bob is an
unusually entertaining "talking head".

// ben

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Ken Wesson
On Tue, Jul 19, 2011 at 10:05 AM, Colin Yates  wrote:
> I find his videos very easy to watch - I think it was around a hour, but the
> time flies by.

An hour of Will Smith blasting aliens "flies by". An hour of a talking
head is better presented as text. An hour of talking head + slides is
better presented as text + inline images. Particularly since text is
searchable and video, for the foreseeable future, is not. :)

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Colin Yates
I find his videos very easy to watch - I think it was around a hour, but the
time flies by.

On 19 July 2011 14:16, Ken Wesson  wrote:

> On Tue, Jul 19, 2011 at 6:00 AM, Adam Richardson 
> wrote:
> > Watch the video and you'll see the comment Tim is referencing.
>
> Are you aware of the length of that video?
>
> --
> Protege: What is this seething mass of parentheses?!
> Master: Your father's Lisp REPL. This is the language of a true
> hacker. Not as clumsy or random as C++; a language for a more
> civilized age.
>
> --
> 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 members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Excellent intro to core.logic

2011-07-19 Thread David Nolen
On Tue, Jul 19, 2011 at 2:27 AM, Meikel Brandmeyer  wrote:

> Hi Ambrose,
>
>  I haven't been exposed to logic programming besides the examples David
> posted to the list. I found your tutorial very easy to follow and to read. I
> have two minor nit-picks.
>
>
>1. I understand, that these o, e and some third, I think, suffixes are
>there historically. And for someone not used to logic programming they are
>as counter-intuitive as it can get: o == relati*o*n? o.O WTF. Maybe you
>can motivate a little why they are called like that historically? I
>personally need such explanations in case of such (on first sight) 
> unrelated
>things.
>
> Perhaps one reason is that miniKanren allows the programmer to mix both
functional and relational programming together. Relational counterparts need
to be distinguished from their functional ones - cons vs. conso. Functions
have sensible return values - goals do not outside of the run interface. My
guess is that o stands for output - inputs and outputs are simply whatever
arguments a goal takes. But still, I admit, it is largely for historical
reasons.

However I'm a bit conservative on this point since the existing body of
miniKanren literature follows this convention. As core.logic evolves and
usage increases I'm sure new conventions will arise.

>
>1. After going through some more or less easy to follow and to
>understand examples, you dive into the interesting stuff: the definition of
>typedo - and loose me completely with c, e, t, k, m, v, s and ?r. I
>understand that c probably means context, e expression and t type. But
>trying to keep the meaning of exists, matche, geto and other funny names
>with strange suffixes in the cache *and* coping with one character
>locals is - at least for me - a bit much.
>
> Good point.

David

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: The Last Programming Language

2011-07-19 Thread Ken Wesson
On Tue, Jul 19, 2011 at 6:00 AM, Adam Richardson  wrote:
> Watch the video and you'll see the comment Tim is referencing.

Are you aware of the length of that video?

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: following Rich's talk at NYC Clojure this Wednesday

2011-07-19 Thread Stuart Halloway
The website claims that the talk starts at 6:45 pm EDT, but I suspect that the 
technical content actually starts at 7:00.

Stu

> awesome!! looking forward to the talk.. like everybody else, I think it will 
> be great to have the time and time-zone info posted.. 
> 
> Sunil.
> 
> On Mon, Jul 18, 2011 at 9:28 PM, Stuart Halloway  
> wrote:
> Several people have asked about access to Rich's upcoming talk this Wednesday 
> night [1]. In order to make information available for those who are not 
> present in NYC, we are planning to do the following:
> 
> During the talk:
> 
> * We will be live streaming the talk at [2]. This is our first time live 
> streaming from the facility, so cross your fingers.
> 
> * We will be covering the talk live in the Clojure IRC.
> 
> After the talk:
> 
> * Video will be posted online. Once the editing is complete, I will post a 
> link here with details.
> 
> * The slides will be posted online. 
> 
> Cheers,
> Stu
> 
> [1] http://www.meetup.com/Clojure-NYC/events/16166953/
> [2] http://www.ustream.tv/channel/clojurenyc
> 
> -- 
> 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 members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> 
> 
> -- 
> 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 members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Dave Ray
Cool project, especially if it manages to *stay* lightweight :)

It is indeed difficult to build a console with Swing's text
components. Actually, I think it's difficult with the out-of-the-box
text components in just about any toolkit. They're not designed for it
and there are a ton of edge cases and gotchas to take care of.

Anyway, a couple other random thoughts:

* You might want to take a look at JSyntaxPane
(https://code.google.com/p/jsyntaxpane/) for the editor. In theory
adding Clojure syntax highlighting should be straightforward and they
already cover stuff like line numbers, etc.

* Consider using actions for your menu items so you can reuse them in
toolbars and elsewhere in the UI

* getCaretPosition (and almost all Swing methods) is not thread-safe
so calling it from an agent is asking for trouble :)

Good luck!

Dave

On Tue, Jul 19, 2011 at 7:20 AM, Alessio Stalla  wrote:
> On 18 Lug, 18:40, Arthur Edelstein  wrote:
>> Hi Tamreen,
>>
>> On Jul 18, 5:38 am, Tamreen Khan  wrote:
>>
>> > It's a little confusing to see what's normally the text for the prompt,
>> > "user=>", be in the window that shows the result. Why can't both the prompt
>> > and the results be shown in the same area?
>>
>> That is a good point. I wanted a multi-line editor for the REPL input,
>> so I put the REPL input and output in separate panes. But I agree it
>> would be nice to have the prompt in the REPL input pane. I'm adding
>> this suggestion to the issues. Thanks for the feedback!
>
> FWIW, I solved a similar problem in the past with a GUI REPL for
> another JVM-based Lisp (ABCL). Unfortunately Swing makes such a thing
> harder than it should be, at least if you stick to the "right" way of
> properly using the Document interface upon which JTextArea is based.
> Perhaps you can leverage some of that work. That REPL is very minimal
> and I took some shortcuts, but it could be a nice starting point,
> especially wrt. the nasty concurrency issues imposed by how Document
> works. It was tested on all the three major OSes. If you're
> interested, you can find it here:
> http://trac.common-lisp.net/armedbear/browser/trunk/abcl/src/org/armedbear/lisp/java/swing/REPLConsole.java
>
> hth,
> Alessio
>
> --
> 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 members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Adam Richardson
On Tue, Jul 19, 2011 at 4:52 AM, Ken Wesson  wrote:

> On Mon, Jul 18, 2011 at 1:36 PM, TimDaly  wrote:
> > Robert Martin argues that Clojure could be the seed of the last
> > programming language.
> >
> > http://skillsmatter.com/podcast/agile-testing/bobs-last-language
>
> I don't see how that claim can be drawn from the textual content on
> that page. He mentions Clojure exactly once, not as a candidate "last
> programming language" but merely as an example, among several, of
> languages that seem to be rediscovering the past (i.e. long-underused
> language families like the Lisps, MLs, etc.). If he's arguing that
> Clojure, specifically, could be it, modulo incremental refinements,
> it's not in the text on the page you linked to.
>
>
Watch the video and you'll see the comment Tim is referencing.

Adam

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: The Last Programming Language

2011-07-19 Thread craig worrall

Maybe. Or maybe Martin's talk should be entitled
"The Last Programming Language To Get Any Mind-Share".

On Jul 19, 3:42 am, Steven Tomcavage  wrote:
> I double we'll ever see The Last Programming Language, because we're
> all hackers and we all have a notion that things could be done better
> if we just tweaked this or that a bit, and voila, you have a new
> programming language.
>
> On Mon, Jul 18, 2011 at 1:36 PM, TimDaly  wrote:
> > 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@googlegroups.com
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread daly
tl;dw & spoiler alert:
The trailing conclusion of the video is that Clojure 
could be the seed of the last programming language.

The video reprises Gabriel's paper of the same title.

Bob Martin reminds me of James Martin from the 70s,
for those of us old enough to remember him. I wonder
if they are related.

Tim

On Tue, 2011-07-19 at 07:50 -0400, Ken Wesson wrote:
> On Tue, Jul 19, 2011 at 6:54 AM, daly  wrote:
> > Watch the video.
> 
> What video? The only video I see linked from there is over an hour
> long. Obviously you can't mean that one, since no one around here has
> that kind of spare time at this hour on a Tuesday. :)
> 
> -- 
> Protege: What is this seething mass of parentheses?!
> Master: Your father's Lisp REPL. This is the language of a true
> hacker. Not as clumsy or random as C++; a language for a more
> civilized age.
> 


-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Ken Wesson
On Tue, Jul 19, 2011 at 6:54 AM, daly  wrote:
> Watch the video.

What video? The only video I see linked from there is over an hour
long. Obviously you can't mean that one, since no one around here has
that kind of spare time at this hour on a Tuesday. :)

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Alessio Stalla
On 18 Lug, 18:40, Arthur Edelstein  wrote:
> Hi Tamreen,
>
> On Jul 18, 5:38 am, Tamreen Khan  wrote:
>
> > It's a little confusing to see what's normally the text for the prompt,
> > "user=>", be in the window that shows the result. Why can't both the prompt
> > and the results be shown in the same area?
>
> That is a good point. I wanted a multi-line editor for the REPL input,
> so I put the REPL input and output in separate panes. But I agree it
> would be nice to have the prompt in the REPL input pane. I'm adding
> this suggestion to the issues. Thanks for the feedback!

FWIW, I solved a similar problem in the past with a GUI REPL for
another JVM-based Lisp (ABCL). Unfortunately Swing makes such a thing
harder than it should be, at least if you stick to the "right" way of
properly using the Document interface upon which JTextArea is based.
Perhaps you can leverage some of that work. That REPL is very minimal
and I took some shortcuts, but it could be a nice starting point,
especially wrt. the nasty concurrency issues imposed by how Document
works. It was tested on all the three major OSes. If you're
interested, you can find it here:
http://trac.common-lisp.net/armedbear/browser/trunk/abcl/src/org/armedbear/lisp/java/swing/REPLConsole.java

hth,
Alessio

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread daly
Watch the video.

On Tue, 2011-07-19 at 04:52 -0400, Ken Wesson wrote:
> On Mon, Jul 18, 2011 at 1:36 PM, TimDaly  wrote:
> > Robert Martin argues that Clojure could be the seed of the last
> > programming language.
> >
> > http://skillsmatter.com/podcast/agile-testing/bobs-last-language
> 
> I don't see how that claim can be drawn from the textual content on
> that page. He mentions Clojure exactly once, not as a candidate "last
> programming language" but merely as an example, among several, of
> languages that seem to be rediscovering the past (i.e. long-underused
> language families like the Lisps, MLs, etc.). If he's arguing that
> Clojure, specifically, could be it, modulo incremental refinements,
> it's not in the text on the page you linked to.
> 
> -- 
> Protege: What is this seething mass of parentheses?!
> Master: Your father's Lisp REPL. This is the language of a true
> hacker. Not as clumsy or random as C++; a language for a more
> civilized age.
> 


-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Vincent
nice name ! thanks again for  new ide 

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Books

2011-07-19 Thread faenvie
start with:

http://java.ociweb.com/mark/clojure/article.html (free)

then proceed with:

practical clojure http://www.apress.com/9781430272311

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Last Programming Language

2011-07-19 Thread Ken Wesson
On Mon, Jul 18, 2011 at 1:36 PM, TimDaly  wrote:
> Robert Martin argues that Clojure could be the seed of the last
> programming language.
>
> http://skillsmatter.com/podcast/agile-testing/bobs-last-language

I don't see how that claim can be drawn from the textual content on
that page. He mentions Clojure exactly once, not as a candidate "last
programming language" but merely as an example, among several, of
languages that seem to be rediscovering the past (i.e. long-underused
language families like the Lisps, MLs, etc.). If he's arguing that
Clojure, specifically, could be it, modulo incremental refinements,
it's not in the text on the page you linked to.

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Books

2011-07-19 Thread Teena Mathew
Thanks guys!


On Tue, Jul 19, 2011 at 11:57 AM, Sergey Didenko
wrote:

> Also check this great online introduction (targeting 1.0):
> http://java.ociweb.com/mark/clojure/article.html
>
>
>  --
> 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 members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Lee Spector

On Jul 19, 2011, at 3:54 AM, Clojure Neophyte wrote:
> 
> Again, for Clojure to have wider adoption it should have a beginners' IDE. It 
> shouldn't be distributed just as jar files.

FWIW I just double-clicked on the clooj jar and it launched like any other 
application -- I didn't have to know that it was a jar or even what a jar is. 
Assuming that this also works on other OSes (I'm using Mac OS X) then I think 
this is already beginner friendly. I *think* it also includes everything that a 
newbie needs for a complete workflow without any other tools or Terminal 
interactions...

 -Lee

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Clojure Neophyte
>
> - I wish that Swing was prettier on the eye. I love nice GUIs.
>
> Me too. I think in the long run the coolest thing will be an in-
> browser clojure IDE for clojure-in-javascript, especially when multi-
> threaded javascript becomes available in web browsers.
>
>
Maybe you should drop Swing and start experimenting with a cloud9-like IDE
instead.

Again, for Clojure to have wider adoption it should have a beginners' IDE.
It shouldn't be distributed just as jar files. That's fine for hackers but
clojure.org should have an IDE like CLOOJ and Clojure should be packaged
part of it (A Download button on the page should download it directly;
programmers should visit the Download page). Such an IDE would be ideal for
a college teacher to introduce Clojure to his students. This IDE should not
assume that these students have hacked on computers all their life.
- They should be able to create, edit, and build their entire project from
within the IDE and shouldn't have to switch to a terminal.
- The IDE should make the choice and not leave it to him. This IDE has to
choose one build system and not ask the user to choose. All choices should
be made.
- I don't believe that the parenthesis are the barrier for people to try a
lisp language. I bet that most people who repeat this never actually heard
it from a newbie; they just read it once and started repeating it. Unlike
Clojure, and Lisp generally, there is no syntax. While half of a book about
other languages discusses syntax issues, a Clojure book covers syntax in the
early chapters and the rest of the book is about concepts and advanced
issues. That's why lisp syntax is very small and pithy. More than any other
language, I think a new user needs to practice a lot writing very small code
pieces of code to get used to it. None of the Clojure books includes
exercises. Maybe its time someone write a "Learning Clojure the Hard Way"
book. The first lesson in The Hard Way book is to install a simple IDE like
CLOOJ (or CLIDE - clojure.org's fork: of it).

Many people believe that Clojure is not suitable as a first language.
Irrespective whether this is right or wrong, I find it odd that a language
like Clojure (and Scala) asks you to go learn another language before you
learn it. It is even more odd with Clojure because you need to learn one of
the broken languages first. Every general programming language should be a
first language.

Regards

--
> 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 members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: (count-all str1 str2)

2011-07-19 Thread Meikel Brandmeyer
Hi,

how about this: (count (filter (set "abc") "abracadabra"))?

Sincerely
Meikel

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

(count-all str1 str2)

2011-07-19 Thread Tuba Lambanog
Thinking of operations on collections to replace iteration is
productive, but alas, I'm new to it. I'm looking for a way to count
the number of occurrences of each and every character in str1 that
occurs in str2, so that

(count-all "abc" "abracadabra")

will give

8

which is the count of characters in  "abacaaba".

Any suggestion? Thanks!
Tuba

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Excellent intro to core.logic

2011-07-19 Thread Meikel Brandmeyer
Hi,

Am Dienstag, 19. Juli 2011 08:42:47 UTC+2 schrieb Ambrose Bonnaire-Sergeant:
>
> Is this easier on the eyes?
>
> https://gist.github.com/1091495
>

Ah! Much better! :D

Meikel 

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Lee Spector

On Jul 18, 2011, at 11:06 PM, Ken Wesson wrote:
> Or, the traditional thing: full control, but tab or something will
> reindent the current line, or all lines intersecting the selection if
> any, to structurally-correct positions based on all of the code above,
> if tab is hit outside a string literal or ; comment.

I personally think that this provides the best combination of clarity, 
simplicity, and utility. My guess is that "smarter" solutions will indeed get 
messy/annoying in some of the situations that Ken mentioned (e.g. pasting 
multiple lines, possibly from another app), and very occasionally I have reason 
to use non-standart indentation for some small segment of code. I do think that 
it's also good for the system to indent correctly when the user types a 
newline, which clooj already does.

 -Lee

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Increasing indent level in pprint

2011-07-19 Thread Tom Faulhaber
Sean's remark is right for writing code, but not really relevant for
pretty printed data structures. The pretty printer will either avoid
"(foo a" followed by a line break or fill that line full. (By default,
for lists it breaks the lines and for vectors it fills them.)

While there's no way to just set the indent, you can get this effect
with a little work.

The pretty printer allows customization of the output format using
dispatch functions.

By default it uses simple-dispatch, defined here:
https://github.com/clojure/clojure/blob/d1e39b1ec7fc65907b13458d7ec70b0839f3f85e/src/clj/clojure/pprint/dispatch.clj#L65

I have created a variant of simple dispatch that does the two
character indent (as per your example above). I through a little
project on github: https://github.com/tomfaulhaber/pprint-indent. The
README is basically a copy of your second example run in my repl. The
source is in 
https://github.com/tomfaulhaber/pprint-indent/blob/master/src/indent/indent.clj
for the curious.

Feel free to modify to taste. :)





On Jul 16, 10:52 pm, Asim Jalis  wrote:
> Okay. I see what you mean.
>
> On Jul 16, 2011, at 8:39 PM, Sean Corfield  wrote:
>
>
>
>
>
>
>
> > On Sat, Jul 16, 2011 at 7:05 PM, Asim Jalis  wrote:
> >> The position of the braces might be a red herring here. I was mostly
> >> interested in figuring out how to increase the indentation level from
> >> 1 to something larger. Even an indentation step of 2 for each level
> >> would be easier on the eye than 1.
>
> > My point was that the "natural" Lisp/Clojure indentation is to match
> > the items above so for:
>
> > {:something
>
> > the natural indentation is 1 and for:
>
> > (foo a
>
> > the natural indentation is 5: '(', 'f', 'o', 'o', ' '.
>
> > Indentation is not some fixed quantity you can change - it's dependent
> > on the structure of the data/code and the length of the symbols.
> > --
> > Sean A Corfield -- (904) 302-SEAN
> > An Architect's View --http://corfield.org/
> > World Singles, LLC. --http://worldsingles.com/
> > Railo Technologies, Inc. --http://www.getrailo.com/
>
> > "Perfection is the enemy of the good."
> > -- Gustave Flaubert, French realist novelist (1821-1880)
>
> > --
> > 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 members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en

-- 
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en