Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-13 Thread lawrence . krubner
Is there a way I can avoid hard-coding " "denormalize.pull-from-mysql"" ? I 
guess it doesn't matter, but it does seem a little inelegant.


On Thursday, October 12, 2017 at 9:54:36 PM UTC-4, Justin Smith wrote:
>
> you can use (symbol "denormalize.pull-from-mysql" "f") instead
>
> On Thu, Oct 12, 2017 at 6:34 PM > 
> wrote:
>
>> Nevermind. I found that this works, though I think it is ugly and 
>> inelegant: 
>>
>>  resolved-f (resolve (symbol (str "denormalize.pull-from-mysql/" 
>> f)))
>>
>>
>> On Thursday, October 12, 2017 at 9:27:06 PM UTC-4, lawrence...@gmail.com 
>> wrote:
>>>
>>> At the REPL, this works perfectly:
>>>
>>>  > (defn get-users [] [:susan :kwan])
>>>  > 
>>>  > (defn what-is-this-function [f] ((resolve (symbol f
>>>  
>>>  > (what-is-this-function "get-users")
>>>  >[:susan :kwan]
>>>  
>>> In an uberjar this does not work. I read somewhere that the runtime 
>>> name-space is different than the REPL namespace and different from the 
>>> namespace that exists while the compiler compiles the code. 
>>>
>>> So how do I resolve the symbol correctly? 
>>>
>>> I have functions that call a MySQL database, and each function is named 
>>> after a database table. Most of the mechanics of the call are the same, the 
>>> only thing different is the SQL. So I have functions such as "company" and 
>>> "user" and "product". I also have a function called (select). I call select 
>>> with one of the other functions, given as a string: 
>>>
>>> (select "product")
>>>
>>> Inside of (select) I need to turn "product" into a resolved symbol that 
>>> I can call. 
>>>
>>> Afterwards, I store the results in a map in an atom. I want to use the 
>>> database names as the keys. So "product" should be the key that holds the 
>>> results of the function "product". 
>>>
>>> But what I need to do to correctly resolve the string to a function? 
>>>
>>>
>>>
>>>
>>>
>>> -- 
>> 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.
>>
>

-- 
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: possibly a Clojure question or possibly an AWS question: slow writes to durable-queue

2017-10-13 Thread Nathan Fisher
It sounds like you have a memory leak. I would look at addressing that
before any performance tricks.
On Fri, 13 Oct 2017 at 05:35,  wrote:

> Following Daniel Compton's suggestion, I turned on logging for GC. I don't
> see it happening more often, but the slow down does seem related to the
> moment when the app hits the maximum memory allowed. It had been running
> with 4G, so I increased that to 7G, so it goes longer now before it hits
> 98% memory usage, but it does hit it eventually and then everything crawls
> to a very slow speed. Not sure how much memory I would have to use to avoid
> using up almost all of the memory. I suppose I'll figure that out via trial
> and error. Until I can figure that out, nearly all other performance tricks
> seems a bit besides the point.
>
>
>
> On Thursday, October 12, 2017 at 9:01:23 PM UTC-4, Nathan Fisher wrote:
>
>> Hi!
>>
>> Can you change one of the variables? Specifically can you replicate this
>> on your local machine? If it happens locally then I would focus on
>> something in the JVM eco-system.
>>
>> If you can't replicate it locally then it's possibly AWS specific. It
>> sounds like you're using a t2.large or m4.xlarge. If it's the prior you may
>> very well be contending between with your network bandwidth. EC2's host
>> drive (EBS) is a networked drive which is split between your standard
>> network traffic and the drive volume. If that's the issue then you might
>> need to look at provisioned IOPs. A quick(ish) way to test that hypothesis
>> is to provision a host with high networking performance and provisioned
>> IOPs.
>>
>> Cheers,
>> Nathan
>>
>> On Fri, 13 Oct 2017 at 00:05  wrote:
>>
>>> Daniel Compton, good suggestion. I've increased the memory to see if I
>>> can postpone the GCs, and I'll log that more carefully.
>>>
>>>
>>> On Wednesday, October 11, 2017 at 8:35:44 PM UTC-4, Daniel Compton wrote:
>>>
 Without more information it's hard to tell, but this looks a like it
 could be a garbage collection issue. Can you run your test again and add
 some logging/monitoring to show each garbage collection? If my hunch is
 right, you'll see garbage collections getting more and more frequent until
 they take up nearly all the CPU time, preventing much forward progress
 writing to the queue.

 If it's AWS based throttling, then CloudWatch monitoring
 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html#using_cloudwatch_ebs
  might
 show you some hints. You could also test with an NVMe drive attached, just
 to see if disk bandwidth is the issue.

 On Thu, Oct 12, 2017 at 11:58 AM Justin Smith 
 wrote:

>>> a small thing here, if memory usage is important you should be building
> and running an uberjar instead of using lein on the server (this also has
> other benefits), and if you are doing that your project.clj jvm-opts are
> not used, you have to configure your java command line in aws instead
>
> On Wed, Oct 11, 2017 at 3:52 PM  wrote:
>
 I can't figure out if this is a Clojure question or an AWS question.
>> And if it is a Clojure question, I can't figure out if it is more of a
>> general JVM question, or if it is specific to some library such as
>> durable-queue. I can redirect my question elsewhere, if people think this
>> is an AWS question.
>>
>> In my project.clj, I try to give my app a lot of memory:
>>
>>   :jvm-opts ["-Xms7g" "-Xmx7g" "-XX:-UseCompressedOops"])
>>
>> And the app starts off pulling data from MySQL and writing it to
>> Durable-Queue at a rapid rate. (
>> https://github.com/Factual/durable-queue )
>>
>> I have some logging set up to report every 30 seconds.
>>
>> :enqueued 370137,
>>
>> 30 seconds later:
>>
>> :enqueued 608967,
>>
>> 30 seconds later:
>>
>> :enqueued 828950,
>>
>> It's a dramatic slowdown. The app is initially writing to the queue
>> at faster than 10,000 documents a second, but it slows steadily, and 
>> after
>> 10 minutes it writes less than 1,000 documents per second. Since I have 
>> to
>> write a few million documents, 10,000 a second is the slowest speed I can
>> live with.
>>
>> The queues are in the /tmp folder of an AWS instance that has plenty
>> of disk space, 4 CPUs, and 16 gigs of RAM.
>>
>> Why does the app slow down so much? I had 4 thoughts:
>>
>> 1.) the app struggles as it hits a memory limit
>>
>> 2.) memory bandwidth is the problem
>>
>> 3.) AWS is enforcing some weird IOPS limit
>>
>> 4.) durable-queue is misbehaving
>>
>> As to possibility #1, I notice the app starts like this:
>>
>> Memory in use (percentage/used/max-heap): (\"66%\" \"2373M\"
>> \"3568M\")
>>
>> but 60 seconds later I see:
>>
>> Memory in use (percentage/used/max-heap): (\"94%\" \"3613M\"

Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-13 Thread Gary Verhaegen
>From the description of your problem, it's not really clear to me why you
insist on using strings. Why not use the functions directly? Functions can
serve as keys in maps. Granted, it's a bit ugly to print. You could also
build a map of string to function yourself. Not sure what the performance
of that would be compared to going through resolve every time; I would bet
on "faster" but without much confidence.

On Friday, 13 October 2017,  wrote:

> Is there a way I can avoid hard-coding " "denormalize.pull-from-mysql"" ?
> I guess it doesn't matter, but it does seem a little inelegant.
>
>
> On Thursday, October 12, 2017 at 9:54:36 PM UTC-4, Justin Smith wrote:
>>
>> you can use (symbol "denormalize.pull-from-mysql" "f") instead
>>
>> On Thu, Oct 12, 2017 at 6:34 PM  wrote:
>>
>>> Nevermind. I found that this works, though I think it is ugly and
>>> inelegant:
>>>
>>>  resolved-f (resolve (symbol (str "denormalize.pull-from-mysql/"
>>> f)))
>>>
>>>
>>> On Thursday, October 12, 2017 at 9:27:06 PM UTC-4, lawrence...@gmail.com
>>> wrote:

 At the REPL, this works perfectly:

  > (defn get-users [] [:susan :kwan])
  >
  > (defn what-is-this-function [f] ((resolve (symbol f

  > (what-is-this-function "get-users")
  >[:susan :kwan]

 In an uberjar this does not work. I read somewhere that the runtime
 name-space is different than the REPL namespace and different from the
 namespace that exists while the compiler compiles the code.

 So how do I resolve the symbol correctly?

 I have functions that call a MySQL database, and each function is named
 after a database table. Most of the mechanics of the call are the same, the
 only thing different is the SQL. So I have functions such as "company" and
 "user" and "product". I also have a function called (select). I call select
 with one of the other functions, given as a string:

 (select "product")

 Inside of (select) I need to turn "product" into a resolved symbol that
 I can call.

 Afterwards, I store the results in a map in an atom. I want to use the
 database names as the keys. So "product" should be the key that holds the
 results of the function "product".

 But what I need to do to correctly resolve the string to a function?





 --
>>> 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.
>>>
>> --
> 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: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-13 Thread Isaac Tsang
That because you REPL had set `*ns*`, when Clojure bootstrap from 
clojure.main, the *ns* bound to clojure.core

On Friday, October 13, 2017 at 9:27:06 AM UTC+8, lawrence...@gmail.com 
wrote:
>
> At the REPL, this works perfectly:
>
>  > (defn get-users [] [:susan :kwan])
>  > 
>  > (defn what-is-this-function [f] ((resolve (symbol f
>  
>  > (what-is-this-function "get-users")
>  >[:susan :kwan]
>  
> In an uberjar this does not work. I read somewhere that the runtime 
> name-space is different than the REPL namespace and different from the 
> namespace that exists while the compiler compiles the code. 
>
> So how do I resolve the symbol correctly? 
>
> I have functions that call a MySQL database, and each function is named 
> after a database table. Most of the mechanics of the call are the same, the 
> only thing different is the SQL. So I have functions such as "company" and 
> "user" and "product". I also have a function called (select). I call select 
> with one of the other functions, given as a string: 
>
> (select "product")
>
> Inside of (select) I need to turn "product" into a resolved symbol that I 
> can call. 
>
> Afterwards, I store the results in a map in an atom. I want to use the 
> database names as the keys. So "product" should be the key that holds the 
> results of the function "product". 
>
> But what I need to do to correctly resolve the string to a function? 
>
>
>
>
>
>

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


hello world question !!!

2017-10-13 Thread Damien Mattei
hello,

i'm new to clojure, just installed it on a CentOS box,

and try to compile the code below from tutorial, but it does not work, i 
searched a lot before posting, no answer... i do not want to use leiningen 
at this stage,later perheaps...

just want to compile and run

user=> (ns clojure.examples.hello
(:gen-class))
nil
clojure.examples.hello=>
clojure.examples.hello=> (defn -main
  [greetee]
  (println (str "Hello " greetee "!")))
#'clojure.examples.hello/-main
clojure.examples.hello=> (compile 'clojure.examples.hello)
FileNotFoundException Could not locate clojure/examples/hello__init.class 
or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load 
(RT.java:443)

help greatly appreciated (because i'm just one step to leave Clojure and 
continue using  Kawa or Bigloo i already use or dive into ABCL , but 
Clojure has a so good reputation, i cannot imagine being sticked here by a 
simple hello world!)

damien

-- 
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: hello world question !!!

2017-10-13 Thread James Reeves
Maybe this is a dumb question, but do you have a file
"clojure/examples/hello.clj" on the classpath? Since that's what the
exception is complaining about.

On 13 October 2017 at 15:09, Damien Mattei  wrote:

> hello,
>
> i'm new to clojure, just installed it on a CentOS box,
>
> and try to compile the code below from tutorial, but it does not work, i
> searched a lot before posting, no answer... i do not want to use leiningen
> at this stage,later perheaps...
>
> just want to compile and run
>
> user=> (ns clojure.examples.hello
> (:gen-class))
> nil
> clojure.examples.hello=>
> clojure.examples.hello=> (defn -main
>   [greetee]
>   (println (str "Hello " greetee "!")))
> #'clojure.examples.hello/-main
> clojure.examples.hello=> (compile 'clojure.examples.hello)
> FileNotFoundException Could not locate clojure/examples/hello__init.class
> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
> (RT.java:443)
>
> help greatly appreciated (because i'm just one step to leave Clojure and
> continue using  Kawa or Bigloo i already use or dive into ABCL , but
> Clojure has a so good reputation, i cannot imagine being sticked here by a
> simple hello world!)
>
> damien
>
> --
> 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.


Re: hello world question !!!

2017-10-13 Thread Justin Smith
To pedantically specific, clojure compiles all of your coffee to be code in
memory, but the 'compile' function expects to find a file on disk, and
create a class file on disk. Using gen-class in the repl is a no-op.

On Fri, Oct 13, 2017, 07:48 James Reeves  wrote:

> Maybe this is a dumb question, but do you have a file
> "clojure/examples/hello.clj" on the classpath? Since that's what the
> exception is complaining about.
>
> On 13 October 2017 at 15:09, Damien Mattei 
> wrote:
>
>> hello,
>>
>> i'm new to clojure, just installed it on a CentOS box,
>>
>> and try to compile the code below from tutorial, but it does not work, i
>> searched a lot before posting, no answer... i do not want to use leiningen
>> at this stage,later perheaps...
>>
>> just want to compile and run
>>
>> user=> (ns clojure.examples.hello
>> (:gen-class))
>> nil
>> clojure.examples.hello=>
>> clojure.examples.hello=> (defn -main
>>   [greetee]
>>   (println (str "Hello " greetee "!")))
>> #'clojure.examples.hello/-main
>> clojure.examples.hello=> (compile 'clojure.examples.hello)
>> FileNotFoundException Could not locate clojure/examples/hello__init.class
>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
>> (RT.java:443)
>>
>> help greatly appreciated (because i'm just one step to leave Clojure and
>> continue using  Kawa or Bigloo i already use or dive into ABCL , but
>> Clojure has a so good reputation, i cannot imagine being sticked here by a
>> simple hello world!)
>>
>> damien
>>
>> --
>> 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: hello world question !!!

2017-10-13 Thread Justin Smith
Sorry for the auto correct fail, it compiles all of your code to byte-code

On Fri, Oct 13, 2017, 08:29 Justin Smith  wrote:

> To pedantically specific, clojure compiles all of your coffee to be code
> in memory, but the 'compile' function expects to find a file on disk, and
> create a class file on disk. Using gen-class in the repl is a no-op.
>
> On Fri, Oct 13, 2017, 07:48 James Reeves  wrote:
>
>> Maybe this is a dumb question, but do you have a file
>> "clojure/examples/hello.clj" on the classpath? Since that's what the
>> exception is complaining about.
>>
>> On 13 October 2017 at 15:09, Damien Mattei 
>> wrote:
>>
>>> hello,
>>>
>>> i'm new to clojure, just installed it on a CentOS box,
>>>
>>> and try to compile the code below from tutorial, but it does not work, i
>>> searched a lot before posting, no answer... i do not want to use leiningen
>>> at this stage,later perheaps...
>>>
>>> just want to compile and run
>>>
>>> user=> (ns clojure.examples.hello
>>> (:gen-class))
>>> nil
>>> clojure.examples.hello=>
>>> clojure.examples.hello=> (defn -main
>>>   [greetee]
>>>   (println (str "Hello " greetee "!")))
>>> #'clojure.examples.hello/-main
>>> clojure.examples.hello=> (compile 'clojure.examples.hello)
>>> FileNotFoundException Could not locate
>>> clojure/examples/hello__init.class or clojure/examples/hello.clj on
>>> classpath:   clojure.lang.RT.load (RT.java:443)
>>>
>>> help greatly appreciated (because i'm just one step to leave Clojure and
>>> continue using  Kawa or Bigloo i already use or dive into ABCL , but
>>> Clojure has a so good reputation, i cannot imagine being sticked here by a
>>> simple hello world!)
>>>
>>> damien
>>>
>>> --
>>> 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.


[ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
Hi,

Happy to announce a new set of tools to *automatically*
*generate* types and specs for your projects.

*Dependency information:*
1. core.typed 
[org.clojure/core.typed "0.4.2"]
2. lein-typed 
[lein-typed "0.4.2"]
3. boot-typedclojure 
  [org.typedclojure/boot-typedclojure "0.1.0"]

*Tutorial:*
Here's how to try it out (for Lein projects using clojure.test):

1. Add {:user {:plugins [[lein-typed "0.4.2"]]}} to your
~/.lein/profiles.clj
2. Add a runtime dependency to [org.clojure/core.typed "0.4.2"] in your
chosen Lein project.clj
3. To infer specs: Run lein typed infer-spec 
4. To infer types: Run lein typed infer-type 

WARNING: This tool *rewrites your files*. Only try with backed up code.

*Some examples:*
*clj-time:*
*- *Spec setup

+ spec results

- Types setup

+ types results


*cheshire*
*- *Spec setup

+ spec results

- Types setup

+ types results


(Note: use the latest core.typed versions to reproduce on your machines)

*Hints:*
This tool instruments your namespace and runs your test suite. This
can be expensive. Try these options:

*   Choose lein test selectors (here: [:integration :generative] selectors)*
  lein typed infer-spec  :test-selectors "[:integration
:generative]"

*   Timeout individual tests (1000ms timeout)*
  lein typed infer-spec  :test-timeout-ms 1000

If annotation generation hangs, try these options:

*   Disable recursive type inference*
  lein typed infer-spec  :infer-opts "{:no-squash-vertically
true}"

If you see "No such namespace: s", try deleting existing automatically
generated specs/types before regenerating them. (git checkout works well
here)



*Reply* with your generated specs & types!

Thanks,
Ambrose

-- 
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: hello world question !!!

2017-10-13 Thread Damien Mattei
i did not have , i just follow the tutorial:
https://clojure.org/reference/compilation
i made the file but still the same problem:

[mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
[mattei@moita ~]$ clojure
Clojure 1.5.1
user=> (compile 'clojure.examples.hello)
FileNotFoundException Could not locate clojure/examples/hello__init.class 
or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load 
(RT.java:443)
user=> ^C[mattei@moita ~]$ 

[mattei@moita ~]$ cat clojure/examples/hello.clj 
(ns clojure.examples.hello
(:gen-class))

(defn -main
  [greetee]
  (println (str "Hello " greetee "!")))

On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>
> Maybe this is a dumb question, but do you have a file 
> "clojure/examples/hello.clj" on the classpath? Since that's what the 
> exception is complaining about.
>
> On 13 October 2017 at 15:09, Damien Mattei  > wrote:
>
>> hello,
>>
>> i'm new to clojure, just installed it on a CentOS box,
>>
>> and try to compile the code below from tutorial, but it does not work, i 
>> searched a lot before posting, no answer... i do not want to use leiningen 
>> at this stage,later perheaps...
>>
>> just want to compile and run
>>
>> user=> (ns clojure.examples.hello
>> (:gen-class))
>> nil
>> clojure.examples.hello=>
>> clojure.examples.hello=> (defn -main
>>   [greetee]
>>   (println (str "Hello " greetee "!")))
>> #'clojure.examples.hello/-main
>> clojure.examples.hello=> (compile 'clojure.examples.hello)
>> FileNotFoundException Could not locate clojure/examples/hello__init.class 
>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load 
>> (RT.java:443)
>>
>> help greatly appreciated (because i'm just one step to leave Clojure and 
>> continue using  Kawa or Bigloo i already use or dive into ABCL , but 
>> Clojure has a so good reputation, i cannot imagine being sticked here by a 
>> simple hello world!)
>>
>> damien
>>
>> -- 
>> 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.
>>
>
>
>
> -- 
> 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.


Re: hello world question !!!

2017-10-13 Thread Justin Smith
paths have to reflect the package and be relative to the class path, so if
"clojure/examples" is on the classpath, and the namespace is
clojure.examples.hello, the file needs to be in
"clojure/examples/clojure/examples/hello.clj"

On Fri, Oct 13, 2017 at 10:13 AM Damien Mattei 
wrote:

> i did not have , i just follow the tutorial:
> https://clojure.org/reference/compilation
> i made the file but still the same problem:
>
> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
> [mattei@moita ~]$ clojure
> Clojure 1.5.1
> user=> (compile 'clojure.examples.hello)
>
> FileNotFoundException Could not locate clojure/examples/hello__init.class
> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
> (RT.java:443)
> user=> ^C[mattei@moita ~]$
>
> [mattei@moita ~]$ cat clojure/examples/hello.clj
> (ns clojure.examples.hello
> (:gen-class))
>
>
> (defn -main
>   [greetee]
>   (println (str "Hello " greetee "!")))
>
> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>
>> Maybe this is a dumb question, but do you have a file
>> "clojure/examples/hello.clj" on the classpath? Since that's what the
>> exception is complaining about.
>>
> On 13 October 2017 at 15:09, Damien Mattei  wrote:
>>
> hello,
>>>
>>> i'm new to clojure, just installed it on a CentOS box,
>>>
>>> and try to compile the code below from tutorial, but it does not work, i
>>> searched a lot before posting, no answer... i do not want to use leiningen
>>> at this stage,later perheaps...
>>>
>>> just want to compile and run
>>>
>>> user=> (ns clojure.examples.hello
>>> (:gen-class))
>>> nil
>>> clojure.examples.hello=>
>>> clojure.examples.hello=> (defn -main
>>>   [greetee]
>>>   (println (str "Hello " greetee "!")))
>>> #'clojure.examples.hello/-main
>>> clojure.examples.hello=> (compile 'clojure.examples.hello)
>>> FileNotFoundException Could not locate
>>> clojure/examples/hello__init.class or clojure/examples/hello.clj on
>>> classpath:   clojure.lang.RT.load (RT.java:443)
>>>
>>> help greatly appreciated (because i'm just one step to leave Clojure and
>>> continue using  Kawa or Bigloo i already use or dive into ABCL , but
>>> Clojure has a so good reputation, i cannot imagine being sticked here by a
>>> simple hello world!)
>>>
>>> damien
>>>
>>> --
>>> 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.
>>>
>>
>> --
>> 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: hello world question !!!

2017-10-13 Thread Justin Smith
also you don't need to do any of this for a basic example, you can just
type code into the repl and run it, or create a proper project with a
dependency manager when you want something more organized

On Fri, Oct 13, 2017 at 10:22 AM Justin Smith  wrote:

> paths have to reflect the package and be relative to the class path, so if
> "clojure/examples" is on the classpath, and the namespace is
> clojure.examples.hello, the file needs to be in
> "clojure/examples/clojure/examples/hello.clj"
>
> On Fri, Oct 13, 2017 at 10:13 AM Damien Mattei 
> wrote:
>
>> i did not have , i just follow the tutorial:
>> https://clojure.org/reference/compilation
>> i made the file but still the same problem:
>>
>> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
>> [mattei@moita ~]$ clojure
>> Clojure 1.5.1
>> user=> (compile 'clojure.examples.hello)
>>
>> FileNotFoundException Could not locate clojure/examples/hello__init.class
>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
>> (RT.java:443)
>> user=> ^C[mattei@moita ~]$
>>
>> [mattei@moita ~]$ cat clojure/examples/hello.clj
>> (ns clojure.examples.hello
>> (:gen-class))
>>
>>
>> (defn -main
>>   [greetee]
>>   (println (str "Hello " greetee "!")))
>>
>> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>>
>>> Maybe this is a dumb question, but do you have a file
>>> "clojure/examples/hello.clj" on the classpath? Since that's what the
>>> exception is complaining about.
>>>
>> On 13 October 2017 at 15:09, Damien Mattei  wrote:
>>>
>> hello,

 i'm new to clojure, just installed it on a CentOS box,

 and try to compile the code below from tutorial, but it does not work,
 i searched a lot before posting, no answer... i do not want to use
 leiningen at this stage,later perheaps...

 just want to compile and run

 user=> (ns clojure.examples.hello
 (:gen-class))
 nil
 clojure.examples.hello=>
 clojure.examples.hello=> (defn -main
   [greetee]
   (println (str "Hello " greetee "!")))
 #'clojure.examples.hello/-main
 clojure.examples.hello=> (compile 'clojure.examples.hello)
 FileNotFoundException Could not locate
 clojure/examples/hello__init.class or clojure/examples/hello.clj on
 classpath:   clojure.lang.RT.load (RT.java:443)

 help greatly appreciated (because i'm just one step to leave Clojure
 and continue using  Kawa or Bigloo i already use or dive into ABCL , but
 Clojure has a so good reputation, i cannot imagine being sticked here by a
 simple hello world!)

 damien

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

>>>
>>> --
>>> 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: hello world question !!!

2017-10-13 Thread Andy Fingerhut
Just a note that at the top of the documentation page you mention, it says:
"Clojure compiles all code you load on-the-fly into JVM bytecode, but
sometimes it is advantageous to compile ahead-of-time (AOT)."

I would venture an estimate that most people who use Clojure do so without
using AOT compilation.  Many would advocate against using AOT compilation,
unless you are in a particular situation that requires it.

Andy

On Fri, Oct 13, 2017 at 10:13 AM, Damien Mattei 
wrote:

> i did not have , i just follow the tutorial:
> https://clojure.org/reference/compilation
> i made the file but still the same problem:
>
> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
> [mattei@moita ~]$ clojure
> Clojure 1.5.1
> user=> (compile 'clojure.examples.hello)
> FileNotFoundException Could not locate clojure/examples/hello__init.class
> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
> (RT.java:443)
> user=> ^C[mattei@moita ~]$
>
> [mattei@moita ~]$ cat clojure/examples/hello.clj
> (ns clojure.examples.hello
> (:gen-class))
>
> (defn -main
>   [greetee]
>   (println (str "Hello " greetee "!")))
>
> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>>
>> Maybe this is a dumb question, but do you have a file
>> "clojure/examples/hello.clj" on the classpath? Since that's what the
>> exception is complaining about.
>>
>> On 13 October 2017 at 15:09, Damien Mattei  wrote:
>>
>>> hello,
>>>
>>> i'm new to clojure, just installed it on a CentOS box,
>>>
>>> and try to compile the code below from tutorial, but it does not work, i
>>> searched a lot before posting, no answer... i do not want to use leiningen
>>> at this stage,later perheaps...
>>>
>>> just want to compile and run
>>>
>>> user=> (ns clojure.examples.hello
>>> (:gen-class))
>>> nil
>>> clojure.examples.hello=>
>>> clojure.examples.hello=> (defn -main
>>>   [greetee]
>>>   (println (str "Hello " greetee "!")))
>>> #'clojure.examples.hello/-main
>>> clojure.examples.hello=> (compile 'clojure.examples.hello)
>>> FileNotFoundException Could not locate clojure/examples/hello__init.class
>>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
>>> (RT.java:443)
>>>
>>> help greatly appreciated (because i'm just one step to leave Clojure and
>>> continue using  Kawa or Bigloo i already use or dive into ABCL , but
>>> Clojure has a so good reputation, i cannot imagine being sticked here by a
>>> simple hello world!)
>>>
>>> damien
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> 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: hello world question !!!

2017-10-13 Thread Damien Mattei
yes i had tested . (point) in classpath and later added clojure/example 
which is not a good idea as the namespace is already 
clojure.examples.hello, already clojure.examples will be converted in 
clojure/examples but what must i do then? where must i put this hello.clj:

(ns clojure.examples.hello
(:gen-class))

(defn -main
  [greetee]
  (println (str "Hello " greetee "!")))

to compile it with this command:
[mattei@moita ~]$ clojure
Clojure 1.5.1
user=> (compile 'clojure.examples.hello)  

for example in Kawa i put this in a Scheme class file:


*(module-name
"eu.oca.kawafunct.Counter")and the class is compiled in 
**eu/oca/kawafunct* 


what will be the good CLASSPATH so ?


On Friday, October 13, 2017 at 7:23:24 PM UTC+2, Justin Smith wrote:
>
> paths have to reflect the package and be relative to the class path, so if 
> "clojure/examples" is on the classpath, and the namespace is 
> clojure.examples.hello, the file needs to be in 
> "clojure/examples/clojure/examples/hello.clj"
>
> On Fri, Oct 13, 2017 at 10:13 AM Damien Mattei  > wrote:
>
>> i did not have , i just follow the tutorial:
>> https://clojure.org/reference/compilation
>> i made the file but still the same problem:
>>
>> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
>> [mattei@moita ~]$ clojure
>> Clojure 1.5.1
>> user=> (compile 'clojure.examples.hello)
>>
>> FileNotFoundException Could not locate clojure/examples/hello__init.class 
>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load 
>> (RT.java:443)
>> user=> ^C[mattei@moita ~]$ 
>>
>> [mattei@moita ~]$ cat clojure/examples/hello.clj 
>> (ns clojure.examples.hello
>> (:gen-class))
>>
>>
>> (defn -main
>>   [greetee]
>>   (println (str "Hello " greetee "!")))
>>
>> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>>
>>> Maybe this is a dumb question, but do you have a file 
>>> "clojure/examples/hello.clj" on the classpath? Since that's what the 
>>> exception is complaining about.
>>>
>> On 13 October 2017 at 15:09, Damien Mattei  wrote:
>>>
>> hello,

 i'm new to clojure, just installed it on a CentOS box,

 and try to compile the code below from tutorial, but it does not work, 
 i searched a lot before posting, no answer... i do not want to use 
 leiningen at this stage,later perheaps...

 just want to compile and run

 user=> (ns clojure.examples.hello
 (:gen-class))
 nil
 clojure.examples.hello=>
 clojure.examples.hello=> (defn -main
   [greetee]
   (println (str "Hello " greetee "!")))
 #'clojure.examples.hello/-main
 clojure.examples.hello=> (compile 'clojure.examples.hello)
 FileNotFoundException Could not locate 
 clojure/examples/hello__init.class or clojure/examples/hello.clj on 
 classpath:   clojure.lang.RT.load (RT.java:443)

 help greatly appreciated (because i'm just one step to leave Clojure 
 and continue using  Kawa or Bigloo i already use or dive into ABCL , but 
 Clojure has a so good reputation, i cannot imagine being sticked here by a 
 simple hello world!)

 damien

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

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

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

Re: hello world question !!!

2017-10-13 Thread Damien Mattei
but i am in this situation, i wrote application in Scheme (Kawa,Bigloo) 
,LisP that ran on an apache tomcat server, the application is deplyed in 
war files , they are precompiled ,with Kawa or Bigloo Scheme, and also use 
regular Java class compiled with Java8.
They never ran in REPL ,all the test and debug must be done on the host 
that run tomcat web server in Java 8, here is the site : 
https://sidonie.oca.eu/  

On Friday, October 13, 2017 at 7:37:08 PM UTC+2, Andy Fingerhut wrote:
>
> Just a note that at the top of the documentation page you mention, it 
> says: "Clojure compiles all code you load on-the-fly into JVM bytecode, 
> but sometimes it is advantageous to compile ahead-of-time (AOT)."
>
> I would venture an estimate that most people who use Clojure do so without 
> using AOT compilation.  Many would advocate against using AOT compilation, 
> unless you are in a particular situation that requires it.
>
> Andy
>
> On Fri, Oct 13, 2017 at 10:13 AM, Damien Mattei  > wrote:
>
>> i did not have , i just follow the tutorial:
>> https://clojure.org/reference/compilation
>> i made the file but still the same problem:
>>
>> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
>> [mattei@moita ~]$ clojure
>> Clojure 1.5.1
>> user=> (compile 'clojure.examples.hello)
>> FileNotFoundException Could not locate clojure/examples/hello__init.class 
>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load 
>> (RT.java:443)
>> user=> ^C[mattei@moita ~]$ 
>>
>> [mattei@moita ~]$ cat clojure/examples/hello.clj 
>> (ns clojure.examples.hello
>> (:gen-class))
>>
>> (defn -main
>>   [greetee]
>>   (println (str "Hello " greetee "!")))
>>
>> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>>>
>>> Maybe this is a dumb question, but do you have a file 
>>> "clojure/examples/hello.clj" on the classpath? Since that's what the 
>>> exception is complaining about.
>>>
>>> On 13 October 2017 at 15:09, Damien Mattei  wrote:
>>>
 hello,

 i'm new to clojure, just installed it on a CentOS box,

 and try to compile the code below from tutorial, but it does not work, 
 i searched a lot before posting, no answer... i do not want to use 
 leiningen at this stage,later perheaps...

 just want to compile and run

 user=> (ns clojure.examples.hello
 (:gen-class))
 nil
 clojure.examples.hello=>
 clojure.examples.hello=> (defn -main
   [greetee]
   (println (str "Hello " greetee "!")))
 #'clojure.examples.hello/-main
 clojure.examples.hello=> (compile 'clojure.examples.hello)
 FileNotFoundException Could not locate 
 clojure/examples/hello__init.class or clojure/examples/hello.clj on 
 classpath:   clojure.lang.RT.load (RT.java:443)

 help greatly appreciated (because i'm just one step to leave Clojure 
 and continue using  Kawa or Bigloo i already use or dive into ABCL , but 
 Clojure has a so good reputation, i cannot imagine being sticked here by a 
 simple hello world!)

 damien

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

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

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

Re: ANN: ClojureScript 1.9.542, spec changes & REPL enhancement

2017-10-13 Thread David Nolen
Will need something more minimal. Thanks.

David

On Fri, Oct 13, 2017 at 2:08 PM, Rangel Spasov  wrote:

> I'm getting this (I'm guessing related to the changes around CLJS-485
> RegExp flags):
>
> (iOS simulator screenshot attached).
>
>
> As you can see, the RN/JS stack traces are not very useful in this case.
> I can dig deeper if needed to find exactly where it fails (I have a few
> places where I use RegExp).
>
> Thanks all!
> Rangel
>
>
> On Friday, May 12, 2017 at 1:31:54 PM UTC-7, David Nolen wrote:
>>
>> ClojureScript, the Clojure compiler that emits JavaScript source code.
>>
>> README and source code: https://github.com/clojure/clojurescript
>>
>> Leiningen dependency information:
>>
>> [org.clojure/clojurescript "1.9.542"]
>>
>> This release is primarily about staying in sync with the latest changes
>> to spec. It
>> also includes a small but significant enhancement to REPLs to allow
>> handling multiple forms.
>>
>> As always, feedback welcome!
>>
>> ## 1.9.542
>>
>> ### Enhancements
>> * CLJS-1572: REPL doesn't give error for expressions with too many right
>> parentheses
>>
>> ### Changes
>> * cljs.spec -> cljs.spec.alpha
>> * CLJS-2013 - Add MapEntry type
>> * CLJS-2015: Self-host: `defmacro` should return the Var
>> * CLJS-2017: Upgrade Closure Compiler to latest April 2017 release
>>
>> ### Fixes
>> * CLJS-485: RegExp flags are being dropped by string/replace
>> * CLJS-1518: Case macro expansion evaluates expression twice
>> * CLJS-2024: Self-host: `find-ns-obj` broken for namespaces with 'a' as
>> the first segment
>> * CLJS-2028: `realized?` throws on LazyTransformer
>> * CLJS-2010: refer-clojure :rename throws on valid invocations
>> * CLJS-2007: Whitespace optimizations should respect :main option.
>>
>> --
> 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.


form comment and meta data?

2017-10-13 Thread Rob Nikander
Hi,

Why doesn't this compile? I tried to comment out the "private" metadata.

  (def #_^:private foo 1)
  CompilerException java.lang.RuntimeException: First argument to def must 
be a Symbol, compiling:(null:1:1) 


Rob


-- 
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: form comment and meta data?

2017-10-13 Thread Justin Smith
what happens is that the metadata reader macro is applied before the
comment reader macro, so you comment out the name of the def (which also
had the metadata attached)

user=> '(def #_ ^:private foo 1)
(def 1)

On Fri, Oct 13, 2017 at 11:48 AM Rob Nikander 
wrote:

> Hi,
>
> Why doesn't this compile? I tried to comment out the "private" metadata.
>
>   (def #_^:private foo 1)
>   CompilerException java.lang.RuntimeException: First argument to def must
> be a Symbol, compiling:(null:1:1)
>
>
> Rob
>
>
> --
> 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: form comment and meta data?

2017-10-13 Thread Rob Nikander


On Friday, October 13, 2017 at 2:55:51 PM UTC-4, Justin Smith wrote:
>
> what happens is that the metadata reader macro is applied before the 
> comment reader macro, so you comment out the name of the def (which also 
> had the metadata attached)
>
> user=> '(def #_ ^:private foo 1)
> (def 1)
>


Makes sense. Thanks.

Rob 

-- 
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: hello world question !!!

2017-10-13 Thread James Reeves
The docstring for compile

says that "The source for the lib must be in a proper
classpath-relative directory", so unfortunately you can't just create the
namespace in the REPL and compile it from there. The tutorial on the
Clojure site doesn't make that as clear as it could be.

In your revised example, you're setting the classpath incorrectly. The
classpath should contain the root of your file tree. For example, if you
have the file path "src/clojure/examples/hello.clj", then the classpath
should be set to "src".

I'm not sure how the "clojure" script you're running works, but you might
find Leiningen to be a better starting point. In Clojure 1.9, an official
"clj" script is going to be introduced, which might make this process
easier. Until then, Leiningen is probably the safer bet.

On 13 October 2017 at 18:13, Damien Mattei  wrote:

> i did not have , i just follow the tutorial:
> https://clojure.org/reference/compilation
> i made the file but still the same problem:
>
> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
> [mattei@moita ~]$ clojure
> Clojure 1.5.1
> user=> (compile 'clojure.examples.hello)
> FileNotFoundException Could not locate clojure/examples/hello__init.class
> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
> (RT.java:443)
> user=> ^C[mattei@moita ~]$
>
> [mattei@moita ~]$ cat clojure/examples/hello.clj
> (ns clojure.examples.hello
> (:gen-class))
>
> (defn -main
>   [greetee]
>   (println (str "Hello " greetee "!")))
>
> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>>
>> Maybe this is a dumb question, but do you have a file
>> "clojure/examples/hello.clj" on the classpath? Since that's what the
>> exception is complaining about.
>>
>> On 13 October 2017 at 15:09, Damien Mattei  wrote:
>>
>>> hello,
>>>
>>> i'm new to clojure, just installed it on a CentOS box,
>>>
>>> and try to compile the code below from tutorial, but it does not work, i
>>> searched a lot before posting, no answer... i do not want to use leiningen
>>> at this stage,later perheaps...
>>>
>>> just want to compile and run
>>>
>>> user=> (ns clojure.examples.hello
>>> (:gen-class))
>>> nil
>>> clojure.examples.hello=>
>>> clojure.examples.hello=> (defn -main
>>>   [greetee]
>>>   (println (str "Hello " greetee "!")))
>>> #'clojure.examples.hello/-main
>>> clojure.examples.hello=> (compile 'clojure.examples.hello)
>>> FileNotFoundException Could not locate clojure/examples/hello__init.class
>>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
>>> (RT.java:443)
>>>
>>> help greatly appreciated (because i'm just one step to leave Clojure and
>>> continue using  Kawa or Bigloo i already use or dive into ABCL , but
>>> Clojure has a so good reputation, i cannot imagine being sticked here by a
>>> simple hello world!)
>>>
>>> damien
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> 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.
>



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

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Colin Fleming
This looks great! Can this be used to infer macro specs based on examples
of usage?

On 14 October 2017 at 04:30, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:

> Hi,
>
> Happy to announce a new set of tools to *automatically*
> *generate* types and specs for your projects.
>
> *Dependency information:*
> 1. core.typed 
> [org.clojure/core.typed "0.4.2"]
> 2. lein-typed 
> [lein-typed "0.4.2"]
> 3. boot-typedclojure 
>   [org.typedclojure/boot-typedclojure "0.1.0"]
>
> *Tutorial:*
> Here's how to try it out (for Lein projects using clojure.test):
>
> 1. Add {:user {:plugins [[lein-typed "0.4.2"]]}} to your
> ~/.lein/profiles.clj
> 2. Add a runtime dependency to [org.clojure/core.typed "0.4.2"] in your
> chosen Lein project.clj
> 3. To infer specs: Run lein typed infer-spec 
> 4. To infer types: Run lein typed infer-type 
>
> WARNING: This tool *rewrites your files*. Only try with backed up code.
>
> *Some examples:*
> *clj-time:*
> *- *Spec setup
> 
> + spec results
> 
> - Types setup
> 
> + types results
> 
>
> *cheshire*
> *- *Spec setup
> 
> + spec results
> 
> - Types setup
> 
> + types results
> 
>
> (Note: use the latest core.typed versions to reproduce on your machines)
>
> *Hints:*
> This tool instruments your namespace and runs your test suite. This
> can be expensive. Try these options:
>
> *   Choose lein test selectors (here: [:integration :generative]
> selectors)*
>   lein typed infer-spec  :test-selectors "[:integration
> :generative]"
>
> *   Timeout individual tests (1000ms timeout)*
>   lein typed infer-spec  :test-timeout-ms 1000
>
> If annotation generation hangs, try these options:
>
> *   Disable recursive type inference*
>   lein typed infer-spec  :infer-opts "{:no-squash-vertically
> true}"
>
> If you see "No such namespace: s", try deleting existing automatically
> generated specs/types before regenerating them. (git checkout works well
> here)
>
>
>
> *Reply* with your generated specs & types!
>
> Thanks,
> Ambrose
>
> --
> 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: hello world question !!!

2017-10-13 Thread Andy Fingerhut
I haven't deployed an application written in Clojure to a server as a WAR
file before, so can't speak from experience, but I am sure others here
probably can.  Hey, others, have you deployed a Clojure application via a
WAR file without using AOT compilation, with only Clojure source code
packaged in the WAR file?  Is that something that works?

Andy

On Fri, Oct 13, 2017 at 11:05 AM, Damien Mattei 
wrote:

> but i am in this situation, i wrote application in Scheme (Kawa,Bigloo)
> ,LisP that ran on an apache tomcat server, the application is deplyed in
> war files , they are precompiled ,with Kawa or Bigloo Scheme, and also use
> regular Java class compiled with Java8.
> They never ran in REPL ,all the test and debug must be done on the host
> that run tomcat web server in Java 8, here is the site :
> https://sidonie.oca.eu/
>
> On Friday, October 13, 2017 at 7:37:08 PM UTC+2, Andy Fingerhut wrote:
>>
>> Just a note that at the top of the documentation page you mention, it
>> says: "Clojure compiles all code you load on-the-fly into JVM bytecode,
>> but sometimes it is advantageous to compile ahead-of-time (AOT)."
>>
>> I would venture an estimate that most people who use Clojure do so
>> without using AOT compilation.  Many would advocate against using AOT
>> compilation, unless you are in a particular situation that requires it.
>>
>> Andy
>>
>> On Fri, Oct 13, 2017 at 10:13 AM, Damien Mattei 
>> wrote:
>>
>>> i did not have , i just follow the tutorial:
>>> https://clojure.org/reference/compilation
>>> i made the file but still the same problem:
>>>
>>> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
>>> [mattei@moita ~]$ clojure
>>> Clojure 1.5.1
>>> user=> (compile 'clojure.examples.hello)
>>> FileNotFoundException Could not locate clojure/examples/hello__init.class
>>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
>>> (RT.java:443)
>>> user=> ^C[mattei@moita ~]$
>>>
>>> [mattei@moita ~]$ cat clojure/examples/hello.clj
>>> (ns clojure.examples.hello
>>> (:gen-class))
>>>
>>> (defn -main
>>>   [greetee]
>>>   (println (str "Hello " greetee "!")))
>>>
>>> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:

 Maybe this is a dumb question, but do you have a file
 "clojure/examples/hello.clj" on the classpath? Since that's what the
 exception is complaining about.

 On 13 October 2017 at 15:09, Damien Mattei  wrote:

> hello,
>
> i'm new to clojure, just installed it on a CentOS box,
>
> and try to compile the code below from tutorial, but it does not work,
> i searched a lot before posting, no answer... i do not want to use
> leiningen at this stage,later perheaps...
>
> just want to compile and run
>
> user=> (ns clojure.examples.hello
> (:gen-class))
> nil
> clojure.examples.hello=>
> clojure.examples.hello=> (defn -main
>   [greetee]
>   (println (str "Hello " greetee "!")))
> #'clojure.examples.hello/-main
> clojure.examples.hello=> (compile 'clojure.examples.hello)
> FileNotFoundException Could not locate clojure/examples/hello__init.class
> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load
> (RT.java:443)
>
> help greatly appreciated (because i'm just one step to leave Clojure
> and continue using  Kawa or Bigloo i already use or dive into ABCL , but
> Clojure has a so good reputation, i cannot imagine being sticked here by a
> simple hello world!)
>
> damien
>
> --
> 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.
>



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

Re: hello world question !!!

2017-10-13 Thread Damien Mattei
@james
i also try to set the CLASSPATH at src but it does noot work, i will try 
Leiningen monday
Regards,

Damien

On Friday, October 13, 2017 at 9:12:55 PM UTC+2, James Reeves wrote:
>
> The docstring for compile 
> 
>  
> says that "The source for the lib must be in a proper
> classpath-relative directory", so unfortunately you can't just create the 
> namespace in the REPL and compile it from there. The tutorial on the 
> Clojure site doesn't make that as clear as it could be.
>
> In your revised example, you're setting the classpath incorrectly. The 
> classpath should contain the root of your file tree. For example, if you 
> have the file path "src/clojure/examples/hello.clj", then the classpath 
> should be set to "src".
>
> I'm not sure how the "clojure" script you're running works, but you might 
> find Leiningen to be a better starting point. In Clojure 1.9, an official 
> "clj" script is going to be introduced, which might make this process 
> easier. Until then, Leiningen is probably the safer bet.
>
> On 13 October 2017 at 18:13, Damien Mattei  > wrote:
>
>> i did not have , i just follow the tutorial:
>> https://clojure.org/reference/compilation
>> i made the file but still the same problem:
>>
>> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
>> [mattei@moita ~]$ clojure
>> Clojure 1.5.1
>> user=> (compile 'clojure.examples.hello)
>> FileNotFoundException Could not locate clojure/examples/hello__init.class 
>> or clojure/examples/hello.clj on classpath:   clojure.lang.RT.load 
>> (RT.java:443)
>> user=> ^C[mattei@moita ~]$ 
>>
>> [mattei@moita ~]$ cat clojure/examples/hello.clj 
>> (ns clojure.examples.hello
>> (:gen-class))
>>
>> (defn -main
>>   [greetee]
>>   (println (str "Hello " greetee "!")))
>>
>> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>>>
>>> Maybe this is a dumb question, but do you have a file 
>>> "clojure/examples/hello.clj" on the classpath? Since that's what the 
>>> exception is complaining about.
>>>
>>> On 13 October 2017 at 15:09, Damien Mattei  wrote:
>>>
 hello,

 i'm new to clojure, just installed it on a CentOS box,

 and try to compile the code below from tutorial, but it does not work, 
 i searched a lot before posting, no answer... i do not want to use 
 leiningen at this stage,later perheaps...

 just want to compile and run

 user=> (ns clojure.examples.hello
 (:gen-class))
 nil
 clojure.examples.hello=>
 clojure.examples.hello=> (defn -main
   [greetee]
   (println (str "Hello " greetee "!")))
 #'clojure.examples.hello/-main
 clojure.examples.hello=> (compile 'clojure.examples.hello)
 FileNotFoundException Could not locate 
 clojure/examples/hello__init.class or clojure/examples/hello.clj on 
 classpath:   clojure.lang.RT.load (RT.java:443)

 help greatly appreciated (because i'm just one step to leave Clojure 
 and continue using  Kawa or Bigloo i already use or dive into ABCL , but 
 Clojure has a so good reputation, i cannot imagine being sticked here by a 
 simple hello world!)

 damien

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

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

Re: hello world question !!!

2017-10-13 Thread Damien Mattei
@andy
to deploy the WAR file , i also use Netbeans to create it with java files, 
the .scm scheme, files are .class files ( 
https://github.com/damien-mattei/Jkawa/tree/master/eu/oca/kawafunct 
)precompiled with Kawa scheme ( https://github.com/damien-mattei/Jkawa )and 
,Bigloo scheme ( https://github.com/damien-mattei/Jbigl )compilers to JVM 
byte code and after packaged in .jar files , also i need to add the runtime 
library of each language, one for kawa and another for bigloo, they must be 
packaged in .jar files (not .zip) also;  i have a draft that explain this:
https://sidonie.oca.eu/Sidonie/technical-doc.html
i almost sure that if i got some clojure source file that i can compile it 
to JVM .class files and make .jar files of them they can be exported in a 
.war files as a library in my Netbeans project the way it was for Kawa and 
Bigloo, if clojure use a runtime library (and i suppose it's yes) this 
library should be packaged in a.jar file and add also in the .war file

On Friday, October 13, 2017 at 10:13:24 PM UTC+2, Andy Fingerhut wrote:
>
> I haven't deployed an application written in Clojure to a server as a WAR 
> file before, so can't speak from experience, but I am sure others here 
> probably can.  Hey, others, have you deployed a Clojure application via a 
> WAR file without using AOT compilation, with only Clojure source code 
> packaged in the WAR file?  Is that something that works?
>
> Andy
>
> On Fri, Oct 13, 2017 at 11:05 AM, Damien Mattei  > wrote:
>
>> but i am in this situation, i wrote application in Scheme (Kawa,Bigloo) 
>> ,LisP that ran on an apache tomcat server, the application is deplyed in 
>> war files , they are precompiled ,with Kawa or Bigloo Scheme, and also use 
>> regular Java class compiled with Java8.
>> They never ran in REPL ,all the test and debug must be done on the host 
>> that run tomcat web server in Java 8, here is the site : 
>> https://sidonie.oca.eu/  
>>
>> On Friday, October 13, 2017 at 7:37:08 PM UTC+2, Andy Fingerhut wrote:
>>>
>>> Just a note that at the top of the documentation page you mention, it 
>>> says: "Clojure compiles all code you load on-the-fly into JVM bytecode, 
>>> but sometimes it is advantageous to compile ahead-of-time (AOT)."
>>>
>>> I would venture an estimate that most people who use Clojure do so 
>>> without using AOT compilation.  Many would advocate against using AOT 
>>> compilation, unless you are in a particular situation that requires it.
>>>
>>> Andy
>>>
>>> On Fri, Oct 13, 2017 at 10:13 AM, Damien Mattei  
>>> wrote:
>>>
 i did not have , i just follow the tutorial:
 https://clojure.org/reference/compilation
 i made the file but still the same problem:

 [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
 [mattei@moita ~]$ clojure
 Clojure 1.5.1
 user=> (compile 'clojure.examples.hello)
 FileNotFoundException Could not locate 
 clojure/examples/hello__init.class or clojure/examples/hello.clj on 
 classpath:   clojure.lang.RT.load (RT.java:443)
 user=> ^C[mattei@moita ~]$ 

 [mattei@moita ~]$ cat clojure/examples/hello.clj 
 (ns clojure.examples.hello
 (:gen-class))

 (defn -main
   [greetee]
   (println (str "Hello " greetee "!")))

 On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>
> Maybe this is a dumb question, but do you have a file 
> "clojure/examples/hello.clj" on the classpath? Since that's what the 
> exception is complaining about.
>
> On 13 October 2017 at 15:09, Damien Mattei  
> wrote:
>
>> hello,
>>
>> i'm new to clojure, just installed it on a CentOS box,
>>
>> and try to compile the code below from tutorial, but it does not 
>> work, i searched a lot before posting, no answer... i do not want to use 
>> leiningen at this stage,later perheaps...
>>
>> just want to compile and run
>>
>> user=> (ns clojure.examples.hello
>> (:gen-class))
>> nil
>> clojure.examples.hello=>
>> clojure.examples.hello=> (defn -main
>>   [greetee]
>>   (println (str "Hello " greetee "!")))
>> #'clojure.examples.hello/-main
>> clojure.examples.hello=> (compile 'clojure.examples.hello)
>> FileNotFoundException Could not locate 
>> clojure/examples/hello__init.class or clojure/examples/hello.clj on 
>> classpath:   clojure.lang.RT.load (RT.java:443)
>>
>> help greatly appreciated (because i'm just one step to leave Clojure 
>> and continue using  Kawa or Bigloo i already use or dive into ABCL , but 
>> Clojure has a so good reputation, i cannot imagine being sticked here by 
>> a 
>> simple hello world!)
>>
>> damien
>>
>> -- 
>> 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 moderat

Re: ANN: ClojureScript 1.9.542, spec changes & REPL enhancement

2017-10-13 Thread Rangel Spasov
Sorry, that was false alarm. Ok, that's kinda funny: 

Without paying attention I saw this on the top of the mailing list in 
google groups and just copy/pasted the version number and tried to build, 
only to just realize that I DOWNGRADED to a ClojureScript release from May 
12th LOL. My bad.
Somehow this thread got bumped to the top of groups.google.com.

Everything is working OK with the latest 
ClojureScript [org.clojure/clojurescript "1.9.946"]

Sorry for the false alarm!

Rangel


On Friday, October 13, 2017 at 11:34:24 AM UTC-7, David Nolen wrote:
>
> Will need something more minimal. Thanks.
>
> David
>
> On Fri, Oct 13, 2017 at 2:08 PM, Rangel Spasov  > wrote:
>
>> I'm getting this (I'm guessing related to the changes around CLJS-485 
>> RegExp flags):
>>
>> (iOS simulator screenshot attached).
>>
>>
>> As you can see, the RN/JS stack traces are not very useful in this case. 
>> I can dig deeper if needed to find exactly where it fails (I have a few 
>> places where I use RegExp).
>>
>> Thanks all!
>> Rangel
>>  
>>
>> On Friday, May 12, 2017 at 1:31:54 PM UTC-7, David Nolen wrote:
>>>
>>> ClojureScript, the Clojure compiler that emits JavaScript source code.
>>>
>>> README and source code: https://github.com/clojure/clojurescript
>>>
>>> Leiningen dependency information:
>>>
>>> [org.clojure/clojurescript "1.9.542"]
>>>
>>> This release is primarily about staying in sync with the latest changes 
>>> to spec. It
>>> also includes a small but significant enhancement to REPLs to allow 
>>> handling multiple forms.
>>>
>>> As always, feedback welcome!
>>>
>>> ## 1.9.542
>>>
>>> ### Enhancements
>>> * CLJS-1572: REPL doesn't give error for expressions with too many right 
>>> parentheses
>>>
>>> ### Changes
>>> * cljs.spec -> cljs.spec.alpha
>>> * CLJS-2013 - Add MapEntry type
>>> * CLJS-2015: Self-host: `defmacro` should return the Var
>>> * CLJS-2017: Upgrade Closure Compiler to latest April 2017 release
>>>
>>> ### Fixes
>>> * CLJS-485: RegExp flags are being dropped by string/replace
>>> * CLJS-1518: Case macro expansion evaluates expression twice
>>> * CLJS-2024: Self-host: `find-ns-obj` broken for namespaces with 'a' as 
>>> the first segment
>>> * CLJS-2028: `realized?` throws on LazyTransformer
>>> * CLJS-2010: refer-clojure :rename throws on valid invocations
>>> * CLJS-2007: Whitespace optimizations should respect :main option.
>>>
>>> -- 
>> 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.
>>
>
>

-- 
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] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
Potentially. Actually, it currently instruments and gathers data about 
macros, but doesn't 

output them 

 
because I haven't thought of very good heuristics to guess specs for common
macros (in particular heterogeneous/repeating lists and vectors are 
troublesome, I haven't
tried outputting any spec regex ops).

Thanks,
Ambrose

On Friday, October 13, 2017 at 3:54:22 PM UTC-4, Colin Fleming wrote:
>
> This looks great! Can this be used to infer macro specs based on examples 
> of usage?
>
> On 14 October 2017 at 04:30, Ambrose Bonnaire-Sergeant <
> abonnair...@gmail.com > wrote:
>
>> Hi,
>>
>> Happy to announce a new set of tools to *automatically*
>> *generate* types and specs for your projects.
>>
>> *Dependency information:*
>> 1. core.typed 
>> [org.clojure/core.typed "0.4.2"]
>> 2. lein-typed 
>> [lein-typed "0.4.2"]
>> 3. boot-typedclojure 
>>   [org.typedclojure/boot-typedclojure "0.1.0"]
>>
>> *Tutorial:*
>> Here's how to try it out (for Lein projects using clojure.test):
>>
>> 1. Add {:user {:plugins [[lein-typed "0.4.2"]]}} to your 
>> ~/.lein/profiles.clj
>> 2. Add a runtime dependency to [org.clojure/core.typed "0.4.2"] in your 
>> chosen Lein project.clj
>> 3. To infer specs: Run lein typed infer-spec  
>> 4. To infer types: Run lein typed infer-type 
>>
>> WARNING: This tool *rewrites your files*. Only try with backed up code.
>>
>> *Some examples:*
>> *clj-time:*
>> *- *Spec setup 
>> 
>>  
>> + spec results 
>> 
>> - Types setup 
>> 
>>  
>> + types results 
>> 
>>
>> *cheshire*
>> *- *Spec setup 
>> 
>>  
>> + spec results 
>> 
>> - Types setup 
>> 
>>  
>> + types results 
>> 
>>
>> (Note: use the latest core.typed versions to reproduce on your machines)
>>
>> *Hints:*
>> This tool instruments your namespace and runs your test suite. This
>> can be expensive. Try these options:
>>
>> *   Choose lein test selectors (here: [:integration :generative] 
>> selectors)*
>>   lein typed infer-spec  :test-selectors "[:integration 
>> :generative]"
>>
>> *   Timeout individual tests (1000ms timeout)*
>>   lein typed infer-spec  :test-timeout-ms 1000
>>
>> If annotation generation hangs, try these options:
>>
>> *   Disable recursive type inference*
>>   lein typed infer-spec  :infer-opts "{:no-squash-vertically 
>> true}"
>>
>> If you see "No such namespace: s", try deleting existing automatically 
>> generated specs/types before regenerating them. (git checkout works well 
>> here)
>>
>>
>>
>> *Reply* with your generated specs & types!
>>
>> Thanks,
>> Ambrose
>>
>> -- 
>> 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.
>>
>
>

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

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
This 

 
is pretty much the extent of my macro heuristics: binding forms are
often the first argument, and it's usually a vector. Also, [& body] 
arguments
are common.

On Friday, October 13, 2017 at 5:44:07 PM UTC-4, Ambrose Bonnaire-Sergeant 
wrote:
>
> Potentially. Actually, it currently instruments and gathers data about 
> macros, but doesn't 
> 
> output them 
> 
>  
> because I haven't thought of very good heuristics to guess specs for common
> macros (in particular heterogeneous/repeating lists and vectors are 
> troublesome, I haven't
> tried outputting any spec regex ops).
>
> Thanks,
> Ambrose
>
> On Friday, October 13, 2017 at 3:54:22 PM UTC-4, Colin Fleming wrote:
>>
>> This looks great! Can this be used to infer macro specs based on examples 
>> of usage?
>>
>> On 14 October 2017 at 04:30, Ambrose Bonnaire-Sergeant <
>> abonnair...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Happy to announce a new set of tools to *automatically*
>>> *generate* types and specs for your projects.
>>>
>>> *Dependency information:*
>>> 1. core.typed 
>>> [org.clojure/core.typed "0.4.2"]
>>> 2. lein-typed 
>>> [lein-typed "0.4.2"]
>>> 3. boot-typedclojure 
>>>   [org.typedclojure/boot-typedclojure "0.1.0"]
>>>
>>> *Tutorial:*
>>> Here's how to try it out (for Lein projects using clojure.test):
>>>
>>> 1. Add {:user {:plugins [[lein-typed "0.4.2"]]}} to your 
>>> ~/.lein/profiles.clj
>>> 2. Add a runtime dependency to [org.clojure/core.typed "0.4.2"] in your 
>>> chosen Lein project.clj
>>> 3. To infer specs: Run lein typed infer-spec  
>>> 4. To infer types: Run lein typed infer-type 
>>>
>>> WARNING: This tool *rewrites your files*. Only try with backed up code.
>>>
>>> *Some examples:*
>>> *clj-time:*
>>> *- *Spec setup 
>>> 
>>>  
>>> + spec results 
>>> 
>>> - Types setup 
>>> 
>>>  
>>> + types results 
>>> 
>>>
>>> *cheshire*
>>> *- *Spec setup 
>>> 
>>>  
>>> + spec results 
>>> 
>>> - Types setup 
>>> 
>>>  
>>> + types results 
>>> 
>>>
>>> (Note: use the latest core.typed versions to reproduce on your machines)
>>>
>>> *Hints:*
>>> This tool instruments your namespace and runs your test suite. This
>>> can be expensive. Try these options:
>>>
>>> *   Choose lein test selectors (here: [:integration :generative] 
>>> selectors)*
>>>   lein typed infer-spec  :test-selectors "[:integration 
>>> :generative]"
>>>
>>> *   Timeout individual tests (1000ms timeout)*
>>>   lein typed infer-spec  :test-timeout-ms 1000
>>>
>>> If annotation generation hangs, try these options:
>>>
>>> *   Disable recursive type inference*
>>>   lein typed infer-spec  :infer-opts "{:no-squash-vertically 
>>> true}"
>>>
>>> If you see "No such namespace: s", try deleting existing automatically 
>>> generated specs/types before regenerating them. (git checkout works well 
>>> here)
>>>
>>>
>>>
>>> *Reply* with your generated specs & types!
>>>
>>> Thanks,
>>> Ambrose
>>>
>>> -- 
>>> 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.
>>>
>>
>>

-- 
You received this message because yo

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
I enabled opt-in macro spec inference in core.typed 0.4.3, via
a :spec-macros option.

Here's an example with slingshot:

Setup 

Inferred Macro specs 


Thanks,
Ambrose

On Friday, October 13, 2017 at 5:46:36 PM UTC-4, Ambrose Bonnaire-Sergeant 
wrote:
>
> This 
> 
>  
> is pretty much the extent of my macro heuristics: binding forms are
> often the first argument, and it's usually a vector. Also, [& body] 
> arguments
> are common.
>
> On Friday, October 13, 2017 at 5:44:07 PM UTC-4, Ambrose Bonnaire-Sergeant 
> wrote:
>>
>> Potentially. Actually, it currently instruments and gathers data about 
>> macros, but doesn't 
>> 
>> output them 
>> 
>>  
>> because I haven't thought of very good heuristics to guess specs for common
>> macros (in particular heterogeneous/repeating lists and vectors are 
>> troublesome, I haven't
>> tried outputting any spec regex ops).
>>
>> Thanks,
>> Ambrose
>>
>> On Friday, October 13, 2017 at 3:54:22 PM UTC-4, Colin Fleming wrote:
>>>
>>> This looks great! Can this be used to infer macro specs based on 
>>> examples of usage?
>>>
>>> On 14 October 2017 at 04:30, Ambrose Bonnaire-Sergeant <
>>> abonnair...@gmail.com> wrote:
>>>
 Hi,

 Happy to announce a new set of tools to *automatically*
 *generate* types and specs for your projects.

 *Dependency information:*
 1. core.typed 
 [org.clojure/core.typed "0.4.2"]
 2. lein-typed 
 [lein-typed "0.4.2"]
 3. boot-typedclojure 
 
   [org.typedclojure/boot-typedclojure "0.1.0"]

 *Tutorial:*
 Here's how to try it out (for Lein projects using clojure.test):

 1. Add {:user {:plugins [[lein-typed "0.4.2"]]}} to your 
 ~/.lein/profiles.clj
 2. Add a runtime dependency to [org.clojure/core.typed "0.4.2"] in 
 your chosen Lein project.clj
 3. To infer specs: Run lein typed infer-spec  
 4. To infer types: Run lein typed infer-type 

 WARNING: This tool *rewrites your files*. Only try with backed up code.

 *Some examples:*
 *clj-time:*
 *- *Spec setup 
 
  
 + spec results 
 
 - Types setup 
 
  
 + types results 
 

 *cheshire*
 *- *Spec setup 
 
  
 + spec results 
 
 - Types setup 
 
  
 + types results 
 

 (Note: use the latest core.typed versions to reproduce on your machines)

 *Hints:*
 This tool instruments your namespace and runs your test suite. This
 can be expensive. Try these options:

 *   Choose lein test selectors (here: [:integration :generative] 
 selectors)*
   lein typed infer-spec  :test-selectors "[:integration 
 :generative]"

 *   Timeout individual tests (1000ms timeout)*
   lein typed infer-spec  :test-timeout-ms 1000

 If annotation generation hangs, try these options:

 *   Disable recursive type inference*
   lein typed infer-spec  :infer-opts 
 "{:no-squash-vertically true}"

 If you see "No such namespace: s", try deleting existing automatically 
 generated specs/types before regenerating them. (git checkout works well 
 here)



 *Reply* with your generated specs & types!

 Thanks,
 Ambrose

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

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Rostislav Svoboda
A hint to a casual reader just trying stuff out:

$ lein new hello
$ cd hello
# added {:user {:plugins [[lein-typed "0.4.2"]]}} to ~/.lein/profiles.clj
# added [org.clojure/core.typed "0.4.2"] to project.clj
$ lein typed infer-type hello.core
CompilerException java.lang.RuntimeException: No such namespace: t,
compiling:(hello/core.clj:5:1)
clojure.lang.Compiler.analyze (Compiler.java:6688)
clojure.lang.Compiler.analyze (Compiler.java:6625)
clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3766)
clojure.lang.Compiler.analyzeSeq (Compiler.java:6870)
clojure.lang.Compiler.analyze (Compiler.java:6669)
clojure.lang.Compiler.analyze (Compiler.java:6625)
clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:6001)
clojure.lang.Compiler$FnMethod.parse (Compiler.java:5380)
clojure.lang.Compiler$FnExpr.parse (Compiler.java:3972)
clojure.lang.Compiler.analyzeSeq (Compiler.java:6866)
clojure.lang.Compiler.analyze (Compiler.java:6669)
clojure.lang.Compiler.eval (Compiler.java:6924)
Caused by:
RuntimeException No such namespace: t
clojure.lang.Util.runtimeException (Util.java:221)
clojure.lang.Compiler.resolveIn (Compiler.java:7134)
clojure.lang.Compiler.resolve (Compiler.java:7108)
clojure.lang.Compiler.analyzeSymbol (Compiler.java:7069)
clojure.lang.Compiler.analyze (Compiler.java:6648)
clojure.lang.Compiler.analyze (Compiler.java:6625)

You need to:
1. Remove the [org.clojure/clojure "1.8.0"] from project.clj
2. Undo the changes in src/hello/core.clj

And then it will work:

$ lein typed infer-type hello.core
Initializing core.typed ...
Building core.typed base environments ...
Finished building base environments
"Elapsed time: 2829.892198 msecs"
core.typed initialized.
Refreshing runtime inference
Instrumenting def init hello.core/foo in hello.core

Testing hello.core-test

FAIL in (a-test) (core_test.clj:7)
FIXME, I fail.
expected: (= 0 1)
  actual: (not (= 0 1))

Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
Inferring types for hello.core ...
Aliasing clojure.core.typed as t in hello.core
generate-tenv: 1 infer-results
finished squash-horizonally
Start follow-all
end follow-all
start remove unreachable aliases
end remove unreachable aliases
done populating
Output annotations to  #object[java.net.URL 0x738a39cc
file:/tmp/hello/src/hello/core.clj]
Finished inference, output written to hello.core



2017-10-13 23:46 GMT+02:00 Ambrose Bonnaire-Sergeant :
> This is pretty much the extent of my macro heuristics: binding forms are
> often the first argument, and it's usually a vector. Also, [& body]
> arguments
> are common.
>
>
> On Friday, October 13, 2017 at 5:44:07 PM UTC-4, Ambrose Bonnaire-Sergeant
> wrote:
>>
>> Potentially. Actually, it currently instruments and gathers data about
>> macros, but doesn't
>> output them because I haven't thought of very good heuristics to guess
>> specs for common
>> macros (in particular heterogeneous/repeating lists and vectors are
>> troublesome, I haven't
>> tried outputting any spec regex ops).
>>
>> Thanks,
>> Ambrose
>>
>> On Friday, October 13, 2017 at 3:54:22 PM UTC-4, Colin Fleming wrote:
>>>
>>> This looks great! Can this be used to infer macro specs based on examples
>>> of usage?
>>>
>>> On 14 October 2017 at 04:30, Ambrose Bonnaire-Sergeant
>>>  wrote:

 Hi,

 Happy to announce a new set of tools to automatically
 generate types and specs for your projects.

 Dependency information:
 1. core.typed
 [org.clojure/core.typed "0.4.2"]
 2. lein-typed
 [lein-typed "0.4.2"]
 3. boot-typedclojure
   [org.typedclojure/boot-typedclojure "0.1.0"]

 Tutorial:
 Here's how to try it out (for Lein projects using clojure.test):

 1. Add {:user {:plugins [[lein-typed "0.4.2"]]}} to your
 ~/.lein/profiles.clj
 2. Add a runtime dependency to [org.clojure/core.typed "0.4.2"] in your
 chosen Lein project.clj
 3. To infer specs: Run lein typed infer-spec 
 4. To infer types: Run lein typed infer-type 

 WARNING: This tool rewrites your files. Only try with backed up code.

 Some examples:
 clj-time:
 - Spec setup + spec results
 - Types setup + types results

 cheshire
 - Spec setup + spec results
 - Types setup + types results

 (Note: use the latest core.typed versions to reproduce on your machines)

 Hints:
 This tool instruments your namespace and runs your test suite. This
 can be expensive. Try these options:

Choose lein test selectors (here: [:integration :generative]
 selectors)
   lein typed infer-spec  :test-selectors "[:integration
 :generative]"

Timeout individual tests (1000ms timeout)
   lein typed infer-spec  :test-timeout-ms 1000

 If annotation generation hangs, try these options:

Disable recursive type inference
   lein typed infer-spec  :infer-opts "{:no-squash-vertically
 true}"

 If you see "No such namesp

Re: hello world question !!!

2017-10-13 Thread John M. Switlik
Damien, 

This is just an aside. Thanks for the question. 

I have not even tried Clojure, yet. So, this is good for me to follow. BTW, 
I have done Java (since the '90s) and so know of the 'coffee' stains 
everywhere. Yet, given the Lisp basis, I want to see how to make Clojure 
easier for the causal user. In fact, I got engineers to use Lisp (it was 
easy); I know of a whole category that don't want to cowboy code; to me, 
Clojure looks like a natural fit. Too, I am also now aware of serious 
Clojure work and successes. 

Already, I am thinking that I will have to have my developers and their 
user's systems call out to a server (various options) where my developers 
control all of that. But, I do not want to get ahead of things. Paying for 
the delay will be worth avoidance of the 'jar-like' issues. Again, not 
jumping ahead. But, Python was so easy to install. 

And so, I'm creating a basis (control, if you would). Take JavaScript 
(please). With only SeaMonkey (and its Composer), in about an hour, I coded 
a system that I had thought about, for a while. Write the code in Composer; 
re-load the file in the browser. With no IDE, it got tedious, as there is 
no feedback. But there are ways to handle the strain (decades of 
development work). We have become too IDE dependent. Of course, Emacs is 
there, but I am trying to target the occasional, and very much casual, 
developer (a very large class) with something other than toy stuff. 

I have a couple more to do; all of these will be matched against Clojure 
when the ducks get in order. Of course, the comparison will be with using 
Clojure as a frontend extension. 

Yet, the ease was that great. Code JavaScript; load the file (having split 
the JavaScript into a js file - one could embed the code in the HTML). I 
had to install nothing (except SeaMonkey to get its little editor). I did 
grab some time by using those interpreter windows at the tutorial sites. 
Nice feature. You code and modify. Just remember to pull the text down to 
your file. 

Wait! Yes, I did do that at one of the Clojure tutorial sites. Wrote my own 
stuff and tried it out. 

There are different hats to be worn for admin versus coding versus knowing 
how parameter mixes match up. 

When you get this settled, will you summarize for us newbies? 

-- 
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: possibly a Clojure question or possibly an AWS question: slow writes to durable-queue

2017-10-13 Thread Ravindra Jaju
I've faced this issue before, and I'd hazard a guess that like me, it could
be related to the IOPS settings.

AWS' IO performance is highly variable, and you get good performance in
bursts, in very low volumes, and generally only initially for long runs.
Which kind of makes sense, unless you reserve.

durable-queue has a good amount of round-tripping for each 'task'
(depending on how often it syncs too). Combine that with your general
applications logging (debug mode? info mode?) and it simply adds up
overwhelming the entire IO system.

Our volumes were large (both data-, and number of instances-wise). My
workaround was to create a RAM-based filesystem and hold the durable-queue
on it. Which is okay for our use-case because if the machine were to be
killed, we didn't care about the "durability" across instance reboots as
such. Our perf issues as far as durable-queues go vanished! As an aside,
reducing the log-levels too affected app performance on AWS, for the
default config instances.

Memory consumption, though an indicator of problems, isn't necessarily a
direct indicator of things. The IO-backlog's backpressure on the entire JVM
runtime is also a possible reason. At least in my case, it went away once
the durable-queue was moved to the RAM-FS.

Good luck!

-- 
jaju

On Fri, Oct 13, 2017 at 10:05 AM,  wrote:

> Following Daniel Compton's suggestion, I turned on logging for GC. I don't
> see it happening more often, but the slow down does seem related to the
> moment when the app hits the maximum memory allowed. It had been running
> with 4G, so I increased that to 7G, so it goes longer now before it hits
> 98% memory usage, but it does hit it eventually and then everything crawls
> to a very slow speed. Not sure how much memory I would have to use to avoid
> using up almost all of the memory. I suppose I'll figure that out via trial
> and error. Until I can figure that out, nearly all other performance tricks
> seems a bit besides the point.
>
>
>
> On Thursday, October 12, 2017 at 9:01:23 PM UTC-4, Nathan Fisher wrote:
>>
>> Hi!
>>
>> Can you change one of the variables? Specifically can you replicate this
>> on your local machine? If it happens locally then I would focus on
>> something in the JVM eco-system.
>>
>> If you can't replicate it locally then it's possibly AWS specific. It
>> sounds like you're using a t2.large or m4.xlarge. If it's the prior you may
>> very well be contending between with your network bandwidth. EC2's host
>> drive (EBS) is a networked drive which is split between your standard
>> network traffic and the drive volume. If that's the issue then you might
>> need to look at provisioned IOPs. A quick(ish) way to test that hypothesis
>> is to provision a host with high networking performance and provisioned
>> IOPs.
>>
>> Cheers,
>> Nathan
>>
>> On Fri, 13 Oct 2017 at 00:05  wrote:
>>
>>> Daniel Compton, good suggestion. I've increased the memory to see if I
>>> can postpone the GCs, and I'll log that more carefully.
>>>
>>>
>>> On Wednesday, October 11, 2017 at 8:35:44 PM UTC-4, Daniel Compton wrote:
>>>
 Without more information it's hard to tell, but this looks a like it
 could be a garbage collection issue. Can you run your test again and add
 some logging/monitoring to show each garbage collection? If my hunch is
 right, you'll see garbage collections getting more and more frequent until
 they take up nearly all the CPU time, preventing much forward progress
 writing to the queue.

 If it's AWS based throttling, then CloudWatch monitoring
 http://docs.aws.amazon.com/AWSEC2/latest/UserGuid
 e/monitoring-volume-status.html#using_cloudwatch_ebs might show you
 some hints. You could also test with an NVMe drive attached, just to see if
 disk bandwidth is the issue.

 On Thu, Oct 12, 2017 at 11:58 AM Justin Smith 
 wrote:

>>> a small thing here, if memory usage is important you should be building
> and running an uberjar instead of using lein on the server (this also has
> other benefits), and if you are doing that your project.clj jvm-opts are
> not used, you have to configure your java command line in aws instead
>
> On Wed, Oct 11, 2017 at 3:52 PM  wrote:
>
 I can't figure out if this is a Clojure question or an AWS question.
>> And if it is a Clojure question, I can't figure out if it is more of a
>> general JVM question, or if it is specific to some library such as
>> durable-queue. I can redirect my question elsewhere, if people think this
>> is an AWS question.
>>
>> In my project.clj, I try to give my app a lot of memory:
>>
>>   :jvm-opts ["-Xms7g" "-Xmx7g" "-XX:-UseCompressedOops"])
>>
>> And the app starts off pulling data from MySQL and writing it to
>> Durable-Queue at a rapid rate. ( https://github.com/Factual/dur
>> able-queue )
>>
>> I have some logging set up to report every 30 seconds.
>>
>> :enqueued 3701

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
Thanks Bost.

To workaround the need to delete annotations, manually add these requires 
to your ns form.
You can choose whatever alias name you want.

(:require [clojure.core.typed :as t]
  [clojure.spec.alpha :as s])

Thanks,
Ambrose

On Friday, October 13, 2017 at 6:56:34 PM UTC-4, Bost wrote:
>
> A hint to a casual reader just trying stuff out: 
>
> $ lein new hello 
> $ cd hello 
> # added {:user {:plugins [[lein-typed "0.4.2"]]}} to ~/.lein/profiles.clj 
> # added [org.clojure/core.typed "0.4.2"] to project.clj 
> $ lein typed infer-type hello.core 
> CompilerException java.lang.RuntimeException: No such namespace: t, 
> compiling:(hello/core.clj:5:1) 
> clojure.lang.Compiler.analyze (Compiler.java:6688) 
> clojure.lang.Compiler.analyze (Compiler.java:6625) 
> clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3766) 
> clojure.lang.Compiler.analyzeSeq (Compiler.java:6870) 
> clojure.lang.Compiler.analyze (Compiler.java:6669) 
> clojure.lang.Compiler.analyze (Compiler.java:6625) 
> clojure.lang.Compiler$BodyExpr$Parser.parse (Compiler.java:6001) 
> clojure.lang.Compiler$FnMethod.parse (Compiler.java:5380) 
> clojure.lang.Compiler$FnExpr.parse (Compiler.java:3972) 
> clojure.lang.Compiler.analyzeSeq (Compiler.java:6866) 
> clojure.lang.Compiler.analyze (Compiler.java:6669) 
> clojure.lang.Compiler.eval (Compiler.java:6924) 
> Caused by: 
> RuntimeException No such namespace: t 
> clojure.lang.Util.runtimeException (Util.java:221) 
> clojure.lang.Compiler.resolveIn (Compiler.java:7134) 
> clojure.lang.Compiler.resolve (Compiler.java:7108) 
> clojure.lang.Compiler.analyzeSymbol (Compiler.java:7069) 
> clojure.lang.Compiler.analyze (Compiler.java:6648) 
> clojure.lang.Compiler.analyze (Compiler.java:6625) 
>
> You need to: 
> 1. Remove the [org.clojure/clojure "1.8.0"] from project.clj 
> 2. Undo the changes in src/hello/core.clj 
>
> And then it will work: 
>
> $ lein typed infer-type hello.core 
> Initializing core.typed ... 
> Building core.typed base environments ... 
> Finished building base environments 
> "Elapsed time: 2829.892198 msecs" 
> core.typed initialized. 
> Refreshing runtime inference 
> Instrumenting def init hello.core/foo in hello.core 
>
> Testing hello.core-test 
>
> FAIL in (a-test) (core_test.clj:7) 
> FIXME, I fail. 
> expected: (= 0 1) 
>   actual: (not (= 0 1)) 
>
> Ran 1 tests containing 1 assertions. 
> 1 failures, 0 errors. 
> Inferring types for hello.core ... 
> Aliasing clojure.core.typed as t in hello.core 
> generate-tenv: 1 infer-results 
> finished squash-horizonally 
> Start follow-all 
> end follow-all 
> start remove unreachable aliases 
> end remove unreachable aliases 
> done populating 
> Output annotations to  #object[java.net.URL 0x738a39cc 
> file:/tmp/hello/src/hello/core.clj] 
> Finished inference, output written to hello.core 
>
>
>
> 2017-10-13 23:46 GMT+02:00 Ambrose Bonnaire-Sergeant  >: 
> > This is pretty much the extent of my macro heuristics: binding forms are 
> > often the first argument, and it's usually a vector. Also, [& body] 
> > arguments 
> > are common. 
> > 
> > 
> > On Friday, October 13, 2017 at 5:44:07 PM UTC-4, Ambrose 
> Bonnaire-Sergeant 
> > wrote: 
> >> 
> >> Potentially. Actually, it currently instruments and gathers data about 
> >> macros, but doesn't 
> >> output them because I haven't thought of very good heuristics to guess 
> >> specs for common 
> >> macros (in particular heterogeneous/repeating lists and vectors are 
> >> troublesome, I haven't 
> >> tried outputting any spec regex ops). 
> >> 
> >> Thanks, 
> >> Ambrose 
> >> 
> >> On Friday, October 13, 2017 at 3:54:22 PM UTC-4, Colin Fleming wrote: 
> >>> 
> >>> This looks great! Can this be used to infer macro specs based on 
> examples 
> >>> of usage? 
> >>> 
> >>> On 14 October 2017 at 04:30, Ambrose Bonnaire-Sergeant 
> >>>  wrote: 
>  
>  Hi, 
>  
>  Happy to announce a new set of tools to automatically 
>  generate types and specs for your projects. 
>  
>  Dependency information: 
>  1. core.typed 
>  [org.clojure/core.typed "0.4.2"] 
>  2. lein-typed 
>  [lein-typed "0.4.2"] 
>  3. boot-typedclojure 
>    [org.typedclojure/boot-typedclojure "0.1.0"] 
>  
>  Tutorial: 
>  Here's how to try it out (for Lein projects using clojure.test): 
>  
>  1. Add {:user {:plugins [[lein-typed "0.4.2"]]}} to your 
>  ~/.lein/profiles.clj 
>  2. Add a runtime dependency to [org.clojure/core.typed "0.4.2"] in 
> your 
>  chosen Lein project.clj 
>  3. To infer specs: Run lein typed infer-spec  
>  4. To infer types: Run lein typed infer-type  
>  
>  WARNING: This tool rewrites your files. Only try with backed up code. 
>  
>  Some examples: 
>  clj-time: 
>  - Spec setup + spec results 
>  - Types setup + types results 
>  
>  cheshire 
>  - Spec setup + spec results 
>  - Types setup + types results 
>  
>  (Note:

Re: hello world question !!!

2017-10-13 Thread James Gatannah
This is really "just" a +1 for using Leiningen.

TL;DR: Just start with `lein new app hello-world` and get an editor 
integrated with your REPL quickly. Come back to these sorts of things 
later, if/when you still think they're worthwhile.

I came to clojure from the python/c++ world, with just enough common lisp 
to know that I really wanted to understand how this all works.

And just enough java to know that I never wanted to learn about CLASSPATH.

This sort of thing kept me from giving clojure a serious chance for at 
least a year or two. The only reason I kept trying was that I kept hearing 
such good things about it from people who seemed like they'd put in enough 
time and effort to have good, solid opinions.

Leiningen was the secret sauce that finally let me quit worrying about the 
java nonsense that I just didn't want to care about so I could start poking 
away at the language to see if I could find ways to bend it to my will.

Both of those attitudes were wrong. The "java nonsense" is one (many?) of 
the best parts, though it took me a long time to realize that (and lots of 
it *are* hard to swallow). And it was more a matter of me learning a better 
way to program than any amount of getting clojure to work the way I 
wanted/expected.

I think it's a little sad that setting up a toy project is this painful. 
Then again, clojure really isn't *for* toy projects.

Regards,
James

On Friday, October 13, 2017 at 4:06:12 PM UTC-5, Damien Mattei wrote:
>
> @james
> i also try to set the CLASSPATH at src but it does noot work, i will try 
> Leiningen monday
> Regards,
>
> Damien
>
> On Friday, October 13, 2017 at 9:12:55 PM UTC+2, James Reeves wrote:
>>
>> The docstring for compile 
>> 
>>  
>> says that "The source for the lib must be in a proper
>> classpath-relative directory", so unfortunately you can't just create the 
>> namespace in the REPL and compile it from there. The tutorial on the 
>> Clojure site doesn't make that as clear as it could be.
>>
>> In your revised example, you're setting the classpath incorrectly. The 
>> classpath should contain the root of your file tree. For example, if you 
>> have the file path "src/clojure/examples/hello.clj", then the classpath 
>> should be set to "src".
>>
>> I'm not sure how the "clojure" script you're running works, but you might 
>> find Leiningen to be a better starting point. In Clojure 1.9, an official 
>> "clj" script is going to be introduced, which might make this process 
>> easier. Until then, Leiningen is probably the safer bet.
>>
>> On 13 October 2017 at 18:13, Damien Mattei  wrote:
>>
>>> i did not have , i just follow the tutorial:
>>> https://clojure.org/reference/compilation
>>> i made the file but still the same problem:
>>>
>>> [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
>>> [mattei@moita ~]$ clojure
>>> Clojure 1.5.1
>>> user=> (compile 'clojure.examples.hello)
>>> FileNotFoundException Could not locate 
>>> clojure/examples/hello__init.class or clojure/examples/hello.clj on 
>>> classpath:   clojure.lang.RT.load (RT.java:443)
>>> user=> ^C[mattei@moita ~]$ 
>>>
>>> [mattei@moita ~]$ cat clojure/examples/hello.clj 
>>> (ns clojure.examples.hello
>>> (:gen-class))
>>>
>>> (defn -main
>>>   [greetee]
>>>   (println (str "Hello " greetee "!")))
>>>
>>> On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:

 Maybe this is a dumb question, but do you have a file 
 "clojure/examples/hello.clj" on the classpath? Since that's what the 
 exception is complaining about.

 On 13 October 2017 at 15:09, Damien Mattei  wrote:

> hello,
>
> i'm new to clojure, just installed it on a CentOS box,
>
> and try to compile the code below from tutorial, but it does not work, 
> i searched a lot before posting, no answer... i do not want to use 
> leiningen at this stage,later perheaps...
>
> just want to compile and run
>
> user=> (ns clojure.examples.hello
> (:gen-class))
> nil
> clojure.examples.hello=>
> clojure.examples.hello=> (defn -main
>   [greetee]
>   (println (str "Hello " greetee "!")))
> #'clojure.examples.hello/-main
> clojure.examples.hello=> (compile 'clojure.examples.hello)
> FileNotFoundException Could not locate 
> clojure/examples/hello__init.class or clojure/examples/hello.clj on 
> classpath:   clojure.lang.RT.load (RT.java:443)
>
> help greatly appreciated (because i'm just one step to leave Clojure 
> and continue using  Kawa or Bigloo i already use or dive into ABCL , but 
> Clojure has a so good reputation, i cannot imagine being sticked here by 
> a 
> simple hello world!)
>
> damien
>
> -- 
> 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
>

Re: hello world question !!!

2017-10-13 Thread James Gatannah
It's been a couple of years, but (from what I remember) it works great.

Immutant (or maybe it's wildfly?) has an option to deploy "exploded .WAR 
files." 

I'm very fuzzy on the details, but it seems like the basic choices were 
either:
1) deploy an uberwar with AOT (advantage: faster startup time)
2) deploy the exploded version, which was really the source tree. This 
approach let you update the .clj files on the fly.

We had problems with the AOT version. I think they stemmed from library 
version conflicts, but it's been long enough that I can't swear to it.

On Friday, October 13, 2017 at 3:13:24 PM UTC-5, Andy Fingerhut wrote:
>
> I haven't deployed an application written in Clojure to a server as a WAR 
> file before, so can't speak from experience, but I am sure others here 
> probably can.  Hey, others, have you deployed a Clojure application via a 
> WAR file without using AOT compilation, with only Clojure source code 
> packaged in the WAR file?  Is that something that works?
>
> Andy
>
> On Fri, Oct 13, 2017 at 11:05 AM, Damien Mattei  > wrote:
>
>> but i am in this situation, i wrote application in Scheme (Kawa,Bigloo) 
>> ,LisP that ran on an apache tomcat server, the application is deplyed in 
>> war files , they are precompiled ,with Kawa or Bigloo Scheme, and also use 
>> regular Java class compiled with Java8.
>> They never ran in REPL ,all the test and debug must be done on the host 
>> that run tomcat web server in Java 8, here is the site : 
>> https://sidonie.oca.eu/  
>>
>> On Friday, October 13, 2017 at 7:37:08 PM UTC+2, Andy Fingerhut wrote:
>>>
>>> Just a note that at the top of the documentation page you mention, it 
>>> says: "Clojure compiles all code you load on-the-fly into JVM bytecode, 
>>> but sometimes it is advantageous to compile ahead-of-time (AOT)."
>>>
>>> I would venture an estimate that most people who use Clojure do so 
>>> without using AOT compilation.  Many would advocate against using AOT 
>>> compilation, unless you are in a particular situation that requires it.
>>>
>>> Andy
>>>
>>> On Fri, Oct 13, 2017 at 10:13 AM, Damien Mattei  
>>> wrote:
>>>
 i did not have , i just follow the tutorial:
 https://clojure.org/reference/compilation
 i made the file but still the same problem:

 [mattei@moita ~]$ export CLASSPATH=.:./clojure/examples
 [mattei@moita ~]$ clojure
 Clojure 1.5.1
 user=> (compile 'clojure.examples.hello)
 FileNotFoundException Could not locate 
 clojure/examples/hello__init.class or clojure/examples/hello.clj on 
 classpath:   clojure.lang.RT.load (RT.java:443)
 user=> ^C[mattei@moita ~]$ 

 [mattei@moita ~]$ cat clojure/examples/hello.clj 
 (ns clojure.examples.hello
 (:gen-class))

 (defn -main
   [greetee]
   (println (str "Hello " greetee "!")))

 On Friday, October 13, 2017 at 4:48:40 PM UTC+2, James Reeves wrote:
>
> Maybe this is a dumb question, but do you have a file 
> "clojure/examples/hello.clj" on the classpath? Since that's what the 
> exception is complaining about.
>
> On 13 October 2017 at 15:09, Damien Mattei  
> wrote:
>
>> hello,
>>
>> i'm new to clojure, just installed it on a CentOS box,
>>
>> and try to compile the code below from tutorial, but it does not 
>> work, i searched a lot before posting, no answer... i do not want to use 
>> leiningen at this stage,later perheaps...
>>
>> just want to compile and run
>>
>> user=> (ns clojure.examples.hello
>> (:gen-class))
>> nil
>> clojure.examples.hello=>
>> clojure.examples.hello=> (defn -main
>>   [greetee]
>>   (println (str "Hello " greetee "!")))
>> #'clojure.examples.hello/-main
>> clojure.examples.hello=> (compile 'clojure.examples.hello)
>> FileNotFoundException Could not locate 
>> clojure/examples/hello__init.class or clojure/examples/hello.clj on 
>> classpath:   clojure.lang.RT.load (RT.java:443)
>>
>> help greatly appreciated (because i'm just one step to leave Clojure 
>> and continue using  Kawa or Bigloo i already use or dive into ABCL , but 
>> Clojure has a so good reputation, i cannot imagine being sticked here by 
>> a 
>> simple hello world!)
>>
>> damien
>>
>> -- 
>> 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 

Re: hello world question !!!

2017-10-13 Thread Alan Moore
Lolz, I actually liked the coffee to code autocorrect... the autocorrect 
machine learning algorithm was probably trained on the old joke about that very 
thing. Thanks for the laugh after the week I’ve endured...

Alan

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