Tests in Clojure source

2009-07-20 Thread Angel Java Lopez
Hi people!
I'm a newbie to Twitter, a software developer, living in Buenos Aires,
Argentina, so I apologize my "Anglish" that is "Angel's English". Me
Tarzan, you Clojure :-)

I'm working on reimplementing some Clojure ideas in C#. I know you have a
CLR branch, I hope I will contribute to that branch, but now, I'm struggling
alone, so I could get on Clojure inner guts. I failed misserably configuring
Git in my machine with Vista, but I guess it's a problem to discuss in Git
forums.

My first question, or doubt, is:

- Is any test battery in Java, a la JUnit, to test clojure lib source code?
I didn't find such tests in the code, or I missed some repository?

I mean, Java test code, a la TDD.

In my test code (C#, Visual Studio 2008, Microsoft test library), I have
fragments like:


[TestMethod]
public void ShouldGetNullInPeek()
{
Assert.IsNull(EmptyList.Instance.Peek());
}
[TestMethod]
[ExpectedException(typeof(InvalidOperationException))]
public void ShouldRaiseWhenPop()
{
EmptyList.Instance.Pop();
}

But for me, it was difficult to know that PersistentList.EmptyList should
get null at Peek... I should read the code, but I didn't find any test that
describe such behavior... or that RT.seq(anEmptyList) should get null.

Actually, I'm taking another approach: reimplementing minicase of
Clojure top level expected behavior (implementing a list, a sequence, a
vector), instead of blind reimplementing the Java source code.

Any clue?

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

--~--~-~--~~~---~--~~
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: Help

2009-08-30 Thread Angel Java Lopez
I guess you want to write:

(defn foo [& v] (apply + v))

(note the space between & and v) --> no clojure here... it's English... :-)

If you write &v (without space) it's just another identifier &v.

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Sun, Aug 30, 2009 at 10:09 AM, Emeka  wrote:

> Hello All,
>
> I was fooling around with clojure and I found something I have not noticed
> before. Could someone explain it ?
>
> (defn foo [ &v]
> (apply + &v))
>
> Is '&' + the identifier's name another where of making sure that the
> parameter must be a collection?
> Or is there something I am doing wrong here? To be honest, I am pretty
> tired.
> Happy Sunday!
>
> Regards,
> Emeka
>
> >
>

--~--~-~--~~~---~--~~
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: "If you wish to have a version for off-line use...

2009-09-19 Thread Angel Java Lopez
Hi people!

I understand you want to use the download button from:
http://github.com/richhickey/clojure

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Sat, Sep 19, 2009 at 3:59 PM, cej38  wrote:

>
> I was just looking through the main web page of clojure-contrib and
> came across this:
>
> "If you wish to have a version for off-line use you can use the
> download button on the  page at GitHub .gh-pages branch."
>
> Is there a similar repository for the clojure.org?
>
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Duplicated keys in maps

2009-10-11 Thread Angel Java Lopez
Hi people!

I just discovered that maps support duplicated keys:

user=> {:a 1 :b 2 :a 3}
{:a 1, :b 2, :a 3}

It was not clear to me, from documentation. I presumed that maps are like
dictionaries.

What is the rationale behind this behaviour?
Is it this feature used in some way by clojure library? where?

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Clojure resources in Spanish

2009-10-22 Thread Angel Java Lopez
Hi people!

Does anyone know about Clojure resources written in Spanish? Blog posts,
tutorials, google group, email list, something else?

I want to write about Clojure in English, but in Spanish (my mother tongue)
too. And I want to mention any Spanish resource about Clojure.

I found some links using Google, filtering by Spanish:
http://www.google.com/search?hl=en&as_q=Clojure&as_epq=&as_oq=&as_eq=&num=10&lr=lang_es&as_filetype=&ft=i&as_sitesearch=&as_qdr=all&as_rights=&as_occt=any&cr=&as_nlo=&as_nhi=&safe=images

An example, Javier Neira Sanchez' blog, dedicated to Clojure:
http://javierneirasanchez.blogspot.com/

Any other resources?

Any interest in create and participate in a Clojure Spanish google group?

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

--~--~-~--~~~---~--~~
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 resources in Spanish

2009-10-22 Thread Angel Java Lopez
Hi People!

Ok, I just created a Google group, dedicated to Clojure topics, in Spanish:

http://groups.google.com/group/clojure-hispano

Anyone is invited to join. We are few, but I hope this group could be an
starting point.

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Thu, Oct 22, 2009 at 6:51 AM, Angel Java Lopez wrote:

> Hi people!
>
> Does anyone know about Clojure resources written in Spanish? Blog posts,
> tutorials, google group, email list, something else?
>
> I want to write about Clojure in English, but in Spanish (my mother tongue)
> too. And I want to mention any Spanish resource about Clojure.
>
> I found some links using Google, filtering by Spanish:
>
> http://www.google.com/search?hl=en&as_q=Clojure&as_epq=&as_oq=&as_eq=&num=10&lr=lang_es&as_filetype=&ft=i&as_sitesearch=&as_qdr=all&as_rights=&as_occt=any&cr=&as_nlo=&as_nhi=&safe=images
>
> An example, Javier Neira Sanchez' blog, dedicated to Clojure:
> http://javierneirasanchez.blogspot.com/
>
> Any other resources?
>
> Any interest in create and participate in a Clojure Spanish google group?
>
> Angel "Java" Lopez
> http://www.ajlopez.com
> http://twitter.com/ajlopez
>
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Some questions about core.clj implementation

2009-11-15 Thread Angel Java Lopez
Hi people!

I'm working on reimplement core.clj using my own C# interpreter for a
clojure-like language. Browsing in the 1.0.0 source code of core.clj, I have
some questions:

1: this is defn definition:

(def

 #^{:doc "Same as (def name (fn [params* ] exprs*)) or (def
name (fn ([params* ] exprs*)+)) with any doc-string or attrs added
to the var metadata"
:arglists '([name doc-string? attr-map? [params*] body]
[name doc-string? attr-map? ([params*] body)+ attr-map?])}
 defn (fn defn [name & fdecl]
(let [m (if (string? (first fdecl))
  {:doc (first fdecl)}
  {})
  fdecl (if (string? (first fdecl))
  (next fdecl)
  fdecl)
  m (if (map? (first fdecl))
  (conj m (first fdecl))
  m)
  fdecl (if (map? (first fdecl))
  (next fdecl)
  fdecl)
  fdecl (if (vector? (first fdecl))
  (list fdecl)
  fdecl)
  m (if (map? (last fdecl))
  (conj m (last fdecl))
  m)
  fdecl (if (map? (last fdecl))
  (butlast fdecl)
  fdecl)
  m (conj {:arglists (list 'quote (sigs fdecl))} m)]
  (list 'def (with-meta name (conj (if (meta name) (meta name) {})
m))
(cons `fn fdecl)

(. (var defn) (setMacro))

Why the "posponed" setMacro? Why not add the :macro true to inital metadata,
directly?

2) The cond macro is defined:

(defmacro cond
  "Takes a set of test/expr pairs. It evaluates each test one at a
  time.  If a test returns logical true, cond evaluates and returns
  the value of the corresponding expr and doesn't evaluate any of the
  other tests or exprs. (cond) returns nil."
  [& clauses]
(when clauses
  (list 'if (first clauses)
(if (next clauses)
(second clauses)
(throw (IllegalArgumentException.
 "cond requires an even number of forms")))
(cons 'clojure.core/cond (next (next clauses))

Why the need of add the full namespace name in the last cons?

Ok, but the first use of it is in:

(defn spread
  {:private true}
  [arglist]
  (cond
   (nil? arglist) nil
   (nil? (next arglist)) (seq (first arglist))
   :else (cons (first arglist) (spread (next arglist)

Where is defined :else keyword behaviour? I can't find how :else is defined
to be managed in cond/if code

TIA

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

-- 
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: Language similarities

2010-01-01 Thread Angel Java Lopez
I would like to add Ada exception management. I don't know if there were
previous work on the field. Any info? I worked with Algol, but I don't
remember if something like exceptions was present those days. Any early Lisp
exception management?

And namespaces. The first Eiffel had no management of name collision; it has
some sort of renaming. The first time I saw namespaces was in nineties C++,
then popularized by Java packages. Any previous work on that? Smalltalk
categories, dictionaries could be considered namespaces?

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Tue, Dec 29, 2009 at 6:34 AM, Martin Coxall  wrote:

>
> On 29 Dec 2009, at 04:14, jim wrote:
>
> > Had an interesting conversation with a programmer friend of mine. He's
> > skeptical of my Lisp leanings and mostly sticks to the 'normal'
> > languages; C++, Java, etc.
> >
> > I made that comment that pretty much all the languages derived from
> > Algol like the C family, Java, Pascal, etc. were pretty much the same.
> > He looked at me like I was insane. :) :)
>
> Well, you're basically correct. The block structure was finalised in 1960
> as part of Algol, and everything else (mainly the OO stuff) was all present
> and correct in Simula in 1967.
>
> Since that point, imperative languages have barely changed in the last 33
> years. The only notable exception to this was Ada growing generics in 1987,
> and their evolution into C++ templates.
>
> Martin
>
> --
> 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: Clojure on Go

2010-02-21 Thread Angel Java Lopez
Hi people!

Clojure could be compiled over another language, using another base library.
This could be the "litmut test" for Clojure independence.

I guess Clojure-CLR is an step towards such target.

For now, Clojure consumes two library classes and VM: Java and .NET. It's
good, IMO, to have such two implementations. When Clojure will stabilized in
both, it will be more clear what part of the language is:

- Clojure-pure
- VM-oriented
- Base Library-oriented

If someone want to implement Clojure over another OO VM + Library Class,
he/she should rewrite the dot notation, and map PersistenceList, etc... to
the underlying class library.

If someone want to implement Clojure over a language, I guess he/she should
write some interface to native DLLs, and ways to insert code written in the
underlying language in the middle of a function, and write the supporting
classes for Clojure structures.

Having the two kind implementations:

- Clojure over VM+Class Library (Java, CLR)
- Clojure over Language (?)

will be enlightning about what is the core, base, and technicalities of any
Clojure port.

I'm playing porting Clojure to .NET as interpreter (I don't know enough DLR
to write a compiler or contribute to Clojure-CLR, I hope this state of
affairs will change this year).

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Sat, Feb 20, 2010 at 6:15 PM, Chouser  wrote:

> On Sat, Feb 20, 2010 at 3:59 PM, Joop Kiefte  wrote:
> > I read this part...
> >
> >
> http://www.reddit.com/r/programming/comments/b3sb1/golisp_a_lisp_interpreter_in_go/
> >
> > and thought, would someone be able to do that for clojure? (the
> > Clojure in Clojure stuff might make this easier :))
> >
> > Is this a weird idea?
>
> Clojure supports compilation, so might as go all the way and have
> add a golang target to complie Clojure code directly to golang
> code.  Not a weird idea at all. :-)
>
> > I like a lot of ideas in go, and it's speed, but Clojure is just some
> > bits nicer. When we have clojure on go, we can have compiled clojure
> > without java runtime and fast, can't we?
>
> I don't know if you'll get better runtime speed out of golang or
> not, but I bet you'd get much better startup speed, and for some
> use cases that's highly desirable.
>
> > It sure has advantages, and as a toy project it might be cool. And
> > most of Clojure's code is in clojure anyway, so that eases porting I
> > guess.
>
> Here I'm afraid you may be disappointed.  Currently all of
> Clojure's reader, compiler, persistent data structures (vector,
> list, maps, queues, and sets), reference types (refs, agents,
> vars, etc.), and much of the support code (STM, namespaces, etc.)
> are all written almost entirely in Java.
>
> This is already beginning to change (see Rich's recent work on
> cells and generic vectors), but there's quite a ways to go yet.
> When that work is done, compiling Clojure to golang might indeed
> be a fun project.
>
> --Chouser
> http://joyofclojure.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
>

-- 
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: group tag for clojure newsgroup

2010-03-04 Thread Angel Java Lopez
+1 many "quick" interfaces show only the title. Adding [clojure] would be
fine.

On Thu, Mar 4, 2010 at 10:05 AM, Johnny Kwan wrote:

> On Mar 4, 2010, at 8:00 AM, Rich Hickey wrote:
>
> >
> >
> > On Mar 4, 2:56 am, TimDaly  wrote:
> >> For the other groups that I subscribe to, the email subjects are
> >> always prefixed with the group name, e.g.
> >>
>

-- 
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: REPL in a browser

2010-03-07 Thread Angel Java Lopez
There is a Clojure REPL in a browser implementation I know:

http://lotrepls.appspot.com/

Project home
http://code.google.com/p/lotrepls/

They support

   - beanshell *
   - clojure
   - groovy *
   - javascript *
   - python *
   - ruby *
   - scala *
   - scheme

using Google App Engine as backend

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Sun, Mar 7, 2010 at 7:18 AM, Jozef Wagner  wrote:

> Hi,
>
> I'm wondering how hard it would be to make a clojure REPL accessible
> from a browser. Something like at http://www.simplyscala.com/
>
> Some approaches I have thought of:
> a) Java Applet
> Downsides: need to have Java 1.6 enabled in a browser, less cool
> visual presentation :)
> Upsides (for some): Running locally on a client
>
> b) REPL on a server with javascript frontend
> UI would be handled with the javascript and the client would send
> inputs to the REPL sitting on the server.
> Downsides: Bigger load on the server, needs to secure the underlying
> JVM, so the users cannot access everything through the REPL.
>
> c) Clojurescript (running clojure REPL on top of the javascript)
> Is it even possible? Don't know what is the state of the
> clojurescript. This approach could be implemented so that REPL would
> run either on a client or on the server I think
>
> Any thoughts?
>
> Best,
> JW
>
> --
> 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: German Clojure Book

2010-03-11 Thread Angel Java Lopez
Great!

I thought the cover was a Bratko, as in other Lisp book

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Thu, Mar 11, 2010 at 7:27 PM, Stefan Kamphausen
wrote:

> Hi,
>
> > Congratulations! I hope there will be an English translation one day.
>
> probably not.  There is good English material available and even
> better coming up.  I don't see how I could produce something better
> than Chouser or Stu.
>
> > The book cover is awesome; really like the design and the main font.
>
> You don't know how proud you made me with that remark! It was painted
> in 2008 by my daughter who at that time was 5 years old.  The original
> is approx 1m in height.  Thank you very much, indeed!
>
> Cheers,
> Stefan
>
> --
> 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: Web Programming with clojure

2010-03-16 Thread Angel Java Lopez
Hi people!

I'm not use it, but first link to explore
http://github.com/weavejester/compojure

My collected links
http://delicious.com/ajlopez/compojure
http://delicious.com/ajlopez/clojure+webdevelopment

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Mon, Mar 15, 2010 at 4:11 PM, Tim Johnson  wrote:

> My niche currently is web programming and web interfaces. I have not
> used java and I have a certain comfort level with lisp dialects.
> I use emacs 22.3.1 on slackware 13.0 32-bit.
>
> Therefore clojure is of interest to me.
> I would welcome links to discussions, resources etc. on this topic.
> Thanks
>
> --
> Tim
> t...@johnsons-web.com
> http://www.akwebsoft.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

-- 
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: Microsoft drops Software Transactional Memory

2010-05-14 Thread Angel Java Lopez
Hi people!

A 2008 paper, I just received today via twitter

*Software transactional memory**: why is it only a research toy?*
http://portal.acm.org/citation.cfm?id=1400228&coll=ACM&dl=ACM&CFID=90273999&CFTOKEN=67127907&ret=1#Fulltext

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Fri, May 14, 2010 at 2:27 PM, Brian  wrote:

>
> Not directly related to Clojure but I thought this would be of interest to
> folks:
> http://www.infoq.com/news/2010/05/STM-Dropped
>
>
> http://www.reddit.com/r/programming/comments/c4367/microsofts_experiments_with_software/
>
>
>

-- 
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: "special form" vs. "macro"

2010-05-31 Thread Angel Java Lopez
Hi people!

Nice explanation, about the difference of "special form" in Clojure, vs
other Lisp.

I remember (Queinnec Lisp?):

lambda: to make "normal functions"
mlambda: to make "macros" (something that produce a form, and then, evaluate
that result)
flambda: spread, non evaluation of parameters
nlambda: non-spread (all arguments in one variable), non evaluation of
parameters.

Usually, when I wrote a Lisp interpreter, I implement the above "words".

AFAIK, Clojure doesn't have any way to build a new special form, except via
macros. Why? It was a design decision? motivated by Java compilation?

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Mon, May 31, 2010 at 11:06 AM, Patrick Stein  wrote:

> Maybe Clojure uses the term "special form" differently than Common
> Lisp does, but here's how to think of "special form" in the Common
> Lisp sense.
>
> A form that is *NOT* a special form like (F A B C D ...) will either
> evaluate:
>
> 1. (SYMBOL-FUNCTION F), then A, B, C, D, ... in order from left-to-
> right, OR
> 2. A, B, C, D, ... in order from left-to-right then (SYMBOL-FUNCTION
> F)
>
> And, cannot change the lexical environment (add or remove symbols in
> the environment).
>
> It is up to the implementation whether (SYMBOL-FUNCTION F) gets
> evaluated first or last, but A, B, C, D, ... get evaluated from let to
> right in order before F is invoked.
>
> Any form that does not ALWAYS obey that is a "special form".
>
> Examples:
>
> (+ 3 5 (+ 6 7) ii), the form 3 is evaluated, then 5, then (+ 6 7),
> then ii, then all of these are passed to (SYMBOL-FUNCTION +) to
> execute.  This IS NOT a special form.
>
> (IF A B C) does not evaluate both B and C.  Thus, it IS a special
> form.
>
> The following IS NOT a special form (as long as XX and YY aren't
> dynamic variables that we're overriding but rather just local
> variables here like it looks) because it always evaluates A and B in
> the expected order:
> (DEFMACRO WEIRD (A B)
>   `(LET ((XX ,A))
>  (LET ((YY ,B))
>  (DO-SOMETHING (+ XX YY) (- XX YY)
>
> (WEIRD (+ 6 7) ii)
>
>
> The following IS a special form because it does not evaluate A and B
> in the expected order:
> (DEFMACRO WEIRD-SPECIAL (A B)
>   `(LET ((YY ,B))
>  (LET ((XX ,A))
>  (DO-SOMETHING (+ XX YY) (- XX YY)
>
> (WEIRD-SPECIAL (+ 6 7) ii)
>
> The following IS also a special form since it doesn't always evaluate
> A and B in the expected order:
> (DEFMACRO WEIRD-MAY-BE-SPECIAL (SPECIAL A B)
>   `(IF ,SPECIAL
>   (LET ((XX ,A))
> (LET ((YY ,B))
>(DO-SOMETHING (+ XX YY) (- XX YY
>   (LET ((YY ,B))
> (LET ((XX ,A))
>(DO-SOMETHING (+ XX YY) (- XX YY)
>
> (WEIRD-MAY-BE-SPECIAL (ZEROP (RANDOM 2)) (+ 6 7) ii)
>
> The term "special form" (at least in Common Lisp) has nothing to do
> with whether it is built-in or user-defined.  It has to do with
> whether or not all of its components are evaluated in the expected
> order.
>
> ttyl,
> Patrick
>
> --
> 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: My Clojure Workflow, Reloaded

2013-06-05 Thread Angel Java Lopez
It was recently discussed at
https://groups.google.com/group/clojure/browse_thread/thread/f1a3bb6563fecf1c?hl=en

See also
 http://blog.goodstuff.im/clojure_workflow

Angel "Java" Lopez
@ajlopez



On Wed, Jun 5, 2013 at 8:21 AM, Julian  wrote:

> Stuart Sierra has written a fantastic article on his particular pattern
> for writing and testing Clojure code:
> http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded
>
> There is some commentary on Hacker News about it here:
> https://news.ycombinator.com/item?id=5819487
>
> I'll include some of the salient points
>
> Therefore, after every significant code change, I want to restart the
> application from scratch. But I don't want to restart the JVM and reload
> all my Clojure code in order to do it: that takes too long and is too
> disruptive to my workflow. Instead, I want to design my application in such
> a way that I can quickly shut it down, discard any transient state it might
> have built up, start it again, and return to a similar state. And when I
> say quickly, I mean that the whole process should take less than a second.
>
>
> To achieve this goal, I make the application itself into a transient
> object. Instead of the application being a singleton tied to a JVM process,
> I write code to construct instances of my application, possibly many of
> them within one JVM. Each time I make a change, I discard the old instance
> and construct a new one. The technique is similar to dealing with virtual
> machines in a cloud environment: rather than try to transition a VM from an
> old state to a new state, we simply discard the old one and spin up a new
> one.
>
>
> My questions to the fantastic hacker new communities are:
> (1) Have you used this technique on your project?
> (2) What is your experiences using this technique?
> (3) Stuart hints that particular projects have to be structured to be able
> to better use this technique - can you point to a particular project that
> is well suited to this?
>
>
>
>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: In what OS do you code?

2013-06-17 Thread Angel Java Lopez
Windows 8 at work
Windows 2008 Server at home

Lot of Node.js, C#, Java, PHP coding. Few Clojure, only spikes or little
sample, using REPL, sometimes lein

Angel "Java" Lopez
@ajlopez



On Fri, Jun 14, 2013 at 10:46 AM, Erlis Vidal  wrote:

> Hi,
>
> I'm a bit curious to know in what OS do you code. Do you prefer iOS,
> Linux, Windows? Why is that? Because the tools? The environment?
>
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Socket.IO and Clojure?

2013-07-17 Thread Angel Java Lopez
If you leave Socket.IO, another option is direct WebSocket in Java
https://github.com/TooTallNate/Java-WebSocket
http://java-websocket.org/


On Wed, Jul 17, 2013 at 8:37 PM, Anand Prakash wrote:

> Hi Sean,
> We are in process for going with a similar solution on clojure. Lets keep
> sharing notes.
>
> We were on heroku till last week. Websockets wont work on heroku. Lack of
> sticky session caused other issues. So we moved to elabstic beanstalk.
> However elastic beanstalk doesn't support jetty and I do not like tomcat.
> Plus on elastic beanstalk whenever you push code they have a down time upto
> 5 minutes.
> So over the past 2 days, we moved things to chef on ec2 which I am really
> happy with. Now we have a system as easy to use as heroku, with much more
> control. I am mentioning these because you or others might go through the
> same steps.
>
> Coming to your main point about Socket.IO. We spent around a week
> exploring Socket.IO. It was super easy to hack up a demo, however we ended
> up leaving it for couple of reasons:
> 1. Though the community looks very active in terms of forks etc, the
> development on Socket.IO is completely stopped. The dev team is focussed on
> engine.IO and they are very opaque. When you post on socket.io google
> group, posts do not have get approved. If you propose to help, you do not
> get any response.
> 2. The library has lot of features - like rooms etc. However they are not
> built to scale. I looked at the code and was very disappointed. User->Room
> mapping, Room->User mapping were stored in memory which will make it not
> scale beyond a point. Bad coding (e.g. using lists traversal where hash
> maps should be used) is very common in nodejs community and I am very wary
> of developing on that platform.
> 3. There was a memory leak in Socket.IO which would cause memory to
> increase linearly with usage. Given that most projects using nodejs dont
> move beyond prototypes these kind of issues do not get highlighted. I used
> to manage the mobile server at LinkedIn and we had to deal with a lot of
> memory leaks with node.js.
> 4. Javascript
>
> So finally, if you really have to use Socket.IO, I would recommend using
> https://github.com/einaros/ws for just websocket and built everything
> else yourselves.
>
> I am not a big fan of keeping two different setups at the stage of our
> product. We are fine with long-poll for now. So we will start there and
> eventually get to web sockets. We are considering http://http-kit.org/ for
> that. For communication between message generators and open client sockets
> we are exploring some pub sub solution.
>
> Hope this helps.
>
> Thanks
> Anand
>
>
> On Tuesday, July 16, 2013 10:07:34 PM UTC-7, Sean Corfield wrote:
>>
>> At work we're starting down the path of building a new piece of
>> functionality based on WebSockets and the external team we're working
>> with is a Node.js shop so their go to solution is Socket.IO and
>> they've produced a very nice front end in CoffeeScript and a prototype
>> back end on Node.js.
>>
>> I'd really like to have our back end on the JVM, of course, and so I'd
>> like to find a JVM-based Socket.IO solution that I use from/with
>> Clojure...
>>
>> This seems like a reasonable option:
>>
>> https://github.com/mrniko/**netty-socketio
>>
>> A little bit of experimentation with lein-try (Thank you Ryan!) shows
>> that it's pretty easy to get a basic server up and running in the REPL
>> - and I was able to get several of their demos running unchanged
>> against Clojure, instead of their Java applications, so that was
>> promising.
>>
>> Are there other folks out there doing Socket.IO stuff with Clojure?
>> What approaches have you taken?
>>
>> Obviously, we could run Node.js and have it hit a Clojure-based REST
>> API to do the integration, and that might be less pain long term
>> but...
>> --
>> Sean A Corfield -- (904) 302-SEAN
>> An Architect's View -- http://corfield.org/
>> World Singles, LLC. -- http://worldsingles.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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos

Re: Fantasy Baseball Lineup Optimization

2013-09-15 Thread Angel Java Lopez
I don't know how to play baseball, what a lineup is, etc...

But first idea to explore: genetic algorithm


On Sat, Sep 14, 2013 at 10:53 PM, Matthew Rocklin wrote:

> Perhaps a bit intense but this problem might lend itself to mixed integer
> linear programming.  MILP is a very broad formulation of optimization
> problems.  Optimal solution of MILP problems is NP-Hard but very mature
> software solutions exist.  I don't know what's out there in Clojure land
> for this but in Python the PuLP library offers idiomatic expression of MILP
> problems and connections to various open source solvers.  At the very least
> you may find their examples illuminating; MILP is a very powerful tool to
> have in your toolbox.
>
> http://pythonhosted.org/PuLP/
> http://pythonhosted.org/PuLP/CaseStudies/a_blending_problem.html
>
>
> On Friday, September 13, 2013 7:52:04 AM UTC-7, Mark Watson wrote:
>>
>> Hi, newish user here.
>>
>> I want to make an app that finds a simple, optimized, fantasy baseball
>> lineup.
>>
>> Each player has a cost associated with them, as well as the average
>> points per game they score, and position. For example: Mike
>> Napoli, 4600, 2.9, 1B
>>
>> You have to choose one of each position: catcher, pitcher, 1st base, 2nd
>> base, 3rd base, and shortstop. You also have to pick three outfielders. It
>> would be easy to just pick the players with the highest points per game,
>> but you also need to stay under a specified total cost.
>>
>> Currently, I iterate through every possibility, and swap an atom with a
>> new lineup if the total average points is higher, while staying under the
>> total cost limit.
>>
>> My issues are:
>>
>> 1) This seems like an inelegant solution (brute force)
>> 2) I don't know how to best handle the fact that I need to select three
>> outfielders from a single list, and cannot select one player more than once
>>
>> Any advice, suggestions would be great. 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Clojure needs a web framework with more momentum

2015-05-03 Thread Angel Java Lopez
I could add something about NodeJS arena:

There are web frameworks, but the most popular (AFAIK) way is the use of:

- Express for MVC routing and middleware management (before middle ware
management was Connect task), and template engine coordination
- NPM ecosystem for any library or middleware needed

I guess that "big web frameworks" are more suitable for simple application
without a lot of changing requirements. Every time I got an application
with non-trivial logic, and agile embracing the change, I preferred the
"simple-way" insteof the "easy-way".

And "small web frameworks" are in charge of:
- middleware chaining
- routing a la MVC
- coordinate template rendering

In contrast, PayPal developed kraken http://krakenjs.com/ adding some
conventions and libraries

Angel "Java" Lopez
@ajlopez


On Sun, May 3, 2015 at 4:45 PM, Christopher Small 
wrote:

>
> Perhaps we need to see an example of a minimalistic/modular approach that
> _has_ won out.
>
> Node's express has > 5k commits, 177 contribs, >18k stars. Possibly the
> most popular node framework out there. Tagline?
>
> > Fast, unopinionated, minimalist web framework for node.
>
>
>
>
> On Sunday, May 3, 2015 at 11:52:22 AM UTC-7, Leon Grapenthin wrote:
>>
>> No, it isn't. And never has this author proven that programmers with
>> bipolar personality are programming more LISP then other languages.
>>
>> Many larger libraries in the Clojure community are well documented and
>> "finished-off properly".
>>
>> Web frameworks have been tried and not been picked up. Users have chosen
>> the modular compose it yourself approach. Framework authors have simply
>> stopped maintaining what nobody wanted anyway or split them up into smaller
>> pieces.
>>
>>
>> On Sunday, May 3, 2015 at 8:25:22 PM UTC+2, larry google groups wrote:
>>>
>>>
>>> > The web development industry as reflected in job postings at
>>> > Indeed.co.uk is still dominated by the likes of Rails, Django,
>>> Laravel,
>>> > Zend, Symfony & Spring so I'm not sure how you've concluded that
>>> there's
>>> > been a 15-year trend towards composition.
>>>
>>> That is a good point, though I would also point out that, according to
>>> Indeed.com, the use of Clojure is also growing. To me, what's important is
>>> the growth of the Clojure community, rather than the growth of some
>>> sub-community focused on a particular niche.
>>>
>>> However, I acknowledge you may have a point about the failure of any of
>>> the Clojure frameworks to take off. It's possible this is another
>>> manifestation of the Bipolar Programmer problem:
>>>
>>> http://www.lambdassociates.org/blog/bipolar.htm
>>>
>>> "Brilliance and failure are so often mixed together and our initial
>>> reaction is it shouldn't be.   But it happens and it happens a lot.  Why?
>>> ...But brilliance is not enough.  You need application too, because the
>>> material is harder at university.   So pretty soon our man is getting B+,
>>> then Bs and then Cs for his assignments.   He experiences alternating
>>> feelings of failure cutting through his usual self assurance.  He can still
>>> stay up to 5.00AM and hand in his assignment before the 9.00AM deadline,
>>> but what he hands in is not so great.
>>>
>>> ...So BBMs love Lisp.  And the stunning originality of Lisp is
>>> reflective of the creativity of the BBM; so we have a long list of ideas
>>> that originated with Lispers - garbage collection, list handling, personal
>>> computing, windowing and areas in which Lisp people were amongst the
>>> earliest pioneers.  So we would think, off the cuff, that Lisp should be
>>> well established, the premiere programming language because hey - its great
>>> and we were the first guys to do this stuff.
>>>
>>> But it isn't and the reasons why not are not in the language, but in the
>>> community itself, which contains not just the strengths but also the
>>> weaknesses of the BBM.
>>>
>>> One of these is the inability to finish things off properly.  The phrase
>>> 'throw-away design' is absolutely made for the BBM and it comes from the
>>> Lisp community.   Lisp allows you to just chuck things off so easily, and
>>> it is easy to take this for granted.  I saw this 10 years ago when looking
>>> for a GUI to my Lisp (Garnet had just gone West then).  No problem, there
>>> were 9 diff

Re: [ANN] [Book] ClojureScript Unraveled

2015-05-04 Thread Angel Java Lopez
Great work!

I really appreciate
http://funcool.github.io/clojurescript-unraveled/#tooling-compiler

Now, I started to understand the compiler process

Angel "Java" Lopez
@ajlopez


On Mon, May 4, 2015 at 3:20 PM, Andrey Antukh  wrote:

> Hi!
>
> We (my friend Alejandro and I) are happy to announce the first public
> version of a ClojureScript book that we are writing.
>
> The book is still a work in progress and many chapters are not available
> yet. We are sure that the book has many spelling errors (we are not native
> English speakers), so the wording improvements are very very welcome!
>
> This books aims to serve as:
>
> - a comprehensive introduction to the ClojureScript language and its
> idiomatic usage, assuming no previous experience with Clojure or functional
> programming;
> - a detailed guide of the ClojureScript compiler and the tooling around
> it; and
> - a mixed bag of topics that are useful in day-to-day ClojureScript
> programming.
>
> Github: https://github.com/funcool/clojurescript-unraveled
> Online version: http://funcool.github.io/clojurescript-unraveled/
>
> Feel free to write any comments or feedback.
>
> Cheers.
> Andrey
>
> --
> Andrey Antukh - Андрей Антух -  / <
> n...@niwi.be>
> http://www.niwi.be <http://www.niwi.be/page/about/>
> https://github.com/niwibe
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Macro invocation. compilation?

2014-11-09 Thread Angel Java Lopez
Hi!

I'm understand macros from other Lisp, and I implemented some simple Lisp
interpreters (not compilers) in Java and C#.

But I still don't understand some Clojure decisions, like indicating
something is a macro in the metadata of a var. I guess those decisions are
related to COMPILING phase.

Today, I found an unexpected error. In a clear REPL:

user=> (declare myfn2)
#'user/myfn2
user=> (defn myfn1 [x y] (myfn2 x y))
#'user/myfn1
user=> (defn myfn2 [x y] (+ x y))
#'user/myfn2
user=> (myfn1 1 2)
3

This is OK.

But again, in a new/clear REPL:

user=> (declare myfn2)
#'user/myfn2
user=> (defn myfn1 [x y] (myfn2 x y))
#'user/myfn1
user=> (defmacro myfn2 [x y] (cons 'list (cons x (cons y nil
#'user/myfn2
user=> (myfn1 1 2)
ArityException Wrong number of args (2) passed to: user/myfn2
 clojure.lang.AFn.
throwArity (AFn.java:429)

Why? I expected something like:
- Invoke the macro
- Or invalid call to macro

but why "wrong number of args"?

In the same REPL, I continue with:

user=> (defn myfn1 [x y] (myfn2 x y))
#'user/myfn1
user=> (myfn1 1 2)
(1 2)

So, I redeclare myfn1, using myfn2 that now it is known as a macro, I
invoked myfn1 and myfn2 was invoked. OK.

But now, if I redeclare myfn2 to a normal function:

user=> (defn myfn2 [x y] (+ 1 2))
#'user/myfn2
user=> (myfn1 1 2)
(1 2)
user=> (myfn2 1 2)
3

THE invocation to myfn1 is using the OLD myfn2 definition. My guess:

- myfn1 was compiled, and at the time of compilation, myfn2 was a macro,
with some implementation

The questions are:

Am I right? It is a compiler related issue when using macros?
How myfn1 knows the PAST implementation of myfn2? It is the myfn2 initial
implementation EXPANDED at myfn1 compile time? What happens if myfn2 has
other macros inside?

In other implementations, I expected myfn1 lookup for myfn2 value EACH TIME
myfn2 is used at head of list, independently of being myfn2 a macro or not.
For example, in a clear REPL

user=> (defn myfn2 [x y] (+ x y))
#'user/myfn2
user=> (defn myfn1 [x y] (myfn2 x y))
#'user/myfn1
user=> (myfn1 1 2)
3

It's OK. Then, I redefined myfn2:

user=> (defn myfn2 [x y] (+ x y 1))
#'user/myfn2
user=> (myfn1 1 2)
4

and THE NEW myfn2 is indirectly invoked.

TIA

Angel "Java" Lopez
@ajlopez

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: If code is data why do we use text editors?

2014-11-16 Thread Angel Java Lopez
Loosely related, but interesting

http://blog.interfacevision.com/design/design-visual-progarmming-languages-snapshots/

Angel "Java" Lopez
@ajlopez


On Sun, Nov 16, 2014 at 4:11 AM, Colin Fleming 
wrote:

> Hi Mike,
>
> Actually, I haven't - I probably should spend more time investigating it,
> there are bound to be some interesting ideas. If you have thoughts about
> aspects of it that might be useful, I'd be very interested in hearing about
> them either on or off list (co...@colinfleming.net).
>
> On 16 November 2014 19:07, Mike Haney  wrote:
>
>> Colin - I'm just curious if you have any experience with Jetbrains MPS?
>> I was into it pretty heavily before I got into Clojure, and I've thought a
>> lot about how to add support for Clojure to it (would be pretty
>> straightforward, actually), but haven't had the time to pursue it or the
>> conviction that it would be worthwhile.
>>
>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ring and Compojure with Node.js via Clojurescript

2014-12-09 Thread Angel Java Lopez
Maybe when you reach the async nature of node.js, you could use node fibers
https://github.com/laverdet/node-fibers

to wrap up async calls as sync ones, as a "baby step" to implement your
ideas.

Meteor
https://www.meteor.com/
 use a lot of fibers internally.

Angel "Java" Lopez
@ajlopez


On Tue, Dec 9, 2014 at 8:07 AM, Thomas Heller  wrote:

> Due to significant platform differences from the JVM to Node.js (no real
> threads, everything needs callbacks) you'd probably be better off writing
> something more javascript-y. Porting Ring is probably not likely since
> everything is async and Ring is not. Same goes for Compojure but that is
> mostly macro stuff so it could probably fit in somehow.
>
> Running something on Node.js requires a completely different (async) way
> of thinking, which you don't nescessarily do on the JVM. You'd probably be
> better of using something from the node.js ecosystem. Iits not like you
> could ever take any Clojure Ring Handler and plug it into
> ClojureScript/Node, at least not likely as soon as you do something with IO.
>
> Just my 2 cents,
> /thomas
>
> On Monday, December 8, 2014 3:50:48 PM UTC+1, Matthew Molloy wrote:
>
>> Dear Community,
>>
>> I love making Clojure web apps, however their startup time is a serious
>> drawback when used with a transient hosting service such as Heroku.  My
>> thought is to port Ring and Compojure over to Clojurescript so that can get
>> their nice abstractions hosted on the Node.js runtime.
>>
>> Any thoughts or suggestions?
>>
>> Matthew
>>
>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ring and Compojure with Node.js via Clojurescript

2014-12-09 Thread Angel Java Lopez
Another path: write ClojureScript that consumes directly Nodejs and some
popular web framework (like Express). Then, you can write the
controllers/actions/logic in ClojureScript. I'm not sure about the
feasibility of this idea from clojurescript.

Angel "Java" Lopez
@ajlopez

On Tue, Dec 9, 2014 at 8:26 AM, Angel Java Lopez 
wrote:

> Maybe when you reach the async nature of node.js, you could use node fibers
> https://github.com/laverdet/node-fibers
>
> to wrap up async calls as sync ones, as a "baby step" to implement your
> ideas.
>
> Meteor
> https://www.meteor.com/
>  use a lot of fibers internally.
>
> Angel "Java" Lopez
> @ajlopez
>
>
> On Tue, Dec 9, 2014 at 8:07 AM, Thomas Heller  wrote:
>
>> Due to significant platform differences from the JVM to Node.js (no real
>> threads, everything needs callbacks) you'd probably be better off writing
>> something more javascript-y. Porting Ring is probably not likely since
>> everything is async and Ring is not. Same goes for Compojure but that is
>> mostly macro stuff so it could probably fit in somehow.
>>
>> Running something on Node.js requires a completely different (async) way
>> of thinking, which you don't nescessarily do on the JVM. You'd probably be
>> better of using something from the node.js ecosystem. Iits not like you
>> could ever take any Clojure Ring Handler and plug it into
>> ClojureScript/Node, at least not likely as soon as you do something with IO.
>>
>> Just my 2 cents,
>> /thomas
>>
>> On Monday, December 8, 2014 3:50:48 PM UTC+1, Matthew Molloy wrote:
>>
>>> Dear Community,
>>>
>>> I love making Clojure web apps, however their startup time is a serious
>>> drawback when used with a transient hosting service such as Heroku.  My
>>> thought is to port Ring and Compojure over to Clojurescript so that can get
>>> their nice abstractions hosted on the Node.js runtime.
>>>
>>> Any thoughts or suggestions?
>>>
>>> Matthew
>>>
>>  --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is there a reason ns macro is not a function?

2014-12-30 Thread Angel Java Lopez
Hi!

My first guess: a normal function evaluates all its arguments. ns uses
(:require ) (:use.. ) (:import ..) that should be not evaluated at ns
apply. The alternative is to make ns an special form, but macro should be
more flexible.

Instead, in-ns is simpler, and it can be implemented as a normal function.

Angel "Java" Lopez
@ajlopez


On Tue, Dec 30, 2014 at 5:30 AM, Petr  wrote:

> Hello.
>
> Does anyone know why clojure.core/ns macro is not implemented as function?
> It seems that it should work that way except that probably it would be
> nicer to have in-ns call at the top level.
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ClojureScript] The Essence of ClojureScript Redux

2015-01-03 Thread Angel Java Lopez
Nice!

I'm working on Windows, how to write an issue for clojurescript project?

after

lein new mies mycljsprj
cd mycljsprj


Running
lein trampoline run -m clojure.main scripts\repl.clj

gives me:

To quit, type: :cljs/quit
ClojureScript Node.js REPL server listening on 58419
Error: ENOENT, no such file or directory
'C:\Git\ClojureScriptSamples\mycljsprj\
base.js'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at nodeGlobalRequire (repl:80:18)
at repl:87:1
at Socket. ([stdin]:27:80)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket. (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
Error: Cannot find module 'C:GitClojureScriptSamplesmycljsprjout
ode_repl_deps.js'

and more

Angel "Java" Lopez
@ajlopez


On Fri, Jan 2, 2015 at 10:06 PM, David Nolen  wrote:

> I've posted a simple walkthrough of the new Node.js REPL:
>
> http://swannodette.github.io/2015/01/02/the-essence-of-clojurescript-redux/
>
> I suspect people will be reaching for ClojureScript REPLs
> significantly more often than in the past :)
>
> David
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using ring, jetty plugin: No reader function for tag object

2017-10-22 Thread Angel Java Lopez
Hi!

I have a problem, following the instructions:

https://github.com/ring-clojure/ring/wiki/Getting-Started

I can run the server using the repl

But when I added the plugin, according to:

https://github.com/ring-clojure/ring/wiki/Interactive-Development

and execute

lein ring server

I get the infamous error:

Exception in thread "main" java.lang.RuntimeException: No reader function
for tag object, compiling::
at clojure.lang.Compiler.load(Compiler.java:7386)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: No reader function for tag object
at
clojure.lang.LispReader$CtorReader.readTagged(LispReader.java:1245)
at clojure.lang.LispReader$CtorReader.invoke(LispReader.java:1228)
.

Using Windows 10, JDK 1.8_074

Current project at:

https://github.com/ajlopez/ClojureSamples/tree/master/Ring/helloring

I tried other tutorials, examples, using the REPL is OK, but using the
plugin and lein ring server, does not work

Notable, other ring plugin commands work, like lein ring uberjar

Any cues??

TIA

Angel "Java" Lopez
@ajlopez

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using ring, jetty plugin: No reader function for tag object

2017-10-22 Thread Angel Java Lopez
I updated the versions to 1.6.2, but without luck

Downgrading Leiningen works!!! (???)

Thanks!

On Sun, Oct 22, 2017 at 3:31 PM, James Reeves  wrote:

> It looks like there's a dependency mismatch between the version of Ring
> that Lein-Ring injects, and the version you've added to your project file.
> If you update Ring to 1.6.2 (and lein clean) it should work.
>
> On 22 October 2017 at 18:40, Angel Java Lopez 
> wrote:
>
>> Hi!
>>
>> I have a problem, following the instructions:
>>
>> https://github.com/ring-clojure/ring/wiki/Getting-Started
>>
>> I can run the server using the repl
>>
>> But when I added the plugin, according to:
>>
>> https://github.com/ring-clojure/ring/wiki/Interactive-Development
>>
>> and execute
>>
>> lein ring server
>>
>> I get the infamous error:
>>
>> Exception in thread "main" java.lang.RuntimeException: No reader function
>> for tag object, compiling::
>> at clojure.lang.Compiler.load(Compiler.java:7386)
>> at clojure.lang.Compiler.loadFile(Compiler.java:7317)
>> at clojure.main$load_script.invokeStatic(main.clj:275)
>> at clojure.main$init_opt.invokeStatic(main.clj:277)
>> at clojure.main$init_opt.invoke(main.clj:277)
>> at clojure.main$initialize.invokeStatic(main.clj:308)
>> at clojure.main$null_opt.invokeStatic(main.clj:342)
>> at clojure.main$null_opt.invoke(main.clj:339)
>> at clojure.main$main.invokeStatic(main.clj:421)
>> at clojure.main$main.doInvoke(main.clj:384)
>> at clojure.lang.RestFn.invoke(RestFn.java:421)
>> at clojure.lang.Var.invoke(Var.java:383)
>> at clojure.lang.AFn.applyToHelper(AFn.java:156)
>> at clojure.lang.Var.applyTo(Var.java:700)
>> at clojure.main.main(main.java:37)
>> Caused by: java.lang.RuntimeException: No reader function for tag object
>> at clojure.lang.LispReader$CtorReader.readTagged(LispReader.
>> java:1245)
>> at clojure.lang.LispReader$CtorReader.invoke(LispReader.java:
>> 1228)
>> .
>>
>> Using Windows 10, JDK 1.8_074
>>
>> Current project at:
>>
>> https://github.com/ajlopez/ClojureSamples/tree/master/Ring/helloring
>>
>> I tried other tutorials, examples, using the REPL is OK, but using the
>> plugin and lein ring server, does not work
>>
>> Notable, other ring plugin commands work, like lein ring uberjar
>>
>> Any cues??
>>
>> TIA
>>
>> Angel "Java" Lopez
>> @ajlopez
>>
>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> James Reeves
> booleanknot.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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: lambda detector?

2015-12-08 Thread Angel Java Lopez
Hi!

Sorry, this is not an answer, but a question: Why you need to know if an
argument is a lambda? What is your use case?

Angel "Java" Lopez
@ajlopez

On Tue, Dec 8, 2015 at 10:08 AM, Gregg Reynolds  wrote:

> Hi folks,
>
> Doing a little meta-programming.  I need a way to determine if an argument
> passed to a function is a lambda, i.e. created by #() or (fn...).
> Alternatively, I need a way to get at the metadata of a function's
> associated var, given only the function.
>
> The only method I've come up with so far is:
>
> (defmacro is-lambda? [f]
>   (cond
> (= (type f) clojure.lang.Cons) (= 'fn* (first f))
> (list? f) (= 'fn (first f))
> :else false))
>
> I'm not entirely confident that that will work in every case, though.  Is
> there a better way?
>
> Thanks,
>
> Gregg
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clojars down?

2016-01-01 Thread Angel Java Lopez
It's down here... chrome, page not available, from Buenos Aires, Argentina

On Fri, Jan 1, 2016 at 3:51 PM, Mimmo Cosenza 
wrote:

> it’s down here too.
>
> http://status.linode.com/
>
> mimmo
>
> On 01 Jan 2016, at 19:49, Bobby Eickhoff  wrote:
>
> Is anyone else having trouble connecting to clojars.org?  Firefox can't
> connect: "The connection has timed out".  Neither can lein:
>
> INFO: I/O exception (java.net.NoRouteToHostException) caught when
> processing request to {s}->https://clojars.org:443: No route to host
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Lessons Learned from Adopting Clojure

2014-02-04 Thread Angel Java Lopez
Interesting!

A question: did you abandon TDD? why?
IMO, TDD is a workflow that pushes for simplicity


On Tue, Feb 4, 2014 at 9:22 AM, Colin Yates  wrote:

> Is there going to be online access during/after the event?  I would
> greatly value seeing this, but probably not enough to travel from the UK to
> Chicago :).
>
>
> On Tuesday, 4 February 2014 12:06:06 UTC, Jay Fields wrote:
>>
>> tl; dr: I'm presenting "Lessons Learned from Adopting Clojure" in
>> Chicago on Feb 11th:
>> http://www.eventbrite.com/e/goto-night-with-jay-fields-
>> tickets-10366768283?aff=eorgf
>>
>> Five years ago DRW Trading was primarily a Java shop, and I was
>> primarily developing in Ruby. Needless to say, it wasn't a match made
>> in heaven. Fast forward five years, Clojure is the second most used
>> language in the firm, and the primary language for several teams
>> (including mine). Clojure wasn't the first language that I've
>> introduced to an organization; however, it's unquestionably the most
>> successful adoption I've ever been a part of. The use of Clojure has
>> had many impacts on the firm: culturally, politically, and
>> technically. My talk will discuss general ideas around language
>> selection and maintenance trade-offs, and specific examples of what
>> aspects of Clojure made it the correct choice for us.
>>
>> A few highlights
>>
>> - Where to first introduce a new language and your role as the
>> language care-taker.
>> - REPL driven development, putting TDD's 'rapid feedback' to shame.
>> - Operations impact of adding a language - i.e. get ready for some
>> DevOps.
>> - Functional programming, the Lisp Advantage, and their impact on
>> maintainability.
>>
>> Of course, no good experience report is all roses. The adoption has
>> seen several hurdles along the way, and I'll happily to describe those
>> as well.
>>
>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Lessons Learned from Adopting Clojure

2014-02-05 Thread Angel Java Lopez
+100

My English is "bad", but you expressed my position about TDD in general
(I'm not a clojurian, yet, but I really appreciate TDD workflow in other
technologies).


On Wed, Feb 5, 2014 at 6:35 PM, James Trunk  wrote:

> As a TDD practitioner and 
> Expectationsuser, I've been 
> following this thread with great interest!
>
> @Jay: Will your change in thinking have any impact on Expectations?
>
> My experience with TDD in Clojure has been an overwhelmingly positive one,
> and it seems like this thread might be a good place to discuss the subject
> with others.
>
> RDD is an invaluable tool for evolving the shape of your functions, and
> it's a killer feature for REPL-based languages like Clojure. However, I
> mainly use RDD in the refactoring stage of TDD, and I still choose the
> overhead of writing tests before coding my solutions. Why do I do that?
> Well, I experience a number of benefits from TDD:
>
>- A very clear separation of thinking between requirements and solution
>- A constant focus on delivering the Minimum Viable Product
>- Documentation, in English, of the expected behaviour of a function
>- Documentation, in code, of example inputs and expected outputs of a
>function (especially useful in a dynamic language like Clojure)
>- A continual reminder (and perfect opportunity) to refactor
>- A refactoring confidence boost (i.e. if all my tests are still
>green, then I can be pretty confident in that refactor)
>- The little bit of serotonin released in your brain when you make the
>next test turn green :-)
>- Finishing a session with a red test gives you a great starting point
>for your next session and often helps you to get straight back into "the
>zone"
>- A clear handover point if you're pair-programming
>
> It's clear that developers who don't use TDD can (and do) develop
> extremely high quality solutions. However, for me personally, the list of
> benefits from doing TDD outweigh the cost of writing and maintaining the
> tests. I am a better programmer when I use TDD. I prefer jumping into other
> people's codebases when they have used TDD. I find it easier to get back
> into one of my own old projects when I've used TDD.
>
> I also understand that most other programmers don't agree with me on this,
> which might mean that I'm wrong. :-)
>
> Cheers,
> James
>
> On Tuesday, February 4, 2014 1:06:06 PM UTC+1, Jay Fields wrote:
>>
>> tl; dr: I'm presenting "Lessons Learned from Adopting Clojure" in
>> Chicago on Feb 11th:
>> http://www.eventbrite.com/e/goto-night-with-jay-fields-
>> tickets-10366768283?aff=eorgf
>>
>> Five years ago DRW Trading was primarily a Java shop, and I was
>> primarily developing in Ruby. Needless to say, it wasn't a match made
>> in heaven. Fast forward five years, Clojure is the second most used
>> language in the firm, and the primary language for several teams
>> (including mine). Clojure wasn't the first language that I've
>> introduced to an organization; however, it's unquestionably the most
>> successful adoption I've ever been a part of. The use of Clojure has
>> had many impacts on the firm: culturally, politically, and
>> technically. My talk will discuss general ideas around language
>> selection and maintenance trade-offs, and specific examples of what
>> aspects of Clojure made it the correct choice for us.
>>
>> A few highlights
>>
>> - Where to first introduce a new language and your role as the
>> language care-taker.
>> - REPL driven development, putting TDD's 'rapid feedback' to shame.
>> - Operations impact of adding a language - i.e. get ready for some
>> DevOps.
>> - Functional programming, the Lisp Advantage, and their impact on
>> maintainability.
>>
>> Of course, no good experience report is all roses. The adoption has
>> seen several hurdles along the way, and I'll happily to describe those
>> as well.
>>
>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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

Re: Why I'm giving Clojure a try

2014-04-17 Thread Angel Java Lopez
Hi Massimiliano!

I read you at Scala list. Short comment: there is a clojurescript
googlegroup, too.

Angel "Java" Lopez
@ajlopez


On Thu, Apr 17, 2014 at 8:31 AM, Massimiliano Tomassoli
wrote:

> On Thursday, April 17, 2014 2:17:13 AM UTC+2, Zhemin Lin wrote:
>>
>> Hi Massimiliano,
>> You may also want to give ClojureScript or LiveScript (which compiles to
>> JavaScript and run on node.js) a try!
>> LiveScript is quite functional and the callback hell is somewhat eased.
>>
>
> Well, ClojureScript is the main reason why I'm studying Clojure right now.
> LiveScript looks interesting, but I've made up my mind: I'll learn my first
> Lisp dialect!
> One of the things I miss from Scala and Haskell, and wish were present in
> Clojure, is pattern matching. I'll have a look at core.match hoping it's
> mature enough.
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Basic question: metadata reader

2014-05-03 Thread Angel Java Lopez
I'm trying to implement in my clojure interpreter (in c#) the metadata
reader. I read in core.clj something like

(ns ^{:doc "The core Clojure language."
   :author "Rich Hickey"}
  clojure.core)

I just read:

http://clojure.org/reader


   - Metadata (^)
   Metadata is a map associated with some kinds of objects: Symbols, Lists,
   Vector, Sets, Maps, tagged literals returning an IMeta, and record, type,
   and constructor calls. The metadata reader macro first reads the metadata
   and attaches it to the next form read (see
with-meta<http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/with-meta>
to
   attach meta to an object):
   ^{:a 1 :b 2} [1 2 3] yields the vector [1 2 3] with a metadata map of
   {:a 1 :b 2}.


Ok, but how the reader works?

I tried

(def one 1)

^:foo one

and it works

But i tried

^:foo bar

and it yields an error (Unable to resolve the symbol bar...)

But then

(ns ^:foo bar)

IT WORKS!

Where the attached form to metadata is evaluated?

I thought that

^:foo bar

was expanded as

(with-meta bar {:foo true})

in the same way like

'a

is expanded to

(quote a)

and then (with-meta bar {:foo true}) is passed to ns.

I know that ns is a macro. So the attachment of the metadata is not yet
evaluated. But when it is evaluated? Is it true that ns receives (with-meta
bar {:foo true})? Or in which way the ^ reader works?

I checked ns source
https://github.com/clojure/clojure/blob/028af0e0b271aa558ea44780e5d951f4932c7842/src/clj/clojure/core.clj#L5304but
apparently it is some magic detecting the metadata

Any clue?

Angel "Java" Lopez
@ajlopez

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Basic question: metadata reader

2014-05-03 Thread Angel Java Lopez
Ah!

Thanks to all.

Yes, I was a bit confused, thinking ^ expands as ' (quote), to use
(with-meta..). But there is not expansion. It really applies the map to the
next read form, expecting the read form implements IObj:

public interface IObj extends IMeta {

public IObj withMeta(IPersistentMap meta);

}

So. ^{  } applied to a symbol, returns a new symbol. From Symbol.java:


public IObj withMeta(IPersistentMap meta){
return new Symbol(meta, ns, name);
}

I have seen the light! ;-)

Time to refactor my code, TDD will save my day

Angel "Java" Lopez
@ajlopez






On Sat, May 3, 2014 at 6:51 PM, Stephen Gilardi  wrote:

> I just read:
>
>
> http://clojure.org/reader
>
>
>- Metadata (^)
>Metadata is a map associated with some kinds of objects: Symbols,
>Lists, Vector, Sets, Maps, tagged literals returning an IMeta, and record,
>type, and constructor calls. The metadata reader macro first reads the
>metadata and attaches it to the next form read (see 
> with-meta<http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/with-meta>
>  to
>attach meta to an object):
>^{:a 1 :b 2} [1 2 3] yields the vector [1 2 3] with a metadata map of
>{:a 1 :b 2}.
>
>
> Ok, but how the reader works?
>
>
> The description above is literally how it works: "The metadata reader
> macro first reads the metadata and attaches it to the next form read”.
>
> Reader macros are implemented within the reader. They are distinct from
> defmacro macros.
>
> The implementation is here:
>
> https://github.com/clojure/clojure/blob/clojure-1.6.0/src/jvm/clojure/lang/LispReader.java#L706
>
> The reader reads from an input stream; it:
>
>   - reads the metadata object, meta [L716]
>   - reads the object that follows it, o [L724]
>   - figures out how to apply meta to o based on the interface(s) o
> implements [L725.L731]
>   - applies meta to o [L733,L741]
>
> —Steve
>
>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: non-literate, excellent documentation style

2014-05-25 Thread Angel Java Lopez
Yes, it is based on docco
http://jashkenas.github.io/docco/
Check
https://github.com/jashkenas/backbone/blob/master/package.json
the doc scripts is
"doc": "docco backbone.js && docco examples/todos/todos.js
examples/backbone.localstorage.js",


On Sun, May 25, 2014 at 4:51 PM, Marek Srank wrote:

> Based on the name of the css file I'd say they use
> http://jashkenas.github.io/docco/ ;)
>
> Marek
>
>
> On Sunday, May 25, 2014 9:45:19 PM UTC+2, da...@axiom-developer.org wrote:
>>
>> Giving my LP horse a rest I'd like to call your attention
>> to backbone.js and the way they arrange documentation.
>>
>> It is less of a "story" form or "why" explanation and
>> more on the details which are not apparent in the code.
>>
>> I don't know what tool was used to create it.
>>
>> http://backbonejs.org/docs/backbone.html
>>
>> 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.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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Macro and metadata

2014-05-25 Thread Angel Java Lopez
I see that macro are defined with associated metadata :macro true in its
associated var.

Evaluate:

(meta (var defn))

and you see the :macro true in metadata

Why? In other lisp, macro are the result of evaluate (mlambda ... ) or
something alike, that is, macro are values that are evaluated in an special
way, as special forms (no evaluation of arguments) and then, the result is
evaluated. Normal functions are (lambda  ) like (fn  ) in Clojure.
As macros are values, they can be passed as arguments (map amacro )
could be evaluated (I guess). In Clojure, you must write (map (var amacro)
... )

Why in Clojure the macro are defined using metadata, instead of something
like (mlambda ... ) or (mfn ... )?

My first guess: this way of doing macro was related with compile to Java

Angel "Java" Lopez
@ajlopez

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Library (or libraries) for translating REST queries to database queries?

2013-09-24 Thread Angel Java Lopez
U... OData maybe a bit overwhelming, but I guess it is in your direction

http://www.odata.org/

There is an implementation in Java
https://code.google.com/p/odata4j/
(apparently with consumers and producers, too)

There is an experimental Clojure project consuming odata4j
https://github.com/danbev/odata_test
Don't sure if it implements a consumer

But I insist, odata is a bit overwhelming...

Something more simple?

Angel "Java" Lopez
@ajlopez




On Tue, Sep 24, 2013 at 10:35 AM, Bill Piel  wrote:

> I want to use clojure to build a web service with a RESTful API that
> exposes resources stored in a relational database (mysql in this case). I'd
> like to use a library that, given a specification of the db schema, would
> translate incoming requests to db queries, or korma constructs.
>
> Examples might be:
>
> GET /users?status=4
>
> translates to something like:
>
> SELECT * FROM `users` WHERE `status` = 4;
>
> or:
>
> PUT /users/12
>
> would be:
>
> UPDATE `users` SET ... WHERE `id` = 12
>
> Is there anything out there that would facilitate this?
>
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-24 Thread Angel Java Lopez
+1


On Tue, Sep 24, 2013 at 9:00 PM, Mark Engelberg wrote:

> I used CLIPS (another forward-chaining rule system) for several years, and
> the way I tend to explain it to people is that it is the best tool for the
> job when your code would look like an enormous cond with thousands of
> cases, executed over and over, because:
>
> 1.  The Rete algorithm can "jump to the right branch" more efficiently
> than testing each case one by one in some linear order.
> 2.  When you have thousands of cases, it can be difficult to ensure that
> they are in exactly the right order and/or don't overlap.  Forward-chaining
> systems let you express the cases more declaratively and apply precedence
> rules judiciously rather than thinking about precedence all the time.
>
> I think a forward-chaining system would also make a great foundation for a
> project that requires some sort of dataflow architecture.
>
> I agree with Ryan that it tends to be useful in different contexts than
> constraint solvers.
>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Semi OT] Staples Acquires Runa to Transform Shopping Experience Through Personalization

2013-10-02 Thread Angel Java Lopez
http://online.wsj.com/article/PR-CO-20131002-904169.html
The Runa facility in San Mateo will serve as the newest Staples Lab,
following locations in Seattle and Cambridge. In the coming months Staples
plans to increase the staff in San Mateo. Candidates with backgrounds in
Clojure programming, deep learning and data science who are interested in
applying are encouraged to check Staples' careers page to view openings.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Clojure at Netflix by Dave Ray

2013-10-03 Thread Angel Java Lopez
https://speakerdeck.com/daveray/clojure-at-netflix

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-08 Thread Angel Java Lopez
Short comment in bad English:

I found that TDD is the great equalizer btw "dynamic and static" languages.
I don't have any trouble writing code in dynamic language wo/code
completion, etc.. if I wrote "baby steps" using TDD. And then, the dynamic
nature (less ceremony, etc...) starts to shine.

I use typed language for performance reasons.

Angel "Java" Lopez
@ajlopez



On Tue, Oct 8, 2013 at 11:48 AM, Phillip Lord
wrote:

> "John D. Hume"  writes:
>
> > On Oct 8, 2013 5:35 AM, "Phillip Lord"
> >> > I'm not sure a type checker will help in that instance.
> >>
> >>
> >> A type-checker wouldn't no, but a type system would; pretty much
> >> every language with a static type system has a type based dispatch
> >> somewhere. It would be nice to be able to do
> >>
> >> (defun fn
> >>   ([^vector v] ...)
> >>   ([^list l] ...)
> >>   ([else] ...)
> >
> > How is Clojure's protocols feature different from what you're describing?
>
> Yeah, I picked a bad example, following on from the previous.
>
> I was thinking where the classes are defined in Java and there are
> several of them -- class based overloading in otherwords.
>
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Angel Java Lopez
And JavaScript is missing (OK, "a dozen scripting language")
But today, JavaScript is very important in the picture.
Even Clojure has ClojureScript


On Wed, Oct 9, 2013 at 8:36 AM, Dennis Haupt  wrote:

> especially haskell & scala are missing in your list :)
> as long as you haven't at least seen haskell, you haven't seen the creme
> de la creme of statically typed languages
>
>
> 2013/10/9 Softaddicts 
>
>> Let's see:
>>
>> strong data typing:
>>
>> Fortran
>> Cobol
>> Pl/1
>> Pascal
>> C/C++
>> Java
>> C#
>> Ruby
>>
>> à la carte data typing or no data typing at all:
>>
>> Basic (more or less depending on the implementation)
>> Lisp
>> Clojure
>> A dozen assemblers
>> A dozen scripting languages
>>
>> And I probably forgot some while excluding the ones I worked with
>> (Algol, Simula, GPSS, ...) in academic projects. I used the above ones
>> on real projects at work and not small projects.
>>
>> Lets keep SQL out of the picture, it's an exaggeration to call this a
>> programming
>> language.
>>
>> Still prefer less data typing or no typing at all :)
>>
>> Luc P.
>>
>>
>> > let's see...
>> > really used:
>> > sql
>> > java
>> > javascript
>> > basic
>> > pascal/delphi
>> > scala
>> >
>> > experimented with:
>> > logo (some old language intended to teach people to make their first
>> steps)
>> > haskell
>> > kotlin
>> > clojure
>> >
>> > seen in action:
>> > php
>> > groovy
>> >
>> > still prefer smart static typing :D
>> >
>> >
>> >
>> >
>> > 2013/10/9 Nando Breiter 
>> >
>> > >
>> > >> The best explanation of these misunderstandings I've come across is
>> "What
>> > >> to Know Before Debating Type Systems":
>> > >>
>> > >> http://cdsmith.wordpress.com/2011/01/09/an-old-article-i-wrote/
>> > >>
>> > >>
>> > > I have learned quite a lot from reading this article and following
>> this
>> > > discussion, particularly that "type" and "type checking" is much more
>> > > nuanced and complex than I have understood until now, and that the
>> terms
>> > > "static" and "dynamic" expand into a much larger range of issues upon
>> close
>> > > examination, such as the difference between explicitly declaring
>> types (as
>> > > in Java) and implicitly inferring types from code context. Quoting
>> from the
>> > > article:
>> > >
>> > > *Many programmers approach the question of whether they prefer static
>> or
>> > > dynamic types by comparing some languages they know that use both
>> > > techniques. This is a reasonable approach to most questions of
>> preference.
>> > > The problem, in this case, is that most programmers have limited
>> > > experience, and haven’t tried a lot of languages. For context, here,
>> six or
>> > > seven doesn't count as “a lot.”*
>> > > *
>> > > *
>> > >
>> > > So I can say I prefer dynamic typing, but the reasons are more
>> personal,
>> > > and molded by my development experience.
>> > >
>> > > --
>> > > --
>> > > 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 unsubscribe from this group and stop receiving emails from it,
>> send an
>> > > email to clojure+unsubscr...@googlegroups.com.
>> > > For more options, visit https://groups.google.com/groups/opt_out.
>> > >
>> >
>> > --
>> > --
>> > 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 unsubscribe from this group and stop receiving emails from it, send
>> an email to clojure+unsubscr...@googlegroups.com.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> --
>> Softaddicts sent by ibisMail from my ipad!
>>
>> --
>> --
>> 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

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Angel Java Lopez
Oh!

I don't hate JavaScript ;-)

I'm not a Clojure programmer, (and not a ClojureScript programmer). But I
usually program in C#, Java, PHP and JavaScript. I know Lisp, Ruby and
Python, but I don't "work" with them, only toy projects.

I found JavaScript the most flexible programming language (less ceremony
than Ruby or Python), and combined with Node.js at server, browsers at
client, JSON for messaging, and TDD, it shines!

Any quirk on JS language is easy to circumvent (ie. using module pattern,
build and exercised with TDD), and IMO, it pays a lot to use it.

Angel "Java" Lopez
@ajlopez



On Wed, Oct 9, 2013 at 9:26 AM, Softaddicts wrote:

> Yeah but I hate JavaScript so no wonder it's not on the list.
> I do however code in ClojureScript and avoid JS interop like
> the plague as much as possible :)
>
> I had to deal too much with browser based GUIs before things like JQuery
>
> and similar things came to life or because the back end framework did not
> allow me to use something more brilliant than plain JS... it got me
> disgusted
> pretty much.
>
> ClojureScript has changed my approach to browser based apps but
> w/o JS as much as possible, now I can conceal my app logic in the
> browser while using the back end as a resource provider.
>
> No more Dr Jekyll and Mr Hide syndrom...
>
> Luc P.
>
>
> > And JavaScript is missing (OK, "a dozen scripting language")
> > But today, JavaScript is very important in the picture.
> > Even Clojure has ClojureScript
> >
> >
> > On Wed, Oct 9, 2013 at 8:36 AM, Dennis Haupt 
> wrote:
> >
> > > especially haskell & scala are missing in your list :)
> > > as long as you haven't at least seen haskell, you haven't seen the
> creme
> > > de la creme of statically typed languages
> > >
> > >
> > > 2013/10/9 Softaddicts 
> > >
> > >> Let's see:
> > >>
> > >> strong data typing:
> > >>
> > >> Fortran
> > >> Cobol
> > >> Pl/1
> > >> Pascal
> > >> C/C++
> > >> Java
> > >> C#
> > >> Ruby
> > >>
> > >> à la carte data typing or no data typing at all:
> > >>
> > >> Basic (more or less depending on the implementation)
> > >> Lisp
> > >> Clojure
> > >> A dozen assemblers
> > >> A dozen scripting languages
> > >>
> > >> And I probably forgot some while excluding the ones I worked with
> > >> (Algol, Simula, GPSS, ...) in academic projects. I used the above ones
> > >> on real projects at work and not small projects.
> > >>
> > >> Lets keep SQL out of the picture, it's an exaggeration to call this a
> > >> programming
> > >> language.
> > >>
> > >> Still prefer less data typing or no typing at all :)
> > >>
> > >> Luc P.
> > >>
> > >>
> > >> > let's see...
> > >> > really used:
> > >> > sql
> > >> > java
> > >> > javascript
> > >> > basic
> > >> > pascal/delphi
> > >> > scala
> > >> >
> > >> > experimented with:
> > >> > logo (some old language intended to teach people to make their first
> > >> steps)
> > >> > haskell
> > >> > kotlin
> > >> > clojure
> > >> >
> > >> > seen in action:
> > >> > php
> > >> > groovy
> > >> >
> > >> > still prefer smart static typing :D
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > 2013/10/9 Nando Breiter 
> > >> >
> > >> > >
> > >> > >> The best explanation of these misunderstandings I've come across
> is
> > >> "What
> > >> > >> to Know Before Debating Type Systems":
> > >> > >>
> > >> > >> http://cdsmith.wordpress.com/2011/01/09/an-old-article-i-wrote/
> > >> > >>
> > >> > >>
> > >> > > I have learned quite a lot from reading this article and following
> > >> this
> > >> > > discussion, particularly that "type" and "type checking" is much
> more
> > >> > > nuanced and complex than I have understood until now, and that the
> > >> terms
> &

Re: How to go about 'proving' why dynamically typed languages are better.

2013-12-23 Thread Angel Java Lopez
About:

" The question, then, is whether the flexibility of
dynamic types lets you develop, test, unit test, and system test code
so much faster than you would in a language with strong static types
that you are able to prevent all runtime type errors anyway."

Yes! In the past years, I coded in typed languages (Java, C#), and in
dynamic language (JavaScript). And dynamic language (using TDD) is faster
and more solid, in my experience.

The key part is TDD: it is the new compiler. It catch the errors, but not
the type errors, but the behavior errors. And to me, this feature is more
important.

I only would switch to typed language for efficiency reasons, or some
specialized domain.


On Mon, Dec 23, 2013 at 6:40 PM, Michael Swierczek  wrote:

> >
> > Agreed -- which is why I find your speculation about "lightening up" with
> > "more experience ... meeting the demands of practical coding" to be
> unsound.
> > For those of us whose "practical programming" context includes a high
> cost
> > associated with most any runtime bug, greater embrace of static typing,
> not
> > "lightening up", comes with more practical experience.  I can be happy
> using
> > a dynamically typed language when the price to be paid for getting it
> wrong
> > isn't as high; but all of my experience goes against "lightening up" in
> the
> > demanding programming context where I work every day
>
> We're arguing in circles.  I think the fundamental question is between
> two issues.  On the potential drawback of strong static types, you
> have trying to model all of the complex interlocking concepts in a
> static type system and possibly dealing with long compile times.  On
> the potential drawback of dynamic typing, you have the risk of a
> runtime type error.  The question, then, is whether the flexibility of
> dynamic types lets you develop, test, unit test, and system test code
> so much faster than you would in a language with strong static types
> that you are able to prevent all runtime type errors anyway.
>
> The difficulty in deciding the question is that the benefits and
> drawbacks of either approach don't really manifest until your project
> is huge.  It's relatively straightforward to get your dynamic typing
> right in a 500 line program, and it's relatively straightforward to
> not have any issues modeling your logic and data with static types in
> a 500 line program, and the speed difference in development between
> the two isn't significant.   Once you get to hundreds of thousands of
> lines of code, things get interesting - and it also gets much harder
> to compare between the two.
>
> If you look at Youtube, Reddit, Twitter, Github, Tumblr, and Facebook,
> they were written in languages with dynamic types.  A lot of them
> switched partly or totally to languages with static types for
> performance reasons once they got big enough.  But I really think they
> stand as testimonial to the fact that dynamic types allow for faster
> development than static types.  If you're guiding a rocket or
> controlling medical equipment, stay static.  But for other use cases,
> that's a pretty compelling case.
>
> -Mike
>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Java interoperability

2014-01-27 Thread Angel Java Lopez
Ummm... the methods has a generic T parameter, ie
https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L446

Any way to invoke them, from Clojure?


On Mon, Jan 27, 2014 at 12:27 PM, Sam Ritchie  wrote:

> Where do you see that method?
>
>
> https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
>
> Perusing the code, it looks like it doesn't exist.
>
>   Paul Smith 
>  January 27, 2014 8:21 AM
> Hi,
>
> I am attempting to use Java interoperability.
>
> I have downloaded a dependency through Leiningen
>
> [com.jayway.jsonpath/json-path "0.9.1"]
>
> I import the dependency into a namespace
>
> (:import (com.jayway.jsonpath JsonPath)
>
> The Java class, JsonPath has a static method 'read' that takes two
> strings as arguments.
>
> However, when I try to evaluate this expression
>
> (JsonPath/read "" "")
>
> I receive " java.lang.IllegalArgumentException: No matching method: read"
>
> I am unsure on what I am doing wrong here?
>
> Many Thanks
>
> Paul
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> Sam Ritchie (@sritchie)
> Paddleguru Co-Founder
> 703.863.8561
> www.paddleguru.com
> Twitter  // 
> Facebook
>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<>

Re: Why is this so difficult?

2013-02-15 Thread Angel Java Lopez
Hi people!

Sean, thanks for your landscape description of Clojure world. I'm a lurker
in this list, since +-2009. In the past year, I was showing Clojure in
programmer talks, using my Windows machine, and I have no major problem,
using plain command line with clojure jar, and then, lein. I don't use
Clojure for serious work, yet.

But I want to add something:

- The machine distribution you describe, is approximately equal to I found
when I talk about Node.js (again, using my Windows machine).
- But the node.js world, has a simple install for Linux, Mac/OS, and
Windows.
- There is few friction in Windows world for Node.js (at least, for
development). Even native modules can be downloaded and compiled
automatically at local environment.
- NPM (node package manager) is a beautiful tool. Maybe, the best package
manager I met.

After my Node.js experience, I expect the same out-of-the-box development
experience. I'm a bit oldie: I want to program, not struggle with config
mess.

Again, I had no problem with clojure experience. But I only play with it. I
put my Node.js experience as an example of multiplaform dev experience.
Maybe, current Clojure status is the same.

Angel "Java" Lopez
@ajlopez
gh:ajlopez

On Fri, Feb 15, 2013 at 1:01 AM, Sean Corfield wrote:

> On Thu, Feb 14, 2013 at 6:56 PM, Jules  wrote:
> > vemv, here is a file describing my Clojure install experience:
> > https://www.dropbox.com/s/ln2ek5f5n47qnl1/clojureinstall.odp
> >
> > How should I continue? And where would a beginner find that information?
>
> The problem is the Clojure world, for the most part, is all Mac and
> Linux - Windows is very much a second class citizen that very few
> Clojurians use at all. I surveyed the Bay Area Clojure Meetup members.
> 53 responded. Just 3 of them said they used Windows. Go to a Clojure
> conference and it'll be mostly Macs and almost all of the rest will be
> running Linux.
>
> That means all the tools, all the instructions, all the thinking, is
> focused on the command line and comes from a world where developers
> know that installed software has to go on your path, which usually
> means editing a dot file in your home directory, updating the PATH
> variable and sourcing the dot file to pick up the changes. It also
> means that the primary Clojure website is aimed at those kind of
> developers and, more specifically, aimed at experienced developers on
> those platforms who can pick thru the minimalist information and
> variety of links scattered everywhere. The fact is: clojure.org is NOT
> beginner friendly :(
>
> Leiningen - the primary build tool - is a shell script. Clojure is a
> library - a JAR file - and using Clojure relies (under the hood) on a
> local Maven repository and then declaring and fetching dependencies
> from various known repositories. Leiningen makes all that much simpler
> than the raw tools. But it doesn't make it as simple as most Windows
> users expect.
>
> Having set up a dozen or so Clojure development environments on a
> variety of Mac, Linux and Windows, here's what I recommend for
> Windows:
>
> * Start with GOW - Gnu on Windows - so that you have the basic Linux
> toolset that is so familiar to most Clojurians:
> https://github.com/bmatzelle/gow/downloads
> * It installs curl and wget (and a bunch of other very useful stuff)
> and adds it to your path directly! Read more here:
> https://github.com/bmatzelle/gow/wiki
> * Download the Leiningen Windows batch file. I put mine in C:\LEIN and
> then added C:\LEIN to my Path environment variable (in the system
> environment variables)
> * Start a new cmd shell window (or Powershell if you're that way
> inclined) and type: lein self-install
>
> At least at this point you can create new Clojure projects, edit
> project.clj with your favorite editor to add dependencies, and use
> lein repl in a cmd shell to experiment with those libraries.
>
> As others have said, try Clooj if you really have no idea about the
> command line or the Java ecosystem. Try LightTable once you've
> installed Leiningen and created a project to play with.
>
> If you're a Java developer on Windows, you're probably using Eclipse
> or IntelliJ so install the Clojure plugin and use that.
>
> If you're brave, try Emacs - that's what most Clojurians use and it
> really does have the most integrated overall workflow, especially with
> a built-in shell, IRC client and various other goodies.
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> --
> You

Re: Metadata evaluation

2013-03-19 Thread Angel Java Lopez
Ummm... Jean, I don't understand.

Recapitulation. As Herwig showed, the symbol has its metadata WITHOUT
evaluation:

user=> (meta (second (read-string "(def ^{:key (+ 1 1)} foo)")))
{:key (+ 1 1)}

"second", in the above expression, retrieves the symbol "foo", and reader
already set its metadata WITHOUT evaluation.

AFAIK, def is an special form (a built-in one? not a defined macro?), so,
it receives the symbol, foo, as is, without evaluating it, nor its
metadata, nothing more. No lisp evaluator yet.

Something inside def work, ACTIVELY get the symbol metadata, AND EVALUATES
it, and assign it to the var the def is defining. AFAIK, getting the
metadata of something, doesn't imply automatically its evaluation, as
Herwig example shows us.

This interpretation is aligned with:

http://clojure.org/special_forms
Any metadata on the symbol will be evaluated, and become metadata on the
var itself

that explicitly asserts that some evaluation will be conducted.

Am I right?

Angel "defandmetadata" Lopez :-)

On Tue, Mar 19, 2013 at 12:16 PM, Jean Niklas L'orange <
jeann...@hypirion.com> wrote:

>
>
> On Tuesday, March 19, 2013 11:49:45 AM UTC+1, ajlopez wrote:
>>
>> Thanks Jean!
>>
>> Yes, I did that test before my email.
>>
>> But my doubt is:
>>
>> What part is in charge of metadata evaluation?
>>
>
> As Herwig commented: The part which evaluates metadata is without doubt
> the lisp evaluator's work, the def macro does nothing magical here.
>
> A simple test to ensure that follows:
> (meta ^{:a (+ 1 1)} [:a :b])
> ;=> {:a 2}
>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Utility libraries and dependency hygiene

2013-05-12 Thread Angel Java Lopez
Only a lateral quick comment:

Node.js + NPM (its package manager) has a nice version management.

If your module A needs D version 0.1, and module B needs D version 0.2, no
problem. Both versions are added, and A loads version 0.1, meanwhile B
loads version 0.2. The trick is the search path for modules: each module
has its own subfolder for dependencies

I guess it could be difficult to implement such feature in Java/Clojure

Angel "Java" Lopez
@ajlopez



On Sun, May 12, 2013 at 8:29 PM, Stuart Sierra
wrote:

> Based on a recent thread about "utility" libraries, I would like to
> take this opportunity to ask everyone to help us avoid the dependency
> mess that Common Lisp has gotten into, where there are over a dozen
> such "convenience" libraries[1].
>
> By all means, use these libraries in your *applications* if you find
> them useful. But please don't make your *libraries* depend on them
> unless you really need to.
>
> Doing this will help application developers who want to use your
> library. For example, if my application depends on libraries A, B, and
> C, I might end up with transitive dependencies on three different
> "utility" libraries. If I want to add library D which depends on an
> incompatible version of one of those utilities, I'm stuck. By
> adding to the dependencies of your library, you increase the
> likelihood of dependency conflicts for consumers.
>
> The ideal number of dependencies for a library release (not counting
> Clojure itself) is zero. Obviously, use common sense. If your library
> relies on critical functionality in another library, then make the
> dependency. But if you can get by without the dependency (even if that
> means copying some of those "utility" functions into your own code and
> making them private) then you will make life easier for consumers of
> your library.
>
> Thanks, and happy coding.
> -S
>
>
> [1]: http://cliki.net/Convenience%20library
>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Newb Question

2010-06-28 Thread Angel Java Lopez
Hi people!

Any way to produce a lazy seq of chars, that prints as a string, based on
two parameters, n (number of repeats), text (text to repeat)?

Then, something like

(myrepeat 100 "superdupertext")

could be implemented without a big processing or concatenation.

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Mon, Jun 28, 2010 at 3:14 PM, Nurullah Akkaya wrote:

> Hi José,
>
> user=> (apply str (repeat 3 "code"))
> "codecodecode"
>
> will give you what you want,
> if we break it down,
>
> user=> (repeat 3 "code")
> ("code" "code" "code")
>
> repeat will give you a sequence of xs,
> since you don't know the length of the
> sequence at compile time we apply str
> to the sequence
>
> (apply str '("code" "code" "code"))
>
> which basically expands to,
>
> (str "code" "code" "code")
>
> then you get,
>
> "codecodecode"
>
>
> --
> Nurullah Akkaya
> http://nakkaya.com
>
>
>
> 2010/6/27 José Luis Romero :
> > Hi! I am learning the core of clojure, and so far, I am loving it. But
> > I am not a lisp programmer (python, java, among others), but never
> > functional programming. I am practicing with codingbat.com, coding the
> > exercises on clojure. I am stuck with loops. I want to concatenate n
> > times a string. For example, given the parameters 3 and "code" the
> > output will be "codecodecode". How can I do a loop in order to get
> > this output.
> >
> > I know that this is a very newb question, any help will be
> > appreciated.
> >
> > --
> > 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: Newb Question

2010-06-29 Thread Angel Java Lopez
Hi people!

Paul, yes! but...

The apply and str evaluations in (apply str (repeat n text))
are lazy?

I guess the result could be a big string.  Isn't it?

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Mon, Jun 28, 2010 at 5:31 PM, Paul Moore  wrote:

> On 28 June 2010 20:24, Angel Java Lopez  wrote:
> > Hi people!
> >
> > Any way to produce a lazy seq of chars, that prints as a string, based on
> > two parameters, n (number of repeats), text (text to repeat)?
> >
> > Then, something like
> >
> > (myrepeat 100 "superdupertext")
> >
> > could be implemented without a big processing or concatenation.
>
> The built in repeat is lazy:
>
> user=> (doc repeat)
> -
> clojure.core/repeat
> ([x] [n x])
>  Returns a lazy (infinite!, or length n if supplied) sequence of xs.
>
> Paul.
>
> --
>

-- 
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: usage examples in clojure api docs

2010-06-29 Thread Angel Java Lopez
Hi people!

I love PHP documentation

http://www.php.net/manual/en/

and its function reference:
http://www.php.net/manual/en/funcref.php

Each function has a dedicated page, with detailed description, initial
examples. And visitors can add new examples or limit cases. Example:

http://www.php.net/manual/en/function.array-combine.php

And the documentation can be built in .pdf and other formats. I never need
an irc channel or send an email in a list to understand a function. Maybe
for other topics, but not to understand a function.

That's the level of function documentation to match, I guess. And it's
pretty good in the non-function part: good explanation of language and its
usage.

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Tue, Jun 29, 2010 at 1:06 AM, cageface  wrote:

> Several people have suggested that usage examples in the docs would be
> helpful and this is something I often find myself wishing for. Are
> patches introducing examples welcomed by the core team?
>
> --
> 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: Apply/Laziness question (was Re: Newb Question)

2010-06-29 Thread Angel Java Lopez
Hi people!

Hmmm (str (repeat )) doesn't concatenate the repeated values.

As (str ("f" "o" "o")) doesn't return "foo", it returns "("f" "o" "o")" the
stringified sequence.

But (apply str '("f" "o" "o")) returns "foo", as expected in the initial
question.

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Mon, Jun 28, 2010 at 3:31 PM, Savanni D'Gerinel wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Along those lines, why is the apply necessary?
>
> More clearly, and I encountered this with a different block of code
> earlier today, repeat returns a lazy sequence.  Str does nothing to
> evaluate that sequences, so (str (repeat ...)) returns a lazy sequence.
>
> Why does (apply str (repeat ...)) evaluate the sequence?  The
> documentation for apply does not mention that it will do so.
>
> Generally I am having a lot of trouble with sequences because I am never
> clear on when a lazy sequence will be evaluated strictly.
>
> - --
> Savanni
>
>
> On 06/28/2010 01:14 PM, Nurullah Akkaya wrote:
> > Hi José,
> >
> > user=> (apply str (repeat 3 "code"))
> > "codecodecode"
> >
> > will give you what you want,
> > if we break it down,
> >
> > user=> (repeat 3 "code")
> > ("code" "code" "code")
> >
> > repeat will give you a sequence of xs,
> > since you don't know the length of the
> > sequence at compile time we apply str
> > to the sequence
> >
> > (apply str '("code" "code" "code"))
> >
> > which basically expands to,
> >
> > (str "code" "code" "code")
> >
> > then you get,
> >
> > "codecodecode"
> >
> >
> > --
> > Nurullah Akkaya
> > http://nakkaya.com
> >
> >
> >
> > 2010/6/27 José Luis Romero :
> >> Hi! I am learning the core of clojure, and so far, I am loving it. But
> >> I am not a lisp programmer (python, java, among others), but never
> >> functional programming. I am practicing with codingbat.com, coding the
> >> exercises on clojure. I am stuck with loops. I want to concatenate n
> >> times a string. For example, given the parameters 3 and "code" the
> >> output will be "codecodecode". How can I do a loop in order to get
> >> this output.
> >>
> >> I know that this is a very newb question, any help will be
> >> appreciated.
> >>
> >> --
> >> 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
> >>
> >
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkwo6pEACgkQZIuDAZ4avD+JiQCgkiZg4ADytAL7ujIjq3S/73Up
> msoAn0Z28vIwjTUXZb9bAN5o8LyDBUja
> =I0Ni
> -END PGP SIGNATURE-
>
> --
> 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: cool compiler-project?

2010-08-18 Thread Angel Java Lopez
Hi people!

Related to Clojure to Javascript

http://github.com/richhickey/clojure-contrib/tree/master/clojurescript/

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Wed, Aug 18, 2010 at 7:37 PM, Jules  wrote:
> Or a Clojure to Javascript compiler. So many interesting projects!
>
> On Aug 19, 12:36 am, Jules  wrote:
>> > so presumably the Clojure compiler does
>>
>> not include an optimizer.
>>
>> So write an optimizing Clojure compiler! Or do type inference for
>> Clojure. Or partial evaluation. Or a compiler that targets LLVM.
>>
>> On Aug 18, 10:46 pm, ".Bill Smith"  wrote:
>>
>>
>>
>> > While I think Clojure is an impressive achievement, I would not have
>> > thought that the Clojure compiler  (or Lisp compilers in general)
>> > would be interesting for a post-grad student to work on.  After all,
>> > Lisps are known for their simple syntax and grammar, and Clojure
>> > compiles to Java byte codes, so presumably the Clojure compiler does
>> > not include an optimizer.
>>
>> > Bill Smith
>> > Austin, Texas
>>
>> > On Aug 18, 7:35 am, Sreeraj a  wrote:
>>
>> > > Hi,
>> > > I am a post-grad student looking for a cool compiler - project to do.
>> > > I am getting comfortable with clojure and would really like to help
>>
>> > > Ideas anyone?
>> > > or, Is there a to-do list where can i start?
>>
>> > > Cheers
>> > > Sreeraj
>
> --
> 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: ¿Clojure en España? - Clojure in Spain?

2010-09-03 Thread Angel Java Lopez
There is a list
http://groups.google.com/group/clojure-hispano
low traffic, but I hope more Spanish developers will participate in
discussions.

I guess @hhariri is research about Clojure in Spain.

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Fri, Sep 3, 2010 at 11:34 AM, soyrochus wrote:

> ¿Hay alguien que están utilizando Clojure,  profesionalmente o de otro
> tipo,  en España? Si es así, tal vez podríamos poner algo en marcha,
> como un encuentro o el comienzo de un grupo de usuarios de Clojure .
> Estilo Español...
>
> --
>
> Anyone around who uses Clojure in Spain? Professionally, for study or
> hobby? If so, perhaps we could organize something, like a get-together
> or the beginnings of a Clojure User Group.
>
> Un saludo,
> Iwan
>
> --
> 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: Anyone on Google+ yet?

2011-07-15 Thread Angel Java Lopez
https://profiles.google.com/ajlopez2000
Thanks!

On Thu, Jul 14, 2011 at 2:12 PM, Claudia Doppioslash <
claudia.doppiosl...@gmail.com> wrote:

> My Clojure circle is all set up but empty.
> My g+ is: http://gplus.to/gattoclaudia
>
> Please add link to your profile below.
>
> --
> 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: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Angel Java Lopez
An old thread:
http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38?pli=1


Also, someone proposed instead of
(f a b c)
begin to use
f(a, b, c) or something alike

but I don't have the thread link now

On Wed, Mar 7, 2012 at 2:39 PM, Leon Talbot  wrote:

> If so, how ?
>
> 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

-- 
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: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Angel Java Lopez
Maybe this proposal:
http://grokbase.com/t/gg/clojure/11ctt573jq/list-syntax-sugar-f-x-notation

On Wed, Mar 7, 2012 at 6:09 PM, Angel Java Lopez wrote:

> An old thread:
>
> http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38?pli=1
>
>
> Also, someone proposed instead of
> (f a b c)
> begin to use
> f(a, b, c) or something alike
>
> but I don't have the thread link now
>
> On Wed, Mar 7, 2012 at 2:39 PM, Leon Talbot  wrote:
>
>> If so, how ?
>>
>> 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
>
>
>

-- 
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: Boolean

2012-04-14 Thread Angel Java Lopez
What is the situation in ClojureCLR?

And, seeing the if code cited, I just run this code:

public class BoolTest {
public static void main(String[] args)
{
Boolean f = new Boolean(false);
System.out.println(f.equals(false)); // true
System.out.println(f == false); // true
System.out.println(f == Boolean.FALSE); // false
System.out.println(f.equals(Boolean.FALSE)); // true
}
}

why not replace
public Object eval() {
Object t = testExpr.eval();
if(t != null && t != Boolean.FALSE)
return thenExpr.eval();
return elseExpr.eval();
}

by
public Object eval() {
Object t = testExpr.eval();
if(t != null && !t.equals(Boolean.FALSE))
return thenExpr.eval();
return elseExpr.eval();
}


My guess: performance. But it should be measured

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Sat, Apr 14, 2012 at 6:16 AM, Vinzent  wrote:

> So 'false?' doesn't help you here.
>>
> It does, actually (see earlier responses for details)
>
>
>> So if anyone runs into this problem _in real world code_ it's because
>>
>> they are calling a Java API that somehow returns a Java Boolean object
>> embedded in the result. If you are working with a Java data structure
>> full of _Objects_ then you need to take care of converting those
>> Object instances into appropriate Clojure values. Calling (boolean v)
>> is sufficient to convert the Java Object to a Clojure true/false
>> value.
>>
> Yeah it was stated in the very beginning of the thread.
>
> --
> 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: CRUD application backed only by immutable facts

2012-06-06 Thread Angel Java Lopez
Yes, I thought the same... Now, encouraged by Dave message ;-) some links:
http://martinfowler.com/eaaDev/EventSourcing.html
Dave mentioned CQRS, some post about Events, Event Sourcing AND CQRS:
http://thinkbeforecoding.com/tag/CQRS

CQRS (Command Query Responsibility Separation) is a big topic, possibly not
needed for this thread. Some tutorial, intro links I collected
http://ajlopez.wordpress.com/2012/03/12/cqrs-links-news-and-resources-3-2/

On Wed, Jun 6, 2012 at 5:58 AM, Dave Sann  wrote:

> This sounds a lot like Event Sourcing to me. (often coupled with CQRS).
>
> Which, I think, is similar to what datomic is doing, where:
>  - datom  => event
>  - transactor => event store
>  - peer => query model
>
> There are a number of presentations, blogs available on this if you
> haven't seen it previously. just Google for it
>
> It sounds simple in theory - and I like the idea a lot in principle - but
> if you look at discussion boards, there seem to be challenges in actually
> applying it effectively. Management and Synchronisation of separate write
> and read model being significant.
>
> Dave
>
> On Wednesday, 6 June 2012 08:36:25 UTC+10, Kevin Lynagh wrote:
>>
>> Jonas,
>>
>> Definitely inspired by the ideas in Datomic.
>> My question was partially: "how can I implement the core immutability
>> semantics of Datomic in plain Clojure?".
>> (Say, hypothetically, that I need a Clojure datastore with flexible
>> schema and immutability semantics but cannot actually use Datomic for
>> business reasons.)
>>
>> I gave it a shot this morning---writing code to serialize
>>
>> {:a 1 :b 2}
>>
>> into
>>
>> [#Assertion{:id 1, :attribute :a, :value 1, :time 0},
>>  #Assertion{:id 1, :attribute :b, :value 2, :time 0}]
>>
>> and back again (which gets a bit more complex with references/
>> collections, but not much).
>>
>> Nicolas,
>>
>> Data can be kept anywhere that tuples can be kept = )
>> Caching intermediate values "diffs are collapsed" should definitely
>> bring a speedup.
>> The immutability semantics mean you really can go all out crazy with
>> the caching too.
>>
>>
>>
>> On Jun 5, 1:44 am, "nicolas.o...@gmail.com" 
>> wrote:
>> > It is not totally clear in your post how you want to keep the data?
>> > Is it in memory (with a transactional log somewhere)?
>> > If it is the case, you can do better than reducing the whole data set
>> > when executing a query:
>> > you can keep a cache of query results, or indexed data and maintain
>> > it, while still being
>> > purely functional. (For example by attaching those results as meta
>> > data to the data structure, and
>> > defining your own assoc-like functions that maintain a consistency of
>> > the meta-dataed query results)
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Tue, Jun 5, 2012 at 1:59 AM, Kevin Lynagh 
>> wrote:
>> > > Has anyone seen or implemented a CRUD application in Clojure using a
>> > > database of immutable facts?
>> >
>> > > For instance, a traditional database table supporting a todo-list
>> > > application has columns
>> >
>> > >user_id, task_id, task_description, is_done
>> >
>> > > A new row is created when a user adds a task.
>> > > Then that row is updated so is_done = TRUE when the user checks the
>> > > task off.
>> >
>> > > With immutable facts this would instead be a collection of
>> statements:
>> >
>> > > User U added task T with description D at time T1
>> > > User U completed task T at time T2
>> >
>> > > To get a list of unfinished tasks for a user, you'd need to grab all
>> > > the tasks from this "transaction log", put them into a data
>> structure,
>> > > and then remove ones when you learn that they've been completed.
>> > > Whatever is left over is the todo list.
>> >
>> > > Nathan Marz talked about this in terms of big data:
>> >
>> > >
>> > > http://nathanmarz.com/blog/**how-to-beat-the-cap-theorem.**html
>> >
>> > > and Datomic's big bet is that your life as a developer gets much
>> > > easier when you just deal with (entity, attribute, value) + time.
>> >
>> > > I buy it in theory, but I have no idea what to expect in terms of
>> > > performance (e.g., how long would it take to find the current todo
>> > > list of someone who has added and completed/removed a few thousand
>> > > items?).
>> >
>> > > Has anyone implemented this idea on Clojure datastructures using,
>> > > say,  (timestamp, keyseq, value) and reducing a ton of calls to
>> assoc-
>> > > in?
>> > > Aside from speed, what are some other tradeoffs of an immutable
>> > > approach?
>> >
>> > > --
>> > > 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+unsubscribe@**googlegroups.com
>> 

Re: interests in Clojure internals

2012-06-07 Thread Angel Java Lopez
Any project like
https://github.com/codereading/HQ
?
for Clojure

> some materials/books about language/compiler designing could help me
> better
> > understand these stuffs??
>
> While I think the project is still in a very incomplete stage you can
> find quite a bit of information in Tim Daly's re-organization of the
> Clojure source code in literate form:
>
> http://daly.axiom-developer.org/clojure.pdf
> http://daly.axiom-developer.org/clojure.pamphlet
>
> >
> > Thanks,
> > Jaime
>
> --
> 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

[SemiOT] Using Clojure word into open source project name

2012-07-10 Thread Angel Java Lopez
Hi people!

Is there any recommendation, flow to follow, requirements, to use "Clojure"
word in an open source project? Or I can use it without any previous
ceremony?

Or there is any formal/informal "os-etiquette"?

I'm not a lawyer (I understand code! ;-).

I want to use the c** word ;-) in one of my project (a simple clojure
interpreter, not compiler).

TIA

Angel "Java" Lopez
http://ajlopez.wordpress.com
@ajlopez
gh:ajlopez

-- 
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

ClojureScript FileNotFoundException

2012-10-18 Thread Angel Java Lopez
Hi people!

I just cloned the current clojurescript repo, in a Windows 2008 server
machine, and follow the instructions:
https://github.com/clojure/clojurescript/wiki/Windows-Setup
https://github.com/clojure/clojurescript/wiki/Quick-Start

But when I run .\script\repl.bat and tried (require '[cljs.repl :as repl]),
a FileNotFoundException raised:

 this is the java VM with calculated CLASSPATH
C:\Git\clojurescript>java -server -cp
"c:\Git\clojurescript\src\clj;c:\Git\clojurescript\src\cljs";c:\Git\clojurescript\lib\clojure-1.3.0-beta1.jar;c:\Git\clojurescript\lib\compiler.jar;c:\Git\clojurescript\lib\goog.jar;c:\Git\clojurescript\lib\guava-13.0.1.jar;c:\Git\clojurescript\lib\js.jar""
clojure.main
Clojure 1.3.0-beta1
user=> (require '[cljs.repl :as repl])
FileNotFoundException Could not locate clojure/instant__init.class or
clojure/instant.clj on classpath:   clojure.lang.RT.load (RT.java:430)

My lib folder
10/18/2012  08:24 AM 3,398,424 clojure-1.3.0-beta1.jar
10/18/2012  08:28 AM 5,856,710 compiler.jar
10/18/2012  08:27 AM 3,711,975 goog.jar
10/18/2012  08:28 AM 1,891,110 guava-13.0.1.jar
10/18/2012  08:30 AM 1,122,370 js.jar

Any clues? Some month ago, I run the repl with success. But now, I'm trying
in this new machine, and something goes wrong.

Same exception is I run .\script\repljs.bat

TIA

Angel "Java" Lopez
@ajlopez

-- 
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: precise numbers

2010-10-12 Thread Angel Java Lopez
Short comment:

I remember Common Lisp has rational numbers (I'm not sure). Any rational
number library for Clojure?

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez


On Tue, Oct 12, 2010 at 4:14 PM, Luka Stojanovic  wrote:

> On Tue, 12 Oct 2010 20:53:16 +0200, cej38  wrote:
>
>

-- 
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: Giving a 15 minute Clojure lightning talk. Any ideas?

2010-12-09 Thread Angel Java Lopez
Hi people!

Recently, I used as final example in a short presentation:
https://github.com/sfraser/MultithreadedGameOfLife
http://www.youtube.com/watch?v=CFCYVfApPUc

It shows:
- Multithreading
- persistence data, transactions
- access to Java tech, as Swing

My first minutes were dedicated to simple Lisp/Clojure concepts.

Angel "Java" Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Thu, Dec 9, 2010 at 8:36 PM, Alex Baranosky <
alexander.barano...@gmail.com> wrote:

> Thanks, for all of your thoughts, guys.  I'm letting all the ideas boucne
> around.  I'll be sure to let you all know how it goes after the talk.
>
>  --
> 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