There's now a library that allows you to retrieve the source body of bound symbols.https://github.com/runexec/concrete#concrete-
--
--
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 t
Try this
user> (first (drop-while even? [2 4 6 7 8 10]))
7
19.05.2013, 23:06, "Jim - FooBar();" :
> no need to traverse the entire seq with 'filter' if you only want the 1st
> match...
>
> (some #(when (odd? %) %) [2 4 6 7 8 9])
> => 7
>
> Jim
>
> On 19/05/13 13:42, Thumbnail wrote:
>
>> ... or
ClojureHomePage is a Compojure based web framework that allows you to write the backend and frontend with Clojure. Here's a small tutorialHere's the documentation You can Embed Clojure into a HTML file with the tagsEnable multiple method handlers under a single route (get, post, put, delete, and h
Did you download the Android JAR?
http://www.java2s.com/Code/Jar/a/Downloadandroid32jar.htm
22.05.2013, 04:52, "Alex Fowler" :
> I'm trying to build this project: https://github.com/clojure-android/clojure
> with "ant" command. It sarts working, but I get this output with errors:
>
> Buildfile:
013 at 11:59 PM, Kelker Ryan <theinter...@yandex.com> wrote:Did you download the Android JAR? http://www.java2s.com/Code/Jar/a/Downloadandroid32jar.htm 22.05.2013, 04:52, "Alex Fowler" <alex.murat...@gmail.com>:> I'm trying to build this project: https://github.com/clojure
p me aside from that maybe maven will somehow manage to reolve the deps...On Wed, May 22, 2013 at 12:18 AM, Kelker Ryan <theinter...@yandex.com> wrote:Did you run ./antsetup.sh before trying to build with ant? 22.05.2013, 05:01, "Alex Fowler" <alex.murat...@gmail.com>:Nope, the i
Here's my solution to your problem. Let me know if it helps.
```
user> (defn if-attr [-key obj missing]
(if-let [ret (get obj -key)] ret (assoc obj -key missing)))
#'user/if-attr
user> (if-attr :abc {} "missing-value")
{:abc "missing-value"}
user> (if-attr :abc {:abc 123} "missing-value")
1
I wrote it for fun and deleted after no one took interest. There was no real purpose other than to see if it could be done. 28.05.2013, 08:33, "Plínio Balduino" :404?On May 10, 2013 8:04 AM, "Kelker Ryan" <theinter...@yandex.com> wrote:I would like to share a library
I can't watch videos at the moment, so would you mind writing a short summary? 28.05.2013, 10:12, "atkaaz" :I find this might be helpful in this situation:Google I/O 2009 - The Myth of the Genius Programmerhttps://www.youtube.com/watch?v=0SARbwvhupQOn Tue, May 28, 2013 at 4:02
I'll re-write it, but I have my doubts as to why anyone would use it. It was
just an experiment to see if it could be done.
29.05.2013, 05:22, "Dan Neumann" :
> Aw, come on. No need to squander value back out of the world.
>
> On Monday, May 27, 2013 8:02:28 PM UTC-
Try this.
cd my-website
lein repl
(load-file "src/my-website/models/db.clj")
03.06.2013, 15:20, "jayvandal" :
> I am trying to run the my-website.My structure is
> my-website top level
> src
> my-website
>
Have you tried Eclipse Emacs+? http://marketplace.eclipse.org/content/emacs 04.06.2013, 21:41, "Korny Sietsma" :My 2c - I use emacs, I love it. I don't inflict it on my team, and I strongly disagree with it being "easy". To learn the basics, yes, but full fluency? If you have someone fluent in I
Here's my re-write. user> (defn gen-crypto []
(let [atoz (range 65 91)
upper (map char atoz)
lower (map #(char (+ % 32)) atoz)
digit (range 10)
[sl su sd] (map shuffle [lower upper digit])
encrypt (reduce conj
> (map #(char (+ 48 %)) (range 10))(\0 \1 \2 \3 \4 \5 \6 \7 \8 \9)will fix that issue. Or (map char (range 48 58))On Monday, June 10, 2013 7:42:45 PM UTC-7, Kelker Ryan wrote:Here's my re-write. user> (defn gen-crypto []
(let [atoz (range 65 91)
upper (map char atoz)
This is the easiest way to swap the keys with the values in a hash-map.(defn flip-map [m]
(zipmap (vals m) (keys m)))
#'user/flip-map
user> (def m1 (apply hash-map (range 8)))
#'user/m1
user> m1
{0 1, 2 3, 4 5, 6 7}
user> (def m2 (flip-map m1))
#'user/m2
user> m2
{7 6, 5 4, 3 2, 1 0} 11.06.2013,
I've seen some interesting responses, but here's my solution. user> (def example
(ref
[{:id 1 :email {"a...@mail.com" 1}}
{:id 2 :email {"d...@mail.com" 1}}
{:id 3 :email {"g...@mail.com" 2}}
{:id 4 :email {"f...@mail.com" 2}}]))
#'user/example
user>
Here's the refactored version.user> (def example
(ref
[{:id 1 :email {"a...@mail.com" 1}}
{:id 2 :email {"d...@mail.com" 1}}
{:id 3 :email {"g...@mail.com" 2}}
{:id 4 :email {"f...@mail.com" 2}}]))
#'user/example
user>
(defn
There are two things that I've notice about your code that could probably be the cause. In the :constructors section of :gen-class, you're refering to test-gen.Tata although it doesn't exist yet. The -pre-init function also tries to call a class that doesn't exist yet. 12.06.2013, 16:39, "Armel Esn
No problem. I re-wrote your latest version, so let me know what you think. tdsl.core> (defn make-crypto []
(let [char-range #(map char
(range (int %1)
(-> %2 int inc)))
[l u d] (map char-r
Have you tried wrapping recursive calls with lazy-seq?
(defn brute-force "..."
([...] ...)
([check-pred possibilities]
(lazy-seq
(apply brute-force 4 check-pred possibilities
Here's a token-types rewrite
(def token-types
(let [-chars #(map char (range (int %1) (-> %2 int inc
The code for dmirylenka's release-sharks form tdsl.search> (defn release-sharks [n & {:keys [laser-beams]}] (if (boolean laser-beams) (repeat (int n) :shark)))#'tdsl.search/release-sharkstdsl.search> (release-sharks 2 :laser-beams 1)(:shark :shark) 18.06.2013, 14:32, "dmirylenka" :Accor
Arch Linux, but moving to Manjaro for a more stable and simple version of the distro. The editor is Emacs + nrepl.el + clojure-mode + ritz + rainbow parens + eldoc + ac. 18.06.2013, 14:47, "dmirylenka" :OS X on the working machine, Ubuntu on the servers.For my project it makes little difference, es
Some major changes have been made to the CHP framework. This library provides the following Clojure on the front end Run Clojure inside a HTML file with the tagsStyle templates can be written in CHTML ex. chp.template/using-template Parameters Request params ex. ($p userid)Common web headers ex. (
To answer your first email, here's a Lobos based migration using the CHP framework https://github.com/runexec/chp#db-migrations. The configuration file is in resources/config/db.clj and is used by clojure.java.jdbc, KormSQL, and Lobos. 26.06.2013, 04:38, "Marian Schubert" :Hello, few days ago I ext
Try this. user> (def xy [:x1 :y1 :x2 :y2 :x3 :y3])(as-> xy _ (partition 2 _) (interleave _ [:z1 :z2 :z3]) (flatten _))#'user/xy(:x1 :y1 :z1 :x2 :y2 :z2 :x3 :y3 :z3)user> 27.06.2013, 19:55, "Paul Meehan" :Hi,Given a sequence (x1, y1, x2, y2, x3, y3,...)and another (z1, z2, z3, ...)I wa
wget -k -m http://clojure-doc.org/wget -k -m http://clojuredocs.org/ 06.07.2013, 12:59, "Tom Faulhaber" :It's easy to pull the autodoc documentation for offline use. You can either do this: $ git clone https://github.com/clojure/clojure.git clojure-api$ cd clojure-api$ git checkout gh-pages or you
ClojureHomePage is a Clojure Web Framework CHTML, Routing, and Sessions CHTML & RoutesSession handling, Cookies, and Compojure Ring Ring and port configurationAuto-loading middleware Code Generation & Modules Generating views from a tableView bindingsView bindings ExampleEnable admin accountDatabas
Thanks. It's currently alpha and there's a lot more to come. Are you by chance the same Degutis from 8th light? 11.07.2013, 02:12, "Steven Degutis" :Wow. You obviously put a lot of work into this. And it looks extremely well documented!On Wed, Jul 10, 2013 at 5:36 AM, K
With the exception of XML and Flash, my framework covers all of that
https://github.com/runexec/chp
11.07.2013, 23:37, "Alexander Gunnarson" :
> This idea's been on my mind lately: could Clojure be used as a unifying force
> for all those disparate file formats and frameworks like:- XML / XLink
Sorry, but I don't have any plans on adding AS2/3 or XML support by default. Thanks! The framework is currently Alpha and I just added auto-documenting features for the JSON API. https://github.com/runexec/chp/releases/tag/v.0.162-alpha CHTML, Routing, and Sessions CHTML & RoutesSession handling,
Try these.
http://www.clojuresphere.com/
http://www.clojure-toolbox.com/
https://clojure-libraries.appspot.com/
12.07.2013, 05:32, "Alexander Gunnarson" :
> As a side note, maybe we can keep a running list of "Clojure-ized"
> technologies we're aware of:- XML - clojure/data.xml
> - XLink + XP
Ntable is a Clojure namespace dependency table generator. https://github.com/runexec/ntable Example output of command: java -jar ntable-0.1.0-SNAPSHOT-standalone.jar /src/chp/chp/src/chp/routes/example.clj
:use
chp.core
compojure.core
[chp.html :only [escape]]chp/src/chp/routes/user.clj
:use
chp.
d time to contribute. CheersOn 11 July 2013 11:13, Steven Degutis <sbdegu...@gmail.com> wrote:I am.On Wed, Jul 10, 2013 at 2:59 PM, Kelker Ryan <theinter...@yandex.com> wrote:Thanks. It's currently alpha and there's a lot more to come. Are you by chance the same Degutis from 8th
The Luminus framework, in my opinion, is mostly just a collection of libraries. That doesn't mean Luminus isn't a great framework, but I wanted to create something that felt more like a single solution, and not just a collection of libraries. The Noir framework is now called lib-noir for a reason a
formation InstallUML RelationshipsNamespace DependenciesUnit TestsRemoving example filesLicenseHow?Tutorial 15.07.2013, 11:37, "Kelker Ryan" :The Luminus framework, in my opinion, is mostly just a collection of libraries. That doesn't mean Luminus isn't a great framework, but I wa
Have you tried the complement form? 17.07.2013, 15:12, "JvJ" :Not that it's a big deal, but is there a standard library function for #(not (not %))? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google
I could be wrong but, I think you can use the cljs-build plugin for lein and use the repl-listen command to start a REPL server. Can you not use M-x nrepl to connect? https://github.com/emezeske/lein-cljsbuild/blob/0.3.2/doc/REPL.md#repl-listen 18.07.2013, 13:04, "Chris Bui" :I'm trying to setup a
dominoes A ClojureScript front-end validation library => https://github.com/runexec/dominoesClick here to try it live or watch the animated GIF preview (loading)Usage Example(use '[dominoes.core
:only [document-ready?
validate!
valid-submit!
*error-s
Strap is a faster Clojure project builder
https://github.com/runexec/strap
$ time strap.js my-project om compojure prismatic/om-tools secretary
https://clojars.org/repo/prismatic/om-tools/maven-metadata.xml
https://clojars.org/repo/om/om/maven-metadata.xml
https://clojars.org/repo/compojure/comp
PossibleDBPossibleDB is a Datomic Database Server clone built with DataScript, RethinkDB, Clojure, ClojureScript, and NodeJS.warning: highly alphaYou can see PossibleDB in action @ http://vimeo.com/107237345PossibleDB Server1) git clone https://github.com/runexec/PossibleDB2) cd PossibleDB/possible
Repo: https://github.com/runexec/stray StrayStray is an alternative routing library for Compojure;; Leiningen Dependency
[stray "1.01"]
(ns example
(:require [stray.core :refer [router]]))
(def routes
{:public {:index-page {:http/path "/"
:http/method :GET
I use Anonymous Pro and color-theme-molokai https://github.com/alloy-d/color-theme-molokai - "An Emacs port of the Vim port of the Monokai color scheme for TextMate."http://www.marksimonson.com/fonts/view/anonymous-pro - "Anonymous Pro (2009) is a family of four fixed-width fonts designed with codi
I've never tried it for unit testing, but it's the de facto Java library for headless browsers and it's the driving force behind products such as Selenium WebDriver => http://seleniumhq.org/ I mostly use it for bot creation/automation and it supports many versions of popular web browsers such as F
Try this.
(defn my-filter [pred? coll]
(loop [c coll
ret (empty c)]
(if-let [x (first c)]
(if (pred? x)
(recur (rest c) (lazy-cat ret [x]))
(recur (rest c) ret))
ret)))
24.10.2013, 23:58, "Wilson" :
> I am supposed to make my own filter function witho
k" :On Thu, Oct 24, 2013 at 5:32 PM, Kelker Ryan <theinter...@yandex.com> wrote:Try this. (defn my-filter [pred? coll] (loop [c coll ret (empty c)] (if-let [x (first c)] (if (pred? x) (recur (rest c) (lazy-cat ret [x])) (recur (rest c) ret)) ret)))Wh
Receipt & Receipt PluginStandalone and plugin Clojure documentation generator.Standalone [receipt "1.0.1"]Lein Plugin [receipt-plugin "1.0.1"]Usage & DocumentationThe documentation for receipt was generated with receipt and can be viewed here$ lein receipt-plugin
Writing doc/receipt.core.html
Writi
Here's the source on Github https://github.com/runexec/receipt-clj 03.11.2013, 17:08, "Kelker Ryan" :Receipt & Receipt PluginStandalone and plugin Clojure documentation generator.Standalone [receipt "1.0.1"]Lein Plugin [receipt-plugin "1.0.1"]Usage & Doc
Maybe this?
user> (defn ensure-mandatory
" coll - keys of required maps
maps - collection of maps"
[coll maps]
(loop [adding (clojure.set/difference
(set coll)
(->> maps (map keys) flatten set))
all map
Maybe this?
user> (defn ensure-mandatory
" coll - keys of required maps
maps - collection of maps"
[coll maps]
(loop [adding (clojure.set/difference
(set coll)
(->> maps (map keys) flatten set))
all maps
Reaction - https://github.com/runexec/reactionA small reactive programming library for ClojureUsageuser> (use '[reaction.core])niluser> (def-reactive! my-int 123)#'user/my-intuser> @my-int123user> (rapply! my-int inc)niluser> @my-int124user> (original-value my-int)123user> @my-int124user> (rapply!
nks for the contribution.On Fri, Nov 22, 2013 at 1:20 AM, Kelker Ryan <theinter...@yandex.com> wrote:Reaction - https://github.com/runexec/reaction A small reactive programming library for ClojureUsageuser> (use '[reaction.core])niluser> (def-reactive! my-int 123)#'user/my-in
Static PrimeA static website editor and server written in Clojure and ClojureScript. Visual Documentation Supportsin browser mouse only layout arrangementdynamic template loading for static filesstatic site indexmultiple adminshtml and markdown editingwrite, edit, delete pages
--
--
You receiv
There's now a video demo of this project at www.dailymotion.com/video/x17pggk_high-resolution-static-prime-a-static-website-editor-and-server-written-in-clojure-and-clojurescrip_tech 27.11.2013, 18:50, "Kelker Ryan" :Static PrimeA static website editor and server written
Vectors are mostly for speed and maintaining value sequence order. Try this => (vec (reverse [1 2 3]))Not this => (apply vector (reverse [1 2 3]))As an alternative you can do this => (into [] (reverse [1 2 3]))You can always use mapv when calling fun for each coll object.Try this => (mapv #(* 2 %)
user> (def a-blah (atom [1 2 3]))#'user/a-blahuser> (defn blah [] (let [x (first @a-blah)] (swap! a-blah rest) x))#'user/blahuser> (blah)1user> (blah)2user> (blah)3user> (blah)nil 06.12.2013, 03:46, "David Simmons" :Hi I'd like to be able to define a function that is passed a vector of items and r
I believe one is a directive and the other is a function.:require doesn't need the values to be quoted (:require xyz)require needs values to be quoted so that they're not evaluated when passed as arguments (require 'xyz)I could be wrong though. 06.12.2013, 18:17, "BillZhang" :hi all,What's the dif
Static Prime is a static website editor and server written in Clojure and ClojureScript. Visual Documentation Video Demo (Vimeo) Video Demo (Dailymotion)Supportsin browser mouse only layout arrangementdynamic template loading for static filesstatic site indexmultiple adminshtml and markdown editing
As far as I know, I've created the first lein template that allows you to run jMonkeyEngine3 from Clojure without any configuration. Create a projectlein new jme3
Download depscd ; lein deps
Run the demolein run
Game Engine: http://jmonkeyengine.org/Github: https://github.com/runexec/clj-jme3
n thread "LWJGL Renderer Thread" java.lang.UnsatisfiedLinkError:
> Can't load library: /.../jme-test/liblwjgl.dylib
>
> I see that it's under /.../jme-test/target/native/macosx
>
> On Thu, Dec 12, 2013 at 3:40 PM, Kelker Ryan wrote:
>> As far as I know, I've cr
In your opinion, what's the best, and what's the worst aspects of using Clojure?
--
--
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
Maybe something like this?
(go-loop [c (chan)]
(let [x (:
> On Mon Jan 13 18:11:10 2014, t x wrote:
>
>> Consider the following code block:
>>
>> (defn make-stupid []
>> (go (loop []
>> (recur
>>
>> (def x (make-stupid))
>>
>> ;; ... is there a way to kill this infinite go-lo
Can't you just test the value before placing a value in a channel? 22.01.2014, 16:27, "t x" :Hi,## Question: For a channel, is it possible to put a pre-condition of sorts on a channel? For example: (let [chan (async/chan 100)] (set-pre-condition! chan even?) (put! chan 1) ;; exception thr
I just wanted to share two new Clojure projects. Porta is a Clojure utility that generates a Clojure abstraction for an existing Java Class.https://github.com/runexec/porta CHP (ClojureHomePage) is a project that aims at making Clojure web development as easy as PHP.https://github.com/runexec/chp
There's now a tutorial for CHP https://github.com/runexec/chp/tree/master/tutorial/01 09.05.2013, 20:03, "Kelker Ryan" :I just wanted to share two new Clojure projects. Porta is a Clojure utility that generates a Clojure abstraction for an existing Java Class.https://github.com/ru
I would like to share a library that allows for bodies of code to loop run until a Clojure Agent send-off is complete. https://github.com/runexec/hollywood#how
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to
(seq coll) will return a true value if the collection isn't empty. It will also
return nil (false) if it is.
11.05.2013, 17:37, "Nico Balestra" :
> I'm not sure this question has been asked already, but I really want to know
> the "principle" behind (not (empty? coll)) not being idiomatic.
>
> I
Here's an example.
user=> (if (seq []) (println 1))
nil
user=> (if (seq [1]) (println 1))
1
nil
11.05.2013, 18:40, "Kelker Ryan"
> (seq coll) will return a true value if the collection isn't empty. It will
> also return nil (false) if it is.
>
> 11.05.20
There's now an example and a tutorial for using the CHP web framework.CHP - https://github.com/runexec/chpWork with HTML, CSS, _javascript_, and SQL using Clojure.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send emai
Try VisualVM. https://visualvm.java.net/
Here's a screenshot of the memory usage monitor
https://visualvm.java.net/images/monitor.jpg
12.05.2013, 16:55, "Stuart Sierra" :
> We've found YourKit (a commercial product) to be helpful.
> -S
>
> On Sunday, May 12, 2013 2:46:52 AM UTC+10, Jonathon McKi
Equate is a fact management library for the Clojure language.https://github.com/runexec/equate
--
--
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 mod
70 matches
Mail list logo