Re: Is anyone relying on the js* special form?

2012-09-25 Thread Herwig Hochleitner
2012/9/25 Brandon Bloom snprbo...@gmail.com

 clojurescript gives no access to javascript's delete operator.



There is a js-delete macro in core. It uses the same form as your proposed
 adel form.


Oh, beg your pardon, I have overlooked that.
I have to admit, a del! form for deleting advanced-optimized properties is
arguably less important, since you can't reflect on them anyways.

-- 
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: ANN: 25 September London Clojure Dojo at Thoughtworks

2012-09-25 Thread Bruce Durling
There are still places left for the September Clojure Dojo (tonight!)
and the London Clojurians talk on Cascalog and Hadoop at Skills Matter
(next Tuesday!). Details below.

cheers,
Bruce

On Wed, Sep 12, 2012 at 3:35 PM, Bruce Durling b...@otfrom.com wrote:
 Roll up! Roll up!

 After being hosted by Forward in Camden Town our lovely friends at
 Thoughtworks are going to host us at the end of the month for our next
 London Clojure Dojo.

 It will start at 7PM at Thoughtworks London.

 Details and sign up are here:

 http://late-september-2012-ldnclj-dojo.eventbrite.co.uk/

 Also, we'll be having an evening talk event with Stefan Hubner of the
 Berlin Clojure User Group on Cascalog = Hadoop + Sanity on 2 October.
 Details and sign up for that event are here:

 http://skillsmatter.com/event/clojure/cascalog-hadoop-sanity

 I hope to see you all there!

 cheers,
 Bruce

 --
 @otfrom | CTO  co-founder @MastodonC | mastodonc.com



-- 
@otfrom | CTO  co-founder @MastodonC | mastodonc.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


[ANN] Immutant 0.4.0 released

2012-09-25 Thread Jim Crossley
Trying to stick to a bi-monthly release cycle, we announced version 0.4.0 
today: http://bit.ly/immutant040

In a nutshell, Immutant is an application server for Clojure. It's an 
integrated platform built on JBoss AS7 that aims to reduce the inherent 
accidental complexity in real world applications.

New features in this release include durable topic subscribers and 
representing JMS message properties as Clojure metadata. We also sped up 
deployments a bit and added some convenient options to the lein plugin, e.g.

  $ lein immutant deploy --context-path / --virtual-host some.host.com

More details available from the above link.

Thanks,
Jim

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

Behavior of (eval) in different namespaces

2012-09-25 Thread Alex Dowad
Does anyone know what's going on here?

user= (let [a 1] (eval 'a))
1
user= (ns another-ns)
nil
another-ns= (let [a 1] (eval 'a))
CompilerException java.lang.RuntimeException: Unable to resolve symbol: a 
in this context, compiling:(NO_SOURCE_PATH:41) 

If let-bound locals were treated as symbols in user, this behavior would 
be understandable (though I don't know why on earth let would be 
implemented in such a bizarre fashion). Anyways, locals are *not* symbols 
in user, as you can see:

user= (let [a 1] user/a)
CompilerException java.lang.RuntimeException: No such var: user/a, 
compiling:(NO_SOURCE_PATH:1) 

I started tracing through the code for (eval) in Compiler.java, but got 
lost at the point where it wraps (let) forms in (fn [] ...) before 
evaluating them...

BTW, if you convert the above let to an equivalent lambda expression, the 
behavior is consistent between user and other namespaces:

user= ((fn [a] (eval 'a)) 1)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: a 
in this context, compiling:(NO_SOURCE_PATH:6) 

-- 
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: Behavior of (eval) in different namespaces

2012-09-25 Thread Timo Mihaljov
On 25.09.2012 23:58, Alex Dowad wrote:
 Does anyone know what's going on here?
 
 user= (let [a 1] (eval 'a))
 1
 user= (ns another-ns)
 nil
 another-ns= (let [a 1] (eval 'a))
 CompilerException java.lang.RuntimeException: Unable to resolve symbol:
 a in this context, compiling:(NO_SOURCE_PATH:41) 

I don't see this behavior on Clojure 1.4.0

user= (let [a 1] (eval 'a))
CompilerException java.lang.RuntimeException: Unable to resolve symbol:
a in this context, compiling:(NO_SOURCE_PATH:1)

-- 
Timo

-- 
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: Behavior of (eval) in different namespaces

2012-09-25 Thread Aaron Cohen
On Tue, Sep 25, 2012 at 4:58 PM, Alex Dowad alexinbeij...@gmail.com wrote:
 Does anyone know what's going on here?

 user= (let [a 1] (eval 'a))
 1

I have to assume you have a def of a lying around from previous
experimentation. This isn't valid otherwise.

--Aaron

-- 
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: Behavior of (eval) in different namespaces

2012-09-25 Thread Alex Dowad


 I have to assume you have a def of a lying around from previous 
 experimentation. This isn't valid otherwise. 

 --Aaron 


Whew... this seemed too crazy to be true, but it makes sense now. False 
alarm! Thanks!

Alex 

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

Setting up Dev Environment

2012-09-25 Thread desmond
Getting your machine set up to write Clojure is humorously easy.  First, 
the good stuff:

$ brew install clojure
$ brew install leiningen

Then, you'll want to get the VimClojure plugin.  This enables syntax 
highlighting, file type recognition, etc.  Assuming you're using Pathogen:

$ cd ~/.vim/bundle  # = or wherever you keep your vim plugins
$ git clone https://github.com/vim-scripts/VimClojure

One nifty feature of the this plugin is colorizing your parenthesis to help 
you keep track of what's going on.  To enable, add this to your .vimrc:

 Settings for VimClojure
let g:clj_highlight_builtins=1   Highlight Clojure's builtins
let g:clj_paren_rainbow=1Rainbow parentheses'!


That's it!  To start a project, run 
$ lein new {project name}

Further reading is here:
environment setup:  https://gist.github.com/2407109
getting started with web development: 
 https://devcenter.heroku.com/articles/clojure-web-application



-- 
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.lang.Keyword.hashCode is a hotspot in my app

2012-09-25 Thread James Hess
Hi experienced clojure gurus,
According to VisualVM 24% of my time is spent in
clojure.lang.Keyword.hashCode. I'm sure I am doing something wrong (i.e.
I'm not blaming clojure's implementation).  Is this an indication that I'm
using keywords too much or something like that?  Have other people ran into
this problem before, and if so what were you doing that was causing such
high usage and how did you fix it?

Thanks in advance,
Jimbo

-- 
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 Programming is a great book

2012-09-25 Thread Manuel Rotter
 Anyway, is there a dedicated mailing list to discuss this book?


See the homepage: http://www.clojurebook.com/

-- 
Blog: http://programmablelife.blogspot.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


50% Discount on the Clojure eXchange NYC - October 1st // Feat. Stuart Sierra and Uncle Bob Martin if you book by September 27th!

2012-09-25 Thread Theo


New Yorkers! Skills Matter is organising its first, annual Clojure eXchange 
in New York. Join Stuart Sierra, Russ Miles, Paul DeGrandis, Chas Emerick 
and Uncle Bob Martin for an intensive and highly interactive day on all 
things Clojure. If you would like to join us at the Ace Hotel THIS MONDAY 
OCT 1ST and learn about this powerful language on the JVM, including about 
ClojureScript, about how to production, cloud-based near-real-time, low 
latency index and trading system with Clojure  Java, would like to learn 
how Clojure manages risk better than any other technology or learn why 
Uncle Bob Martin believes Clojure could be the The Last Programming 
Language, then reserve your place now! 

The Clojure Google Group can receive a 50% discount of the ticket price, 
using Promo Code promotional code - clojure-exchange-community-discount. 

All you have to do is enter this code into the first eventbrite page 
through out Skills Matter website here - 
http://skillsmatter.com/event/scala/clojure-exchange-2012-nyc/wd-23http://www.linkedin.com/redirect?url=http%3A%2F%2Fskillsmatter%2Ecom%2Fevent%2Fscala%2Fclojure-exchange-2012-nyc%2Fwd-23urlhash=9CkL_t=tracking_anet
 

If this is something of interest, or you would like any further 
information, please let me know on theo.engl...@skillsmatter.com

Best wishes, 

Theo

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

newbie question regarding maps

2012-09-25 Thread Mond Ray
I am playing around with maps and using wish lists as a learning tool. I 
have a list of items in wish lists like this:

user= items
[{:name Item 1, :cost 20.0} {:name Item 2, :cost 40.0}]

user= wiggle-items
[{:name Wiggle 1, :cost 20.0} {:name Wiggle 2, :cost 40.0} [:name Item 
3 :cost 10.0]]

user= (def wish-lists [
{:name WL1 :items items}
{:name WL2 :items wiggle-items}
]
)
#'user/wish-lists

user= wish-lists
[{:name WL1, :items [{:name Item 1, :cost 20.0} {:name Item 2, :cost 
40.0}]} {:name WL2, :items [{:name Wiggle 1, :cost 20.0} {:name Wiggle 
2, :cost 40.0} [:name Item 3 :cost 10.0]]}]

---

I now want to add an item to one of the Wish Lists but am struggling with 
assoc and assoc-in (which seems to be the one I need).

---

user= (def new-wi (conj wiggle-items [ :name Item 3 :cost 10.0 ]))

#'user/new-wi

user= (assoc-in wish-lists [:name WL1] [:name WL1 :items new-wi])
IllegalArgumentException Key must be integer 
clojure.lang.APersistentVector.assoc (APersistentVector.java:312)


As you can see the REPL gives me an error stating that the keys must be 
Integers. Is that right?  Or is my call process faulty?

Thanks in advance for your support.


ray

-- 
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 : a good start for non-programmers?

2012-09-25 Thread Gregorius R.
Hello Clojurists!

I'm a person in middle age (you know, too old to rock'n'roll, to young to 
die) and would like to programm but starting with functional programming. 
Regarding this i have some questions:

is clojure a good start to learn programming?
which (prerfer free online) is a good tut to start? 
am i to old for this stuff? 

thnx in advance for all responses
Greg

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

how do we go about promoting new clojure libraries?

2012-09-25 Thread zcaudate
is there some sort of categorised list/wiki that we can add to for new 
libraries?

-- 
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: Would you please help in migrating this code from Bishop to Liberator?

2012-09-25 Thread James Henderson
For anyone stumbling upon this question - it was answered on the Liberator 
Github repository, at 
https://github.com/clojure-liberator/liberator/issues/6

James

On Wednesday, 19 September 2012 14:05:08 UTC+1, Hussein B. wrote:

 Hi,

 I want to migrate this code written in Bishop REST framework to Liberator 
 REST framework:

 (bishop/defresource ticket
   {
 text/html
 (fn [request]
   (let [request-method (:request-method request)]
 (case request-method
   :get  (list-all-tickets request)
   :post (create-ticket-per-uploaded-file request
   }

   {
 :allowed-methods (fn [request] [:get :post])
   })

 I'm not really digesting the liberator approach.

 Thanks for help and time.


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

Does Clojure support efficient coroutines?

2012-09-25 Thread Warren
Hi,

It seems the JVM doesn't provide any support for coroutines, generators, 
light-weight threads, or non-reusable continuations. I can't find any 
mention of coroutines in the docs, so I'm guessing Clojure doesn't have 
them due to the lack of JVM support. Is that correct?

Warren

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

Transactional memory design rationale

2012-09-25 Thread Warren
Hi,

I have two questions about the reasons behind the design of Clojure's 
software transactional memory (STM):

(1) Why is snapshot isolation the default rather than linearizability? For 
those who don't know, the difference between the two guarantees is that 
snapshot isolation requires all reads to occur at a read point and all 
writes to occur at a later write point, whereas linearizability 
additionally requires those two points to be one and the same. Most of 
closure's design seems to prefer correctness over efficiency, but this 
decision places efficiency over correctness. Why not make the safe behavior 
of the current ensure the default with the one-character name and leave 
the more efficient but harder to understand deref behavior as something 
available when optimizing hot code?

(2) Was the _principled_ form of open nesting in the paper titled Open 
Nesting in Software Transactional Memory (
http://www.cse.msu.edu/~cse914/Readings/openNestingInSoftwareTransMemory-ppopp07.pdf)
 considered 
for clojure's STM? That paper (which I have nothing to do with) deals with 
the issue of an STM sometimes thinking two operations conflict due to 
conflicting reads and writes even though from the perspective of abstract 
data types the transactions shouldn't conflict, For example if one 
transaction modifies key X in a hashmap and another modifies key Y those 
transactions shouldn't conflict unless those two hashmap operations are 
executing at the same time and don't execute correctly. If the two 
operations occur at different times then those two operations needn't 
conflict, even if they happen to both write the same data e.g. incrementing 
a counter of the number of keys in the table. This sort of principled open 
nesting solves the problem that clojure's commute does but also handles 
cases when an operation commutes with _some_ other operations but not 
_all_, e.g. two hashmap writes to different keys don't conflict with each 
other but writes to the same key do.

Thanks in advance.
Warren

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

odd behavior with non-greedy quantifiers in ClojureScript regular expressions

2012-09-25 Thread David Goss-Grubbs
I'm just starting with ClojureScript and I've noticed a couple odd 
behaviors with regular expressions, which I assume are bugs.

The first has to do with non-greedy (reluctant) quantifiers. The following 
regexes work fine:

ClojureScript:cljs.user (re-matches #a?b? a)
a
ClojureScript:cljs.user (re-matches #a?b? b)
b

as does this:

ClojureScript:cljs.user (re-matches #a??b? b)
b

but the following doesn't:

ClojureScript:cljs.user (re-matches #a??b? a)
nil

It does work in regular Clojure:

user= (re-matches #a??b? a)
a

I understand that Clojure uses Java regexes and ClojureScript uses 
JavaScript regexes. I've never really used JavaScript, but my understanding 
is that it supports non-greedy quantifiers.

The other issue is that re-seq in ClojureScript hangs on certain inputs:

ClojureScript:cljs.user (re-seq #a? a)
no response

Thanks,
David

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

ANN: Clj-DBCP 0.8.0 (JDBC connection pooling) and Clj-Liquibase 0.4.0 (DB migration)

2012-09-25 Thread Shantanu Kumar
Hi,

I am happy to announce the release of two database libraries:

1. Clj-DBCP 0.8.0 for JDBC connection pooling: 
https://github.com/kumarshantanu/clj-dbcp

2. Clj-Liquibase 0.4.0 for database migration: 
https://github.com/kumarshantanu/clj-liquibase

Both libraries have been significantly enhanced since their previous
versions. Please let me know if you have any feedback/comments.

Shantanu

-- 
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 : a good start for non-programmers?

2012-09-25 Thread Leonardo Borges
Hi Gregorius!

I think Clojure is a great way to start to learn to program! Clojure
is a flavour of lisp and so is Scheme - which has been used for
decades to teach programming to MIT undergrads.

In terms of resources on learning functional programming I think The
Little Lisper is a terrific book:
http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992

And if yearn for more advanced things later on, SICP - the actual text
book used at MIT - can be found for free online here:
http://mitpress.mit.edu/sicp/

Both books use scheme but I believe you should be able translate the
examples to Clojure without too much effort.

just my 2c.

Best of luck!

Leonardo Borges
www.leonardoborges.com


On Mon, Sep 24, 2012 at 4:11 PM, Gregorius R. gzym...@gmail.com wrote:
 Hello Clojurists!

 I'm a person in middle age (you know, too old to rock'n'roll, to young to
 die) and would like to programm but starting with functional programming.
 Regarding this i have some questions:

 is clojure a good start to learn programming?
 which (prerfer free online) is a good tut to start?
 am i to old for this stuff?

 thnx in advance for all responses
 Greg

 --
 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 : a good start for non-programmers?

2012-09-25 Thread Dennis Haupt
basically anything except brainfuck is a good idea :)

Am 26.09.2012 06:45, schrieb Leonardo Borges:
 Hi Gregorius!
 
 I think Clojure is a great way to start to learn to program! Clojure
 is a flavour of lisp and so is Scheme - which has been used for
 decades to teach programming to MIT undergrads.
 
 In terms of resources on learning functional programming I think The
 Little Lisper is a terrific book:
 http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992
 
 And if yearn for more advanced things later on, SICP - the actual text
 book used at MIT - can be found for free online here:
 http://mitpress.mit.edu/sicp/
 
 Both books use scheme but I believe you should be able translate the
 examples to Clojure without too much effort.
 
 just my 2c.
 
 Best of luck!
 
 Leonardo Borges
 www.leonardoborges.com
 
 
 On Mon, Sep 24, 2012 at 4:11 PM, Gregorius R. gzym...@gmail.com wrote:
 Hello Clojurists!

 I'm a person in middle age (you know, too old to rock'n'roll, to young to
 die) and would like to programm but starting with functional programming.
 Regarding this i have some questions:

 is clojure a good start to learn programming?
 which (prerfer free online) is a good tut to start?
 am i to old for this stuff?

 thnx in advance for all responses
 Greg

 --
 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 : a good start for non-programmers?

2012-09-25 Thread Wes Freeman
Yes (definitely not brainfuck), but I would recommend not starting with
something with ugly syntax like C, C++, Perl, or PHP (and many others, I'm
sure) these days. Something friendlier and dynamic like Clojure is an
excellent idea. Two alternatives I'd give a non-programmer are Python and
Ruby.

Clojure gets a bonus for not being object-oriented, in my opinion (you
don't even have to learn what that means--except for java interop, ha).

The syntax for Clojure/Lisp can be hard for some newbies, due to the
massive parentheses trails, but with proper editor assistance, you can
surpass that. http://xkcd.com/297/

I recommend The Joy of Clojure, although it might be rough for a newbie
after a couple of chapters, it's still excellent. You can always go back to
it, if it gets too difficult to follow.

There's also http://www.4clojure.com/ , and the clojure koans that can get
you some hands on practice.

Good luck!

Wes

On Wed, Sep 26, 2012 at 1:14 AM, Dennis Haupt d.haup...@gmail.com wrote:

 basically anything except brainfuck is a good idea :)

 Am 26.09.2012 06:45, schrieb Leonardo Borges:
  Hi Gregorius!
 
  I think Clojure is a great way to start to learn to program! Clojure
  is a flavour of lisp and so is Scheme - which has been used for
  decades to teach programming to MIT undergrads.
 
  In terms of resources on learning functional programming I think The
  Little Lisper is a terrific book:
  http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992
 
  And if yearn for more advanced things later on, SICP - the actual text
  book used at MIT - can be found for free online here:
  http://mitpress.mit.edu/sicp/
 
  Both books use scheme but I believe you should be able translate the
  examples to Clojure without too much effort.
 
  just my 2c.
 
  Best of luck!
 
  Leonardo Borges
  www.leonardoborges.com
 
 
  On Mon, Sep 24, 2012 at 4:11 PM, Gregorius R. gzym...@gmail.com wrote:
  Hello Clojurists!
 
  I'm a person in middle age (you know, too old to rock'n'roll, to young
 to
  die) and would like to programm but starting with functional
 programming.
  Regarding this i have some questions:
 
  is clojure a good start to learn programming?
  which (prerfer free online) is a good tut to start?
  am i to old for this stuff?
 
  thnx in advance for all responses
  Greg
 
  --
  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: clojure.lang.Keyword.hashCode is a hotspot in my app

2012-09-25 Thread Ben Smith-Mannschott
On Tue, Sep 25, 2012 at 1:53 AM, James Hess james.hes...@gmail.com wrote:
 Hi experienced clojure gurus,
 According to VisualVM 24% of my time is spent in
 clojure.lang.Keyword.hashCode. I'm sure I am doing something wrong (i.e. I'm
 not blaming clojure's implementation).  Is this an indication that I'm using
 keywords too much or something like that?  Have other people ran into this
 problem before, and if so what were you doing that was causing such high
 usage and how did you fix it?

 Thanks in advance,
 Jimbo

Well, you can eliminate the implementation of Keyword.hashCode() as an
explanation for what you're seeing:

public final int hashCode(){
return hash;
}

So, that leaves two possibilities: (1) You're doing something very
unusual in your code, which we can't say since you haven't showed us
any actual code. (2) You're misusing visualvm or misinterpreting the
results.

I'm guessing 2.

// Ben

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure : a good start for non-programmers?

2012-09-25 Thread Mark Engelberg
The challenge of learning Clojure as a first language is that:
1. Some of the best learning resources for Lisp-like languages are books
that use the Scheme dialect of Lisp.  If you know what you're doing, you
can translate all those ideas to Clojure, but the correspondence might not
be so obvious to a beginner.
2. Clojure sits on top of Java.  You can mostly think in Clojure, but every
once in a while, it really helps to understand Java's strengths and quirks
and understand how interop with the host system affects Clojure's design.
3. Debugging and other sorts of language tooling lag behind those of
languages that have been around much longer.

I'm sure there must be success stories of people who picked it up as a
first language, but I personally feel I would not be as strong a Clojure
programmer had I come to Clojure without significant prior experience in
both Scheme and Java.

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