Re: [ClojureScript] ANN: core.match 0.2.0-beta2

2013-06-17 Thread Pierre-Yves Ritschard
Thank you for the AOT fixes! On Mon, Jun 17, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Fantastic news! > > > On Mon, Jun 17, 2013 at 1:04 PM, David Nolen wrote: > >> At long last I've come around to overhauling core.match. >> >> Changes/Fixes/Enhancements

Need to render some entities moving across a grid

2013-06-17 Thread vemv
I'm implementing a program D. Hofstadter describes in *Fluid Concepts: * https://github.com/vemv/jumbo/* *Even in the original text, concurrency/parallelism is a crucial part of the domain so Clojure is super well-suited. While visualising the carried-in process is not a goal of the project, pr

I need a configuration solution

2013-06-17 Thread Mingqi
I need a configuration solution -- -- 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

Any suggestions for configuration solution in Clojure or Java world?

2013-06-17 Thread Mingqi
After suffer xml or properties configuration for long time, I'm looking for a new configuration solution for Clojure or Java. I hope below features, priority from high to low: 1. readable format and easy to write. XML is the opposite example, which is not easy to edit and not readable. I like J

I need a configuration solution

2013-06-17 Thread Mingqi
I need a configuration solution -- -- 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: I need a configuration solution

2013-06-17 Thread Chris Ford
Hi Mingqi, Could you please give us some more context? What kind of configuration are you trying to manage? Cheers, Chris On 17 June 2013 10:45, Mingqi wrote: > I need a configuration solution > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure

Re: In what OS do you code?

2013-06-17 Thread Chris Ford
Robert, the Leiningen survey might under-report Windows-based usage of Clojure, as I think Eclipse+Counter-clockwise is especially popular there. On 17 June 2013 02:03, Robert Levy wrote: > There's the "State of Clojure Survey": > http://cemerick.com/2012/08/06/results-of-the-2012-state-of-cloj

Re: I need a configuration solution

2013-06-17 Thread Mingqi
On Monday, June 17, 2013 3:55:18 PM UTC+8, Chris Ford wrote: > > Hi Mingqi, > > Could you please give us some more context? What kind of configuration are > you trying to manage? > > Cheers, > > Chris > > > > On 17 June 2013 10:45, Mingqi > wrote: > >> I need a configuration solution >> >> -- >

Re: I need a configuration solution

2013-06-17 Thread Mingqi
Chris, I'm sorry for that. This email is only for test. I send a email a few minutes before this but not appear in group after post, so I quickly post this only for test. More context in my another post subject are "Any suggestions for configuration solution in Clojure or Java world?" On Mon

Re: In what OS do you code?

2013-06-17 Thread Robert Levy
from the Counterclockwise docs: "the preferred way to create a new project is via the New > Leiningen Project Wizard" On Mon, Jun 17, 2013 at 1:33 AM, Chris Ford wrote: > Robert, the Leiningen survey might under-report Windows-based usage of > Clojure, as I think Eclipse+Counter-clockwise is esp

Re: Any suggestions for configuration solution in Clojure or Java world?

2013-06-17 Thread Softaddicts
We built our own tool using zookeeper. We need to manage clusters of nodes, clearly property files were not scalable enough to be of any help here. All the configuration values are written using Clojure expressions, not just EDN like stuff, we do eval code loaded in the configuration to provide

ANN: modern-cljs dependencies updated

2013-06-17 Thread Giacomo Cosenza
Hi all, I updated the libs which https://github.com/magomimmo/modern-cljs depends on: - now you need at least lein 2.1.2 version (I used lein 2.2.0). Use "$ lein upgrade" to upgrade it - lein-cljsbuild 0.3.2 - lein-ring 0.8.5 In july I should have the time to go on with the next couple of tutori

Re: In what OS do you code?

2013-06-17 Thread Alexandru Nedelcu
On Sun, Jun 16, 2013 at 4:40 AM, Korny Sietsma wrote: > How are all the Linux users handling Java installation? Using an official > Oracle installer, or your package manager somehow, or something else? Or > using (gasp) openJDK? I'm on Ubuntu and I use OpenJDK 7 which is the default JDK. I don'

type-hints positioning convention?

2013-06-17 Thread Jim - FooBar();
Hi all, It seems to me that return type-hints can go either right after "defn", or after the doc-string. I generally, put the return type-hints right before the argument vector and it seems to get rid of reflection. However, I just had a look at core.contrib.strutils2 and the author(s) put th

Re: In what OS do you code?

2013-06-17 Thread Jim Cheesman
Windows 7 at work, Ubuntu at home. Both have good and bad points, I'm quite happy coding in either (once properly set up). On Friday, 14 June 2013 15:46:37 UTC+2, Erlis Vidal wrote: > > Hi, > > I'm a bit curious to know in what OS do you code. Do you prefer iOS, > Linux, Windows? Why is tha

Re: In what OS do you code?

2013-06-17 Thread Korny Sietsma
Sorry, didn't mean to dismiss OpenJDK - in the past, every time I've tried it I've had performance issues or compatibility issues. Admittedly, I haven't tried it for a few years - I'd be very happy if it is now fast and reliable enough for everyday use! - Korny On 17 June 2013 21:51, Alexandru

Re: Need to render some entities moving across a grid

2013-06-17 Thread Gary Trakhman
For something quick and dirty, have you taken a look at quil? It's pretty easy to get started. https://github.com/quil/quil On Monday, June 17, 2013, vemv wrote: > I'm implementing a program D. Hofstadter describes in *Fluid Concepts: * > https://github.com/vemv/jumbo/* *Even in the original t

Re: Any suggestions for configuration solution in Clojure or Java world?

2013-06-17 Thread Paul deGrandis
I have wrapped up the Typesafe Config pieces, that can read EDN and HOCON in: https://github.com/ohpauleez/confil The project should be considered pretty alpha and the general interface may change. I also have plans to make two supplemental project: confil-literals (that bring along reader lit

Re: In what OS do you code?

2013-06-17 Thread Angel Java Lopez
Windows 8 at work Windows 2008 Server at home Lot of Node.js, C#, Java, PHP coding. Few Clojure, only spikes or little sample, using REPL, sometimes lein Angel "Java" Lopez @ajlopez On Fri, Jun 14, 2013 at 10:46 AM, Erlis Vidal wrote: > Hi, > > I'm a bit curious to know in what OS do you cod

'foldcat' slower than 'mapv' even for 10,000 elements

2013-06-17 Thread Jim - FooBar();
Hi again, I'm finding that (r/foldcat (r/map f coll)) is consistently slower than a simple mapv, even for a collection of 10,000 elements and more! The fn I'm mapping is a stemming algorithm, not too heavyweight but not too lightweight either... is anyone else finding this strange or am I mis

Jenkins, clojure, ring...

2013-06-17 Thread Josh Kamau
Hi guys; I am trying to setup CI server with jenkins. I would like after pushing to mercurial, i just refresh the browser and see the changes. I use "lein ring server-headless" to run the server. I can "shell" the command in jenkins using something like "nohup lein ring server-headless" The pro

Re: [ClojureScript] ANN: core.match 0.2.0-beta2

2013-06-17 Thread David Pollak
Awesome! On Mon, Jun 17, 2013 at 1:04 AM, David Nolen wrote: > At long last I've come around to overhauling core.match. > > Changes/Fixes/Enhancements are documented here: > http://github.com/clojure/core.match/blob/master/CHANGES.md > > core.match should no longer have AOT issues as far as I k

Re: Clojure in production

2013-06-17 Thread Giacomo Cosenza
Hi Plinio, we released today in production a clj/cljs application which implements an animated/interactive bubble chart on client side by getting tha data (in edn format) from the the server. The client has been implemented by using clojurescript and the following main libs: - domina - c2 - d

Re: Clojure in production

2013-06-17 Thread Robert Levy
Hi Plinio, We use Clojure for nearly everything we do at Runa (we also have a little bit of Ruby and JS in our stack). For more info, see http://www.workatruna.com/clojure.html. Rob On Mon, Jun 17, 2013 at 6:49 AM, Giacomo Cosenza wrote: > Hi Plinio, > we released today in production a clj/clj

Re: translating Common Lisp to Clojure?

2013-06-17 Thread Ivan Pierre
The BIG problem is that Common Lisp is mutable. Creating a DSL for common lisp, creatin cons, managing syntax, and so on, no probl. Even manage a Lisp-2. But as you have that fucken fset, you have to do counterClojure. Ask Deuce guy : http://skillsmatter.com/podcast/scala/deuce-is-not-yet-emacs-u

Re: type-hints positioning convention?

2013-06-17 Thread Stuart Sierra
I don't know what "core.contrib.strutils2" is, but it sounds like "old contrib" pre-clojure-1.3. See http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go The type-hints-before-the-argument-vector syntax was introduced in Clojure 1.3 along with primitive type hints, so I would consi

Re: type-hints positioning convention?

2013-06-17 Thread Jim - FooBar();
On 17/06/13 17:03, Stuart Sierra wrote: The type-hints-before-the-argument-vector syntax was introduced in Clojure 1.3 along with primitive type hints, so I would consider it the more current style. The older type-hint-before-the-symbol syntax is still supported, and probably won't go away an

Feedback request: Spec for meta testing-lib

2013-06-17 Thread Steven Degutis
The goal is to have an extensible, simple core for a testing lib, where all other Clojure testing libs can be rewritten as extensions to it. A common motivation is that people want to mix and match aspects/features of different testing lib. But really, each person wants this for different reasons.

Re: type-hints positioning convention?

2013-06-17 Thread Ambrose Bonnaire-Sergeant
After some investigation, the before-the-arglist syntax only seems useful for defining fn's that return primitive types. They don't seem to help resolve reflection calls. (require '[clojure.tools.analyzer :refer [ast]]) ; this creates a double-emitting fn (ast (fn (^double [^double a] a))) ; =>

Re: Any suggestions for configuration solution in Clojure or Java world?

2013-06-17 Thread josh rotenberg
I like carica for configuration: https://github.com/sonian/carica I switched a project over from the typesafe config package (with my own very thin Clojure wrapper around it) to carica and found it really nice to work with. Josh -- -- You received this message because you are subscribed to the

Re: type-hints positioning convention?

2013-06-17 Thread Jim - FooBar();
so how about this then? nREPL server started on port 43830 REPL-y 0.2.0 Clojure 1.5.1 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) user=> (s

Re: type-hints positioning convention?

2013-06-17 Thread Ambrose Bonnaire-Sergeant
Yes, it did. That's interesting. I have no idea where the .length method is being inferred from in the last example. Carry on :) Ambrose On Tue, Jun 18, 2013 at 1:10 AM, Jim - FooBar(); wrote: > so how about this then? > > > nREPL server started on port 43830 > REPL-y 0.2.0 > Clojure 1.5.1 >

Re: type-hints positioning convention?

2013-06-17 Thread Ambrose Bonnaire-Sergeant
Seems like there's some trickery involved with using Vars. This example seems to use reflection. user=> (.length ((fn ^String [^String s] (.substring s 0 (.length s))) "a")) Reflection warning, NO_SOURCE_PATH:1:1 - reference to field length can't be resolved. 1 Thanks, Ambrose On Tue, Jun 18,

Re: type-hints positioning convention?

2013-06-17 Thread Jim - FooBar();
OK now I'm confused! If you are using an unnamed fn form there is only one place to put the return type-hin,t and that is between the 'fn' and the '[...]' ...but, you've just demonstrated that this causes reflection...where else can we put it? Jim On 17/06/13 18:33, Ambrose Bonnaire-Sergeant

Re: type-hints positioning convention?

2013-06-17 Thread Ambrose Bonnaire-Sergeant
I'm not sure. I guess we're stuck with tagging locals at that point? Thanks, Ambrose On Tue, Jun 18, 2013 at 1:38 AM, Jim - FooBar(); wrote: > OK now I'm confused! If you are using an unnamed fn form there is only > one place to put the return type-hin,t and that is between the 'fn' and the >

Re: type-hints positioning convention?

2013-06-17 Thread Alan Malloy
Typehints for functions are only useful on vars. There is no code anywhere, as far as I know, that looks at the metadata attached to anonymous functions. On Monday, June 17, 2013 11:04:45 AM UTC-7, Ambrose Bonnaire-Sergeant wrote: > > I'm not sure. I guess we're stuck with tagging locals at that

Re: Any suggestions for configuration solution in Clojure or Java world?

2013-06-17 Thread Dick Davies
I glanced at this a while back - does carica support java -jar myuberjar.jar config.clj type invocation, or is it strictly "compile the config in" a la bundle into the class path? I generally ship the same uberjar around for prod/dev/etc. along with a per-environment config.clj file, and that se

Graph API

2013-06-17 Thread Stephen Kockentiedt
Hello, I want to create a graph API similar to what core.matrix is for matrices. I have created some protocols which every graph implementation has to satisfy and a prototype implementation. Now I want your feedback on these protocols. Which functions do you want to see which aren't there? Whic

Re: Any suggestions for configuration solution in Clojure or Java world?

2013-06-17 Thread Robert Levy
Last year I released milieu which I developed at Draker, Inc. I have a few improvements (more features, some of them inspired by caricajure) slated for a release soon. On Jun 17, 2013 12:17 PM, "Dick Davies" wrote: > I glanced at this a while back - does carica support > > java -jar myuberjar.jar

Medical Diagnostic (Expert System)

2013-06-17 Thread HackPath
Hello everyone, I'm a beginner programmer of Clojure language and I have a projet where i need to translate a discusion between a patient and a system to an expert system in clojure.So first here are the basis rules : Rule1 : If hedeach then prescribe analgesic

Re: Graph API

2013-06-17 Thread dgrnbrg
I think that there's already a project working on this called Loom. The furthest-developed fork is here: https://github.com/aysylu/loom which appears to have protocols for graphs, bindings to Titanium (the Clojurewerkz graph DB library), visualization support, and implementations of several alg

First day with Macros

2013-06-17 Thread Hussein B.
Hi, My target is to have something like this: (servlet "ArticlesServlet" (do-get [this request response] (println "Get Request")) (do-post [this request response] (println "Post Request"))) I started with this: (defmacro servlet [servlet-name meths] `(reify Servlet (for [met

Re: Graph API

2013-06-17 Thread Zack Maril
Take a look at Tinkerpop's blueprints for a well tested Java API and Archimedes for simple graph operations in Clojure. http://www.tinkerpop.com/ https://github.com/clojurewerkz/archimedes As far as the suggested protocols go, I would suggest doing something useful with them before opening it u

Re: First day with Macros

2013-06-17 Thread Gary Trakhman
Unquoting 'camel-case-method-name' is going to try and replace the symbol with it's value during compile-time in the context of the macro itself. also, reify isn't going to work if you need a named class to actually wire up your servlet, for example with a web.xml. Also, consider that you'll need

Re: First day with Macros

2013-06-17 Thread Hussein B.
Here is my fourth attempt: (defmacro servlet [servlet-name & meths] `(reify Servlet (for [meth ~meths] (let [[method-name args & body] ~meth camel-case-method-name (hyphenated->camel-case ~method-name)] (camel-case-method-name ~args ~@body) Still it is not

Re: First day with Macros

2013-06-17 Thread Gary Trakhman
here's a starting point: https://github.com/mmcgrana/ring/blob/master/ring-servlet/src/ring/util/servlet.clj#L149 On Mon, Jun 17, 2013 at 6:12 PM, Hussein B. wrote: > Here is my fourth attempt: > > (defmacro servlet [servlet-name & meths] > `(reify Servlet > (for [meth ~meths] >(

Performance optimizations dealing with java collections

2013-06-17 Thread Tim Jones
I'm working on a small clojure program which pulls data from a custom memory-backed data store via a java api. When looking at performance, there is a hotspot at the point of interaction with this API. One of the fields of each record being exported contains a list of lists of strings (List>)

Re: Medical Diagnostic (Expert System)

2013-06-17 Thread u1204
Look for Charles Forgy and the RETE algorithm. It is the basis for most expert systems. Tim Daly -- -- 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 mo

Re: First day with Macros

2013-06-17 Thread Carlo Zancanaro
I can't speak to the issues that Gary raised, but I can help you with your macro. (defmacro servlet [servlet-name & meths] `(reify Servlet ~@(for [meth meths] (let [[method-name args & body] meth method-name (hyphenated->camel-case method-name)] `(~method-

Heroku Clojure scheduled tasks versus worker threads

2013-06-17 Thread Jonathon McKitrick
How would you sum up the differences? Does the worker thread simply run all the time? Wouldn't that run up the dyno usage? -- -- 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 p

Re: 'foldcat' slower than 'mapv' even for 10,000 elements

2013-06-17 Thread Herwig Hochleitner
Interesting. A possibly stupid question: the input coll is a vector, right? Can you provide a representative example? 2013/6/17 Jim - FooBar(); > Hi again, > > I'm finding that (r/foldcat (r/map f coll)) is consistently slower than a > simple mapv, even for a collection of 10,000 elements and

Re: In what OS do you code?

2013-06-17 Thread Herwig Hochleitner
Gentoo on my pcs and servers. + the occasional ssh shell from my keyboarded android tablet. 2013/6/17 Angel Java Lopez > Windows 8 at work > Windows 2008 Server at home > > Lot of Node.js, C#, Java, PHP coding. Few Clojure, only spikes or little > sample, using REPL, sometimes lein > > Angel "J

Re: [ClojureScript] ANN: core.match 0.2.0-beta2

2013-06-17 Thread ronen
Thank you! On Monday, June 17, 2013 8:10:19 AM UTC+3, Ambrose Bonnaire-Sergeant wrote: > > Fantastic news! > > > On Mon, Jun 17, 2013 at 1:04 PM, David Nolen > > wrote: > >> At long last I've come around to overhauling core.match. >> >> Changes/Fixes/Enhancements are documented here: >> http://g

Re: Any suggestions for configuration solution in Clojure or Java world?

2013-06-17 Thread Mingqi Shao
Josh, thank your suggestions. I glanced Carica found look very simple (I hate complex) and nice. Could you share your practices how to deal with difference environments, dev and online? thanks On Tue, Jun 18, 2013 at 1:08 AM, josh rotenberg wrote: > I like carica for configuration: https://gith

Re: In what OS do you code?

2013-06-17 Thread Curtis Gagliardi
Linux Mint everywhere, but any distro is fine as long as I can run a tiling window manager (i3) and vim on it. People complaining about the hassle really should give Ubuntu/Mint or one of the other really user focused distros a try if they haven't recently, it's really not very difficult anymor

Re: Heroku Clojure scheduled tasks versus worker threads

2013-06-17 Thread danneu
Heroku cron jobs and workers are prorated like dynos. They run in their own processes. So does booting into heroku bash or heroku console. Workers generally consume a queue. I'm not sure what you mean by "worker thread" though. Workers don't run in a thread, and you can launch plain old threads

Re: why clojure.lang.Compiler.LOADER is null in clojure 1.5.1

2013-06-17 Thread Stream
在 2013年5月9日星期四UTC+8下午2时00分54秒,Stream写道: > > Hi all > > i wanna change the classloader of Clojure RT. in 1.5.1 > so , i try to > clojure.lang.Var.pushThreadBindings(clojure.lang.RT.map( > clojure.lang.Compiler.LOADER, cl) ); > > but throws exception that cojure.lang.Compiler.LOADER is

Newbie dependency loading issue

2013-06-17 Thread P Martin
Hi, I want to get the clojure.math.numeric-tower namespace into my code using: (require '[clojure.math.numeric-tower :as math]) I also follow the directions on the github for the library to add a lein dependency in Eclipse. Unfortunately, the code does not find the library, even though the l

Re: Graph API

2013-06-17 Thread Rob Lachlan
Loom was indeed working on this, and it's a very nice library. One thing that I particularly liked about Justin's design, was the ability to run a graph algorithm without worrying about conforming to a particular graph representation. See for example the bread first search function, here: htt

Re: Newbie dependency loading issue

2013-06-17 Thread Sean Corfield
What did you put in your project.clj file? On Mon, Jun 17, 2013 at 6:30 PM, P Martin wrote: > Hi, > > I want to get the clojure.math.numeric-tower namespace into my code using: > > > (require '[clojure.math.numeric-tower :as math]) > > > I also follow the directions on the github for the library

Multiple args: opts map vs inline arguments

2013-06-17 Thread Omer Iqbal
Hey folks, What'c considered more idiomatic when having multiple, optional arguments? (defn foo1 [a b & args] (let [opts (apply hash-map args] ...)) or (defn foo2 [a b opts] ...) Cheers, Omer -- -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: Multiple args: opts map vs inline arguments

2013-06-17 Thread dmirylenka
According, to the library coding standards, the first is better: (release-sharks 2 :laser-beams true); good (release-sharks 2 {:laser-beams true}) ; bad http://dev.clojure.org/display/design/Library+Coding+Standards On Tuesday, June 18, 2013 5:26:15 PM UTC+12, Omer Iqbal wrote: > > Hey folk

Re: In what OS do you code?

2013-06-17 Thread dmirylenka
OS X on the working machine, Ubuntu on the servers. For my project it makes little difference, especially with *brew* on the mac. Currently moving from vi to emacs. On Saturday, June 15, 2013 1:46:37 AM UTC+12, Erlis Vidal wrote: > > Hi, > > I'm a bit curious to know in what OS do you code. Do y

core.logic CLP(Set)

2013-06-17 Thread cig
Is CLP(Set) for core.logic available for use? It does not seem like core.logic 0.8.3 contains this feature. How should I access it if it is available? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo