Re: feedback about solutions

2015-09-01 Thread r/ Wobben
Thanks, 

For anyone who is interested.
Here are the exercises and theory: 
http://iloveponies.github.io/120-hour-epic-sax-marathon/I-am-a-horse-in-the-land-of-booleans.html
and here are the exercises layout ;  
https://github.com/iloveponies/i-am-a-horse-in-the-land-of-booleans/blob/master/src/i_am_a_horse_in_the_land_of_booleans.clj

Roelof

Op woensdag 2 september 2015 00:11:27 UTC+2 schreef Jony Hudson:
>
> You might find kibit interesting too:
>
> https://github.com/jonase/kibit
>
> In its own words "kibit is a static code analyzer for Clojure, 
> ClojureScript, cljx  and other Clojure 
> variants. It uses core.logic  to 
> search for patterns of code that could be rewritten with a more idiomatic 
> function or macro. "
>
> Running it on your file gives:
>
> At test.clj:10:
>
> Consider using:
>
>   (neg? x)
>
> instead of:
>
>   (< x 0)
>
>
> At test.clj:15:
>
> Consider using:
>
>   (zero? (mod n divisor))
>
> instead of:
>
>   (= (mod n divisor) 0)
>
>
> Jony
>
> On Monday, 31 August 2015 19:29:21 UTC+1, r/ Wobben wrote:
>>
>> Hello, 
>>
>> I did solve the boolean chapter of the ilovehorses git repo.
>> My solutions can be found here: 
>> https://github.com/rwobben/i-am-a-horse-in-the-land-of-booleans/blob/master/src/i_am_a_horse_in_the_land_of_booleans.clj
>>
>> Any experts who can give me feedback about the solutions so I can learn 
>> from it.
>>
>> Roelof
>>  
>>
>

-- 
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: Clojure bootstrap, what am I missing here?

2015-09-01 Thread Patrick Gombert
There is an effort underway to port the stdlib to clojure named clojure.core 
. The idea is to eventually 
to move off of clojure and bootstrap it with the clojure in clojure 
compiler, but that's a ways off. Here 
 is a list of 
implement functions from core.

On Monday, August 24, 2015 at 10:03:00 AM UTC-5, William la Forge wrote:
>
> Step 2 in the classical bootstrap process for a language is to rewrite it 
> in itself. Clojure is more than capable of this. But Clojure continues to 
> rely on Java code for its implementation.
>
> Is there a reason why this was not done? Efficiency issues? A rush to 
> create something usable? I would think that having Clojure implemented 
> entirely in Clojure would have a number of advantages.
>
> I am sure there was a deliberate decision, not to complete the bootstrap 
> process. Is this documented anywhere?
>
> Just being a nosy newbie.
>

-- 
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: feedback about solutions

2015-09-01 Thread Jony Hudson
You might find kibit interesting too:

https://github.com/jonase/kibit

In its own words "kibit is a static code analyzer for Clojure, 
ClojureScript, cljx  and other Clojure 
variants. It uses core.logic  to 
search for patterns of code that could be rewritten with a more idiomatic 
function or macro. "

Running it on your file gives:

At test.clj:10:

Consider using:

  (neg? x)

instead of:

  (< x 0)


At test.clj:15:

Consider using:

  (zero? (mod n divisor))

instead of:

  (= (mod n divisor) 0)


Jony

On Monday, 31 August 2015 19:29:21 UTC+1, r/ Wobben wrote:
>
> Hello, 
>
> I did solve the boolean chapter of the ilovehorses git repo.
> My solutions can be found here: 
> https://github.com/rwobben/i-am-a-horse-in-the-land-of-booleans/blob/master/src/i_am_a_horse_in_the_land_of_booleans.clj
>
> Any experts who can give me feedback about the solutions so I can learn 
> from it.
>
> Roelof
>  
>

-- 
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: feedback about solutions

2015-09-01 Thread Amith George
Forgot to add, there is a community written clojure style guide [1] that 
you may skim through. I had read it a long time ago. My impression was that 
a lot of the guidelines aligned with my own preferences. 

[1] - https://github.com/bbatsov/clojure-style-guide

-- 
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: feedback about solutions

2015-09-01 Thread Amith George
Hi,

I am not an expert :)

I haven't heard of this repo or even understand what the exercises are. 
Nonetheless, based on what you wrote, some simple changes (to possibly make 
it more idiomatic?),

(< x 0)

 
use (neg? x)

(if (= (mod n  divisor)0) 
>   true
>   false))

 
use (= (mod n divisor) 0) ... `=` returns a boolean value.

(defn abs [x]


I don't understand what the point of this function is. If one can use a 
built-in function `mod` to test divisibility, why can't one use the Java 
function `Math/abs` to implement `abs`?

(not (teen? age ))

 
`((complement teen?) age)` ... I personally find `complement` forms easier 
to read than `not`. And its better than doing `((comp not teen?) age)`

(divides? 5 n )


Maybe it's just me, but it reads like I am checking whether 5 is divisible 
by n. I rather prefer `(divisible? n d)`. Creating a standalone 
`divisible-by-5` function is just as easy. Anyway,

(defn leap-year? [year]
>   (cond
>   (not(divides?  4 year ))   false
>   (not(divides? 100 year)) true
>   (not(divides? 400 year)) false
>   :elsetrue
>   ))


It took me a while to mentally verify the logic. I feel the code becomes 
easier to grok, if you invert the predicates, ie instead of checking for 
negation of a condition, just check for the condition.
(defn leap-year? [x] (cond (divisible? x 400) true (divisible? x 100) false 
(divisible? x 4) true :else false))
 or
(defn leap-year? 
  [x] 
  (cond (divisible? x 400) true 
(and (divisible? x 4) 
 ((complement divisible?) x 100)) true 
:else false))

Can a year be negative or zero? If not, then maybe a pre-condition check 
for positive numbers? 

(defn generic-doublificate [x] ...


Without understanding what this function is supposed to do, I can't comment 
on it. As such, one rarely needs to check if an argument is a list or a 
vector. In this case maybe a better check would be `sequential?`. Maybe, 
you were supposed to implement it using multi methods. One method for 
`number?`, one for `coll?` and a default implementation. The `coll?` 
implementation handles the cases for empty collection, sequential 
collection and any other case. That said, what does this method have to do 
with booleans? 


On Monday, 31 August 2015 23:59:21 UTC+5:30, r/ Wobben wrote:

> Hello, 
>
> I did solve the boolean chapter of the ilovehorses git repo.
> My solutions can be found here: 
> https://github.com/rwobben/i-am-a-horse-in-the-land-of-booleans/blob/master/src/i_am_a_horse_in_the_land_of_booleans.clj
>
> Any experts who can give me feedback about the solutions so I can learn 
> from it.
>
> Roelof
>  
>

-- 
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: How do I print each test name in clojure.test?

2015-09-01 Thread James Reeves
On 1 September 2015 at 17:34, Mayank Jain  wrote:
>
> It throws Stackoverflow error
>
> StackOverflowError
>> clojure.lang.Util.equiv (Util.java:33)
>> clojure.core/isa? (core.clj:5115)
>> clojure.lang.Var.invoke (Var.java:388)
>> clojure.lang.MultiFn.isA (MultiFn.java:123)
>> clojure.lang.MultiFn.findAndCacheBestMethod (MultiFn.java:177)
>> clojure.lang.MultiFn.getMethod (MultiFn.java:150)
>> clojure.lang.MultiFn.getFn (MultiFn.java:158)
>> clojure.lang.MultiFn.invoke (MultiFn.java:227)
>
>
> Any idea why this could be happening?
>
> My mistake, sorry. We need to assign another var to hold the version that
hasn't been overridden:

  (def old-report clojure.test/report)

  (defmethod custom-report :default [m]
(old-report m))

That should now work.

- James

-- 
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: How do I print each test name in clojure.test?

2015-09-01 Thread Fluid Dynamics
On Tuesday, September 1, 2015 at 12:34:52 PM UTC-4, Mayank Jain wrote:

>   (defmethod custom-report :default [m]
>> (clojure.test/report m))
>>
>>   (binding [clojure.test/report custom-report]
>> (clojure.test/run-all-tests))
>>
>
Uh-oh. 

-- 
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: [ANN] prismatic/schema 1.0 adds automatic test data generation

2015-09-01 Thread Matt Mitchell
Awesome and good work! Can't wait to try it out.

- Matt

On Tuesday, September 1, 2015 at 2:02:30 PM UTC-4, Jason Wolfe wrote:
>
> We're excited to finally bring Schema out of alpha, while introducing some 
> new exciting features around testing: test.check integration and data 
> completion.  Check out the blog post for details about these new 
> applications.
>
> http://blog.getprismatic.com/schema-1-0-released/
>
> We've also rewritten the internals of schema for this release, to make it 
> easier and faster to add new schema types and applications.  We expect 
> ordinary users of Schema should see no breaking changes, but custom schema 
> types or tooling will likely need to be updated.  Please see the changelog 
> for details.
>
> https://github.com/Prismatic/schema/blob/master/CHANGELOG.md
>
> Comments and suggestions welcome!
>

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


[ANN] prismatic/schema 1.0 adds automatic test data generation

2015-09-01 Thread Jason Wolfe
We're excited to finally bring Schema out of alpha, while introducing some 
new exciting features around testing: test.check integration and data 
completion.  Check out the blog post for details about these new 
applications.

http://blog.getprismatic.com/schema-1-0-released/

We've also rewritten the internals of schema for this release, to make it 
easier and faster to add new schema types and applications.  We expect 
ordinary users of Schema should see no breaking changes, but custom schema 
types or tooling will likely need to be updated.  Please see the changelog 
for details.

https://github.com/Prismatic/schema/blob/master/CHANGELOG.md

Comments and suggestions welcome!

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


[ANN] Clojure/conj 2015 tickets go on sale today at 3 pm EDT!

2015-09-01 Thread Alex Miller
Sorry for the late notice here but Clojure/conj 2015 tickets will go on 
sale today!

Clojure/conj is the largest (and oldest) Clojure conference and will take 
place this year in Philadelphia, PA from Nov 16-18. A limited number of 
early bird tickets will be available for $275 (these usually sell out 
within an hour or two) and then for $350.

The list of speakers will be announced in 2-3 weeks but we had a fantastic 
set of proposals this year. We are currently planning to have most of the 
conference be 2 tracks (as opposed to previous years) to allow for the 
inclusion of both introductory and advanced material.

Three workshop options will be available on the weekend prior to the Conj:
- Intro to Clojure workshop - Nov 14-15, $300 (2 days)
- Datomic Conf - Nov 15, $40 (1 day)
- Property-based Testing with test.check - Nov. 15 3-5 pm, $150 (2 hrs)

Opportunity grants are available to cover ticket, travel, and/or hotel for 
attendees in underrepresented groups in tech who would not otherwise be 
able to afford the conference. Applications are available now - see the 
link below for more detail.

Main site: http://clojure-conj.org
Workshops: http://clojure-conj.org/training
Opportunity grants: http://clojure-conj.org/opportunity
Registration: https://ti.to/cognitect/clojure-conj-2015

If you have any questions, feel free to ask here or email 
eve...@cognitect.com to catch both myself and Lynn Grogan. 

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
--- 
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: How do I print each test name in clojure.test?

2015-09-01 Thread Mayank Jain
Hey thanks for the reply.

If I use only this, it works well.


>   (defmethod clojure.test/report :begin-test-var [m]
> (println (-> m :var meta :name)))
>

But if I use the following code instead,


>   (defmulti custom-report :type)
>
>   (defmethod custom-report :default [m]
> (clojure.test/report m))
>
>   (defmethod custom-report :begin-test-var [m]
> (println (-> m :var meta :name)))
>
>   (binding [clojure.test/report custom-report]
> (clojure.test/run-all-tests))
>

It throws Stackoverflow error

StackOverflowError
> clojure.lang.Util.equiv (Util.java:33)
> clojure.core/isa? (core.clj:5115)
> clojure.lang.Var.invoke (Var.java:388)
> clojure.lang.MultiFn.isA (MultiFn.java:123)
> clojure.lang.MultiFn.findAndCacheBestMethod (MultiFn.java:177)
> clojure.lang.MultiFn.getMethod (MultiFn.java:150)
> clojure.lang.MultiFn.getFn (MultiFn.java:158)
> clojure.lang.MultiFn.invoke (MultiFn.java:227)


Any idea why this could be happening?

-- 
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: who can help me get clojure function list in notepad++? thanks!

2015-09-01 Thread Alex Woods
notepad++ support clojure by lisp,  
clojure api & autocompletefile & readme of notepad++
https://drive.google.com/file/d/0By5ssgBX1IWaWDMydXdMdHI0Z2s/view?usp=sharing

在 2015年9月1日星期二 UTC+8下午10:30:38,Alex Woods写道:
>
>
> my
>  
> set is error:
>
>
>
>
>
>
>
>
>
>
> ;notepad++\functionList.xml
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
>  commentExpr="">
> 
> mainExpr="<[\w\?]+[\t ]+\w+[\t ]*=[\t ]*"[^"]+""
> displayMode="$functionName">
> 
> 
> 
> 
> 
>
>  commentExpr="((::.*?$)|(REM.*?$))">
> mainExpr="^[\t ]*:\w+"
> displayMode="$functionName">
> 
> 
> 
> 
> 
>
>  commentExpr="((#.*?$)|(;.*?$))">
> mainExpr="^[\t ]*[\["][\w_.; \(\)-]+[\]"]"
> displayMode="$functionName">
> 
> 
> 
> 
> 
>
> 
>   
> openSymbole="\{" closeSymbole="\}">
> 
>  expr="(class|enum|interface|@interface)\s+\w+(<\s*\w+(,\s*\w+)*\s*>)?">
> 
> 
> 
> 
> 
>  expr="(?!(if|while|for|switch|catch|synchronized)\b)\w+(\[\s*])*(<\s*\w+(,\s*\w+)*\s*>)?\s*\(">
>  expr="(?!(if|while|for|switch|catch|synchronized)\b)\w+(\[\s*])*(<\s*\w+(,\s*\w+)*\s*>)?">
> 
> 
> 
> 
>
>  commentExpr="((/\*.*?\*)/|(//.*?$))">
> mainExpr="^[\t 
> ]*((static|const|virtual)[\s]+)?[\w:]+([\s]+[\w]+)?([\s]+|(\*|\*\*)[\s]+|[\s]+(\*|\*\*)|[\s]+(\*|\*\*)[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
> displayMode="$functionName">
> 
> 
> 
> 
> 
> 
>  commentExpr="((/\*.*?\*)/|(//.*?$))">
>
>  
> mainExpr="((^|[\s]+|[;\}\.])([_A-Za-z][\w_]*\.)*[_A-Za-z][\w_]*[\s]*[=:]|^|[\s;\}]+)[\s]*function([\s]+[_A-Za-z]?[\w_]*\([^\)\(]*\)|\([^\)\(]*\))[\n\s]*\{"
> displayMode="$className->$functionName">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>  commentExpr="((/\*.*?\*)/|(//.*?$))">
>  mainExpr="^[\t ]*(class|struct)[\t 
> ]+[\w]+[\s]*(:[\s]*(public|protected|private)[\s]+[\w]+[\s]*)?\{"
> openSymbole = "\{"
> closeSymbole = "\}"
> displayMode="node">
> 
> 
> 
> 
> 
>  mainExpr="^[\t 
> ]*((static|const|virtual)[\s]+)?([\w]+([\s]+[\w]+)?([\s]+|(\*|\*\*|&)[\s]+|[\s]+(\*|\*\*|&)|[\s]+(\*|\*\*|&)[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{">
> 
> 
> 
> 
> 
> 
> mainExpr="^[\t 
> ]*((static|const|virtual)[\s]+)?[\w]+([\s]+[\w]+)?([\s]+|(\*|\*\*|&)[\s]+|[\s]+(\*|\*\*|&)|[\s]+(\*|\*\*|&)[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
> displayMode="$className->$functionName">
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  commentExpr="((/\*.*?\*)/|(#.*?$)|(;.*?$))">
> mainExpr="^[\t ]*(!macro|Function|Section|SectionGroup)[\t ]+[^\r\n]*$"
> displayMode="$functionName">
> 
> 
> 
> 
> 
> 
>  mainExpr="^[\s]*(? displayMode="$className->$functionName">
> 
> 
> 
> 
> 
> 
> 
> 
>  commentExpr="((/\*.*?\*)/|(//.*?$))">
>  
> mainExpr="^[\s]*(class|abstract[\s]+class|final[\s]+class)[\t 
> ]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*([\s]*|[\s]*(extends|implements|(extends[\s]+(\\|[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+[\s]+implements))[\s]+(\,[\s]*|(\\|[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))+[\s]*)?\{"
> openSymbole = "\{"
> closeSymbole = "\}"
> displayMode="node">
> 
>  expr="(class|abstract[\s]+class|final[\s]+class)[\s]+[\w]+"/>
> 
> 
> 
>  
> mainExpr="^[\s]*((static|public|protected|private|final)*(\s+(static|public|protected|private|final))+[\s]+)?(function[\s]+)+([\w]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\{]*\{">
> 
>  expr="(?!(if|while|for|switch))[\w_]+[\s]*\([^\{]*"/>
> 
>  expr="(?!(if|while|for|switch))[\w_]+"/>
> 
> 
> 
>  mainExpr="^[\s]*function[\s]+\w+\("
>
> displayMode="$className->$functionName">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  mainExpr="^[\t ]*(function[\t\r\n ]*)?([a-zA-Z0-9_])+[\t\r\n 
> ]*(\([^\)]*\))?[\t\r\n ]*(\{)[^(\})\r\n\t ]*"
> displayMode="$functionName">
> 
> 
> 
> 
> 
>  commentExpr="(#.*?$|'''.*?('''|\Z))">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  commentExpr="((/\*.*?\*)/|(//.*?$))">
>  mainExpr="^[\t 
> ]*((public|protected|private|internal)[\s]+)?([\w]+[\s]*)?(class|struct|interface)[\t
>  
> ]+[^\{]+\{"
> openSymbole = "\{"
> closeSymbole = "\}"

who can help me get clojure function list in notepad++? thanks!

2015-09-01 Thread Alex Woods
 
my
 
set is error:










;notepad++\functionList.xml
















































































































































































































-- 
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: migae: clojure on Google App Engine

2015-09-01 Thread Nicholas Faiz
Thanks. This is very helpful. I successfully built an example Clojure 
service on GAE last week working 
from http://flowa.fi/blog/2014/04/25/clojure-gae-howto.html?lang=en . 
Looking forward to reading through your examples.

Cheers,
Nicholas

On Sunday, August 30, 2015 at 4:49:43 AM UTC+10, Gregg Reynolds wrote:
>
> Hi list,
>
> If you have any interest in Clojure on Google App Engine you might want to 
> take a look at migae .  Currently it just 
> contains several basic demos showing how to structure Clojure apps on GAE, 
> running from raw java interop, to ring, to compojure, to compojure-api.  
> Dynamic code reloading makes rapid development possible.  Not quite a true 
> repl, but almost as good for servlet development at least.
>
> The technique is straightforward and surprisingly simple, but has not (to 
> my knowledge) been explained or demoed before.  (A web search for "clojure 
> on app engine" turns up surprisingly few recent results.)  It turns out to 
> be very easy to have multiple servlets, filters and a quasi-repl using 
> basic techniques (and some minor hackery) rather than a specialized 
> library.  It's not at all like appengine-magic.  AE-magic is fine, but it's 
> a little long in the tooth, and more important, Google's switch to a 
> gradle-based build system renders much of AE-magic's logic unnecessary.  
> Also, I wanted the service libs to be independently usable.
>
> I'd appreciate any feedback, especially on my explanation of how it works 
> - why dynamic loading works even though everything is aot-compiled.  I'm 
> not entirely sure I understand how Clojure's loading mechanism dovetails 
> with the servlet/jvm loading mechanism, so I made an educated guess.  Also, 
> I've tried to make the README relatively basic so those not familiar with 
> servlet programming can grok it.
>
> As for GAE service libraries, that'll take a while, and it's probably too 
> much for me alone, so any who wants to help out is welcome.  I've got what 
> I think is a promising approach to the Datastore API but will describe that 
> in another message.
>
> 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.


Re: Clojure bootstrap, what am I missing here?

2015-09-01 Thread Mikera
A few things to consider:

1. Performance is a key consideration. The speed of the compiler is a major 
determinant of startup time for Clojure applications, which is very 
important to many people. Having the compilker written in Java probably 
helps a lot here - it is generally easier to write high performance JVM 
code in pure Java. Yes, it's also possible to write fast code in Clojure, 
but it typically isn't idiomatic and is much harder to write / maintain. It 
would be quite a challenge to write a compiler with equivalent performance 
in pure, idiomatic Clojure.
2. YMMV but while I find that Clojure is extremely productive for writing 
new code, it really helps to have a type system when maintaining code. When 
maintaining a complex beast like the Clojure compiler, I don't think 
Clojure is actually going to be much better than well-written Java in this 
regard.
3. The bits of Clojure that users interact with directly (clojure.core 
etc.) are mostly already written in Clojure. Curious folks can still 
examine the Clojure source code for the core functions. The Java stuff is 
mostly around the compiler and implementation details of data structures 
etc.

Personally, I think this falls into the "if it isn't broken, don't fix it" 
category.

On Monday, 24 August 2015 23:23:07 UTC+8, William la Forge wrote:
>
> Well gosh, Timothy, isn't Clojure code easier to maintain/extend than Java 
> code? There's a lot less boiler plate at least. Or is it just that Clojure 
> is superior mostly when multi-threading because of its use of immutables?
>
> Are you really saying that Clojure is not an advantageous choice for 
> implementing Clojure? Perhaps as a newbie I'm just oversold on Clojure? Or 
> are you just taking a short-term view and saying that a rewrite would carry 
> no IMMEDIATE advantages. Of course, the counter for that is that a rewrite 
> ALWAYS carries immediate advantages. :D
>
> On Monday, August 24, 2015 at 11:10:05 AM UTC-4, tbc++ wrote:
>>
>> " I would think that having Clojure implemented entirely in Clojure 
>> would have a number of advantages."
>>
>> I think that's the place you should start. List those advantages. 
>> Clojure-in-Clojure would be a "nice" thing to have...but I can't really 
>> think of any major features it would enable that aren't possible in Clojure 
>> already.
>>
>> One thing that would be nice to have would be to switch Clojure's Java 
>> interfaces over to protocols, e.g. `Counted` could be a protocol instead of 
>> a interface. But that could be done on the existing codebase, without the 
>> need for a full rewrite. 
>>
>> Timothy
>>
>> On Mon, Aug 24, 2015 at 9:03 AM, William la Forge  
>> wrote:
>>
>>> Step 2 in the classical bootstrap process for a language is to rewrite 
>>> it in itself. Clojure is more than capable of this. But Clojure continues 
>>> to rely on Java code for its implementation.
>>>
>>> Is there a reason why this was not done? Efficiency issues? A rush to 
>>> create something usable? I would think that having Clojure implemented 
>>> entirely in Clojure would have a number of advantages.
>>>
>>> I am sure there was a deliberate decision, not to complete the bootstrap 
>>> process. Is this documented anywhere?
>>>
>>> Just being a nosy newbie.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> “One of the main causes of the fall of the Roman Empire was that–lacking 
>> zero–they had no way to indicate successful termination of their C 
>> programs.”
>> (Robert Firth) 
>>
>

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


labrep error message (FileNotFoundException bin/run.clj (No such file or directory) java.io.FileInputStream.open)

2015-09-01 Thread r/ Wobben
Hello, 

When I want to start labrepl it stops with this error message.

Installed clojure 1.7.0-alpha1.

java : openjdk7-jre-headless. 

Roelof

-- 
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: How do I print each test name in clojure.test?

2015-09-01 Thread James Reeves
The clojure.test/report multimethod is what you're looking for. You can add
a method for the :begin-test-var or :end-test-var types:

  (defmethod clojure.test/report :begin-test-var [m]
(println (-> m :var meta :name)))

The report var itself is dynamic, so you can override it that way if you
want to make things a little cleaner:

  (defmulti custom-report :type)

  (defmethod custom-report :default [m]
(clojure.test/report m))

  (defmethod custom-report :begin-test-var [m]
(println (-> m :var meta :name)))

  (binding [clojure.test/report custom-report]
(clojure.test/run-all-tests))

- James

On 1 September 2015 at 06:51, Mayank Jain  wrote:

> Hi,
>
> I would like clojure.test to print name of each test as it runs. Currently
> it only prints on failure.
> I would like it to print even when it passes.
> Is there a way to do this? Maybe through writing some each fixture?
>
> Currently I have written this function
>
> (defn print-test
>   []
>   (println (last (map #(:name (meta %)) *testing-vars*
>
> And I add this print-test to each test at the top.
>
> (deftest valid-test
>   (print-test)
>   (let []
>))
>
>
> Is there a better way?
>
> 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/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.