Re: hello world question !!!

2017-10-20 Thread Gregg Reynolds
There once was a man named Gustava
Whose Clojure code smelled just like Guava
He tried to use gen-class
Which made it smell stink-ass
So he went back to working in Java

Hardy-har-har.  Containers long for bytecode on disc. You can minimize it,
but you have to have it to bootstrap the Clojure runtime.

On Oct 20, 2017 12:23 PM, "Didier"  wrote:

I also suggests if you want to understand how to compile Clojure without
thw help of tools loke boot or lein, to read those two short tutorials:

1. http://www.flyingmachinestudios.com/programming/how-clojure-
babies-are-made-the-java-cycle/

2. http://www.flyingmachinestudios.com/programming/how-clojure-
babies-are-made-lein-run/

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with
your first post.
To unsubscribe from 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-20 Thread Didier
I also suggests if you want to understand how to compile Clojure without thw 
help of tools loke boot or lein, to read those two short tutorials:

1. 
http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-the-java-cycle/

2. 
http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-lein-run/

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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-20 Thread Didier
I think you can use lein-ring or lein-uberwar to package any ring based clojure 
web app into a War.

But, a War is just a zip file with a known set of files and directory 
structure. So depending on your needs, you could create it yourself too.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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.


Functional Programming Job Board - Clojure

2017-10-20 Thread alex
Morning Everyone,

For those of you that are looking for your next FP gig then check out the 
worlds leading Functional Programming job board! Functional Works 


thanks,
Alex

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

2017-10-20 Thread Damien Mattei
thank for your help, i had doubt about namespace but as i focused on sql i 
did  not check it, it is just a week i use clojure, but i'm used many 
Scheme and LisP and Java and there is a lot of issue on stackoverflow or 
stackechange about clojure and mysql that are out of date and are confusing

damien

On Thursday, October 19, 2017 at 6:44:46 PM UTC+2, Sean Corfield wrote:
>
> I don’t know what documentation you’re working from but it looks outdated, 
> based on your code.
>
>  
>
> Have a read of 
> http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html -- that 
> will walk you through the basics of using java.jdbc
>
>  
>
> If you’re on the Clojurians Slack (signup at http://clojurians.net/ and 
> read/post messages from https://clojurians.slack.com/ or use a desktop 
> client), there’s a #sql channel for all things JDBC-related.
>
>  
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
> --
> *From:* clo...@googlegroups.com   > on behalf of Damien Mattei  >
> *Sent:* Thursday, October 19, 2017 3:37:08 AM
> *To:* Clojure
> *Subject:* mysql and clojure 
>  
> hello again,
>
> i tried dozen of web example about mysql and clojure but it doen't work, 
> here is some of my code:
>
> for dependencies:
>
> (defproject jclojure "0.1.0-SNAPSHOT"
>   :description "clojure JVM source code for Sidonie web interface 
> administration"
>   :url "https://sidonie.oca.eu;
>   :license {:name "Eclipse Public License"
>   :url "http://www.eclipse.org/legal/epl-v10.html"}
>
>   :dependencies [
>   [org.clojure/clojure "1.8.0"]  
>   [mysql/mysql-connector-java "5.1.38"]
>   [org.clojure/java.jdbc "0.7.3"]
>   ]
>
>   :main ^:skip-aot jclojure.core
>   :target-path "target/%s"
>   :profiles {:uberjar {:aot :all}})
>
>
> the code (some of...):
>
> (ns jclojure.core
> (:gen-class))
>
> (defn -main
>   "I don't do a whole lot ... yet."
>   [& args]
>   
>   ;(:require [clojure.java [jdbc :as sql]])
>
>   ;(require '[clojure.java.jdbc :as jdbc])
>
>   (ns dbns
>   (:require [clojure.java.jdbc :as jdbc]
>   [mysql/mysql-connector-java "5.1.38"]))
>   
>   ;(use 'clojure.java.jdbc)
>   
>   (println "Hello, World!")
>
>   (let [
> db-host "localhost"
> db-port 3306
> db-name "sidonie"
> ]
> 
> (def db {
>  :classname "com.mysql.jdbc.Driver" ; must be in classpath
>  :subprotocol "mysql"
>  :subname (str "//" db-host ":" db-port "/" db-name)
> ; Any additional keys are passed to the driver
> ; as driver-specific properties.
>  :user "mattei"
>  :password "sidonie2"}))
>   
> ;(jdbc/query db ["SELECT * FROM Sigles"])
>
>   (jdbc/with-connection db
> (jdbc/with-query-results rows
>  ["select * from Sigles"]
>  (println rows)))
>
>  
>   )
>
>
> and now the error:
>
> [mattei@moita jclojure]$ lein run
> Exception in thread "main" java.lang.RuntimeException: No such namespace: 
> jdbc, compiling:(jclojure/core.clj:37:3)
> at clojure.lang.Compiler.analyze(Compiler.java:6688)
> at clojure.lang.Compiler.analyze(Compiler.java:6625)
> at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3766)
> at clojure.lang.Compiler.analyzeSeq(Compiler.java:6870)
> at clojure.lang.Compiler.analyze(Compiler.java:6669)
> at clojure.lang.Compiler.analyze(Compiler.java:6625)
> at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6001)
> at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5380)
> at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3972)
> at clojure.lang.Compiler.analyzeSeq(Compiler.java:6866)
> at clojure.lang.Compiler.analyze(Compiler.java:6669)
> at clojure.lang.Compiler.analyzeSeq(Compiler.java:6856)
> at clojure.lang.Compiler.analyze(Compiler.java:6669)
> at clojure.lang.Compiler.access$300(Compiler.java:38)
> at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:589)
> at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
> at clojure.lang.Compiler.analyze(Compiler.java:6669)
> at clojure.lang.Compiler.analyze(Compiler.java:6625)
> at clojure.lang.Compiler.eval(Compiler.java:6931)
> at clojure.lang.Compiler.load(Compiler.java:7379)
> at clojure.lang.RT.loadResourceScript(RT.java:372)
> at clojure.lang.RT.loadResourceScript(RT.java:363)
> at clojure.lang.RT.load(RT.java:453)
> at clojure.lang.RT.load(RT.java:419)
> at clojure.core$load$fn__5677.invoke(core.clj:5893)
> at clojure.core$load.invokeStatic(core.clj:5892)
> at clojure.core$load.doInvoke(core.clj:5876)
> at