Re: Does Pedestal have a future in the long run

2013-11-19 Thread Geraldo Lopes de Souza
As for UI. Isnt reactjs (facebook renderer library) a good fit for pedestal ? it appears to use the same ideas of webfui. Webfui's author even complimented reacjts guys for their work: https://groups.google.com/forum/#!searchin/reactjs/conrad/reactjs/e3bYersyd64/fH83IFqXb2oJ There are a rece

Re: [Job spam] Write Clojure in your pajamas, for decent money in a pleasant company, remote pairing all the time

2013-11-19 Thread Thiago Massa
H1B sponsor? On Tue, Nov 19, 2013 at 1:47 AM, gaz jones wrote: > *your :) > > > On Mon, Nov 18, 2013 at 9:46 PM, gaz jones wrote: > >> If you're account had a picture like his, YES. >> >> >> On Mon, Nov 18, 2013 at 5:45 PM, Tony Tam wrote: >> >>> Hi, >>> >>> I'm always curious about remarks li

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-19 Thread David Simmons
Hi Ryan I'm really impressed with Caribou but would make one request that will make my life easier. I'm a big fan of Angular JS and the template tags for Angular and Caribou clash. Is there any chance these could be changed from {{ to {% (or something similar)? The best result for me would be

Re: instaparse: composing smaller rules into a bigger one

2013-11-19 Thread Jim - FooBar();
Hi Mark, Your comments were spot on! Changing the SPACE tag makes it work and I can also get rid of all the '?' after 'SPACE'. Also hiding the actual spaces makes it look a lot nicer. Many many thanks for this...:) I applied to register at the instaparse google group and my registration is p

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-19 Thread Khalid Jebbari
At least you can change Angular.js template tags. See http://stackoverflow.com/questions/8302928/angularjs-with-django-conflicting-template-tags for a how-to and potential problems with this approach. On Tuesday, November 19, 2013 11:27:14 AM UTC+1, David Simmons wrote: > > Hi Ryan > > I'm rea

Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Colin Yates
Hi all, I have a sequence of {:key K :value V} maps. There is no guarantee that there is one map for every known K. I need to ensure that there is a map for each known K. Imagine the sequence represents a distribution between 1 and 5. The initial sequence might only be [{:key 3 :value 30} {

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-19 Thread David Simmons
Hi Khalid yes I'm aware you can change the template tags (and the pitfalls :-)). I thought it would be easier to see if we could avoid this problem all together by using a different set of tags (especially as Caribou is Alpha release and hopefully open to change). BTW I don't intend to miss An

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Jim - FooBar();
On 19/11/13 11:29, Colin Yates wrote: Imagine the sequence represents a distribution between 1 and 5. The initial sequence might only be [{:key 3 :value 30} {:key 4 :value 40}]. I want it to be [{:key 1 :value nil} {:key 2 :value nil} {:key 3 :value 30} {:key 4 :value 40} {:key 5 :value nil}]

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Jim - FooBar();
On 19/11/13 11:42, Jim - FooBar(); wrote: On 19/11/13 11:29, Colin Yates wrote: Imagine the sequence represents a distribution between 1 and 5. The initial sequence might only be [{:key 3 :value 30} {:key 4 :value 40}]. I want it to be [{:key 1 :value nil} {:key 2 :value nil} {:key 3 :value

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Chas Emerick
One note on the ordering questions: each of them were constructed to present a randomized ordering to each new respondent, so there was no bias introduced by a default ordering. Cheers, - Chas On 11/18/2013 03:09 PM, kovas boguta wrote: Great job Chas. Some notes on methodology and then som

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Colin Yates
Great stuff - thanks Jim. (not sure why my previous post got lost) On Tuesday, November 19, 2013 11:48:17 AM UTC, Jim foo.bar wrote: > > On 19/11/13 11:42, Jim - FooBar(); wrote: > > On 19/11/13 11:29, Colin Yates wrote: > >> Imagine the sequence represents a distribution between 1 and 5. The

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Jim - FooBar();
On 19/11/13 11:29, Colin Yates wrote: In Java I would do something like: // create a convenient look up to avoid nasty N^2 lookups Map keyToValue = new HashMap for (Map kvMap: kvSequence) keyToValue.put(kvMap.get("key"), kvMap.put("value")); List allKeys = calculateAllKeys(); List> resul

ExceptionInfo.toString() isn't much informative

2013-11-19 Thread Alice
I found it inconvenient that the printed message of the thrown ExceptionInfo object doesn't include the attached map. user=> (throw (ex-info "foo" {:type "my error"})) ExceptionInfo foo clojure.core/ex-info (core.clj:4327) When testing the function that throws ExceptionInfo, I have to wrap it w

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Brian Craft
On Monday, November 18, 2013 3:58:10 PM UTC-8, kovasb wrote: > > There are a large number of high quality libraries like instaparse, > cascalog, storm, overtone, friend, etc. I find it pretty easy to tell > the difference between a hobby and production project. Besides the > typically liveline

parse a text file that has some binary characters

2013-11-19 Thread smk
Hi I am trying to parse a text file that has some binary characters(such as 0x001 or 0x002) and replace them with text characters. How to do it in clojure? Thanks in advance ...smk -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Patrick Kristiansen
> This is trivial to work around, but I hit this kind of thing > constantly with every clojure library I use: clojure libraries are > about 70% implemented, and 90% correct, which makes a weak foundation. > I was amused to find the Lisp Curse article a few weeks ago, which > describes this situatio

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Brandon Adams
I realize that's just an example, but I wouldn't expect to need anything other than interop to do this (off the top, maybe java.nio.file.Path can be constructed directly?): (defn normalize-path [& rest] (-> (reduce #(new java.io.File %1 %2) rest) .toPath .normalize)) On Tue, Nov 19, 2013 at 8

Re: New Functional Programming Job Opportunities

2013-11-19 Thread Dave Tenny
Fun reading! On Monday, November 18, 2013 2:00:02 AM UTC-5, Sean Murphy wrote: > > Here are some functional programming job opportunities that were posted > recently: > > Clojure Engineers Needed! at Factual > http://functionaljobs.com/jobs/8657-clojure-engineers-needed-at-factual > > Cheers,

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Phillip Lord
Brian Craft writes: > For example, I have a project with rather modest requirements, one of them > being abstract path manipulation. In javascript: > > path.normalize(path.join("one", "two", "..", "three")) > 'one/three' > > ruby: > > irb(main):003:0> Pathname.new("one") + "two" + ".." + "three"

Re: cider status

2013-11-19 Thread Phillip Lord
I discovered one of the reasons for my issues with stability yesterday. The version of clojure-test-mode on marmalade still depends on nrepl (rather than cider), so, despite my best efforts to remove nrepl.el it was still getting pulled back in. Fun and games! Phil Phillip Lord writes: > I ha

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Laurent PETIT
2013/11/19 Phillip Lord > Brian Craft writes: > > > For example, I have a project with rather modest requirements, one of > them > > being abstract path manipulation. In javascript: > > > > path.normalize(path.join("one", "two", "..", "three")) > > 'one/three' > > > > ruby: > > > > irb(main):003

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Michael Klishin
2013/11/19 Brian Craft > What I don't expect is clojure users to report that the libraries are just > great. Clojure libraries are very weak compared to other modern languages. Bold statement, Brian. Surely you've tried at least 60% of the libraries out there to make your judgement more scienti

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread James Reeves
On 19 November 2013 14:22, Brian Craft wrote: > > For example, I have a project with rather modest requirements, one of them > being abstract path manipulation. In javascript: > > path.normalize(path.join("one", "two", "..", "three")) > 'one/three' > > ruby: > > irb(main):003:0> Pathname.new("one

Re: How to convert this simple (and inefficient) fibonacci function to # format

2013-11-19 Thread anguscom...@gmail.com
Did this get returned from my htc Sent from my HTC - Reply message - From: "Angus" To: Subject: How to convert this simple (and inefficient) fibonacci function to # format Date: Wed, Nov 13, 2013 17:41 I know this fibonacci function is not optimal but I want to learn one step at a t

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Phillip Lord
Laurent PETIT writes: >> One of the interesting questions, I think, is the embrace the host >> notion. One solution to the problems you describe is to just use the >> equivalent java libraries. Is this a failure of the clojure library >> ecosystem or a pragmatic solution? >> > > YMMV : a pragmati

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Laurent PETIT
2013/11/19 Phillip Lord > Laurent PETIT writes: > > >> One of the interesting questions, I think, is the embrace the host > >> notion. One solution to the problems you describe is to just use the > >> equivalent java libraries. Is this a failure of the clojure library > >> ecosystem or a pragmat

Question regarding core.async

2013-11-19 Thread bob
Hi, There are two fn, one is to spawn the channel and the other is to send the message to the channel, The problem is that if the time to handle the message(or command) is more than the specified timeout time, and then another messages are emitted to the channel before the channel finish h

Re: Generating functions from data

2013-11-19 Thread John D. Hume
After some experience with excessively meta-programmed Ruby apps, I generally try to design an API that is as clean (or almost) as what I'm tempted to generate and avoid the metaprogramming. For example (api/get-user-by-id "123") is only slightly nicer than (api/get-by-id :user "123"), so if the fo

[ClojureCLR] Clojure.Compile.exe

2013-11-19 Thread Frank Hale
I'm using Clojure-CLR 1.5 and cannot get a simple hello,world to compile into an executable using Clojure.Compile.exe. Code: (ns clojureclr-test (:gen-class)) (defn -main [] (println "Hello, World)) When I attempt to compile the code using Clojure.Compile.exe I get the following error:

Re: [ClojureCLR] Clojure.Compile.exe

2013-11-19 Thread Shantanu Kumar
Hi Frank, (Saw your post shared on ClojureCLR Google+ but was unable to comment.) This may be slightly tangential but you might want to look at lein-clr: https://github.com/kumarshantanu/lein-clr It makes these things easier to do on the command-line. You need to install Java and Leiningen to

Re: [ClojureCLR] Clojure.Compile.exe

2013-11-19 Thread Frank Hale
Ugh, as it always goes right after posting to a mailing list you find out what the problem is. My clojure source file name was the problem. I had a dash in the filename and apparently that is a problem. All is well. LOL! On Tue, Nov 19, 2013 at 11:54 AM, Shantanu Kumar wrote: > Hi Frank, > > (Sa

Re: [ClojureCLR] Clojure.Compile.exe

2013-11-19 Thread Frank Hale
Thanks Shantanu, I will look into lein-clr. On Tue, Nov 19, 2013 at 11:57 AM, Frank Hale wrote: > Ugh, as it always goes right after posting to a mailing list you find out > what the problem is. My clojure source file name was the problem. I had a > dash in the filename and apparently that is a

configure leiningen to use library when repl starts

2013-11-19 Thread Andy Smith
Hi, total newbie here and have come unstuck with the repl configuration. How can I configure my leiningen project's clj file to call '(use 'clojure.math.numeric-tower)' when the repl is started with 'lein repl'? I have tried adding the command to the repl-options but I get a java exception wh

running command when lein repl starts

2013-11-19 Thread Andy Smith
Hi, How can I get a command such as '(use 'clojure.math.numeric-tower)' to run when I start the repl with 'lein repl' ? I currently have my leiningen project setup as the following : (defproject test "1.0.0-SNAPSHOT" :description "FIXME: write description" :dependencies [[org.clojure/clojur

Re: running command when lein repl starts

2013-11-19 Thread Josh Kamau
Is it intentional that you are using clojure 1.3.0 instead of a newer version like 1.5.1 ? Do "lein deps" to download the dependencies. Then do lein repl Josh On Tue, Nov 19, 2013 at 8:08 PM, Andy Smith wrote: > Hi, > > How can I get a command such as '(use 'clojure.math.numeric-tower)' to

Re: Generating functions from data

2013-11-19 Thread Jeremy Heiler
On Tue, Nov 19, 2013 at 11:44 AM, John D. Hume wrote: > After some experience with excessively meta-programmed Ruby apps, I > generally try to design an API that is as clean (or almost) as what I'm > tempted to generate and avoid the metaprogramming. For example > (api/get-user-by-id "123") is onl

Re: running command when lein repl starts

2013-11-19 Thread Andy Smith
Ok valid point, but I still get the same kind of errors? -- -- 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 fi

Re: running command when lein repl starts

2013-11-19 Thread David Powell
Hmm, maybe you need to use this: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L209 -- Dave On Tue, Nov 19, 2013 at 5:51 PM, Andy Smith wrote: > Ok valid point, but I still get the same kind of errors? > > -- > -- > You received this message because you are subscrib

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-19 Thread Ryan Spangler
David, Certainly. There is already a facility to change them, I just haven't exposed that to the user yet! This will come out in the next release. On Tue, Nov 19, 2013 at 3:39 AM, David Simmons wrote: > Hi Khalid > > yes I'm aware you can change the template tags (and the pitfalls :-)). I > t

Re: running command when lein repl starts

2013-11-19 Thread David Powell
Hmm, no it is just a syntax thing with your project, This works: (defproject test "1.0.0-SNAPSHOT" :description "FIXME: write description" :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/math.numeric-tower "0.0.2"]] :repl-options {:init (use 'clojure.math.numeric-t

Re: running command when lein repl starts

2013-11-19 Thread Andy Smith
yes, Ive seen that but it doesnt seem to help me greatly. Just out of curiosity how do you generally setup your repl so it already includes these kind of common libraries? I dont really want to be typing lots of 'use' commands into the repl every time i start it. Is using leiningen the wrong wa

Re: running command when lein repl starts

2013-11-19 Thread David Powell
I tend to work on files in emacs or an IDE, with a linked repl, rather than at a raw repl, so the file I'm working on will tend to have an ns directive that will require the appropriate namespaces, so I just eval that when I open the file. On Tue, Nov 19, 2013 at 6:05 PM, Andy Smith wrote: > ye

Re: running command when lein repl starts

2013-11-19 Thread Andy Smith
oops, you are right but if I paste into my project.clj I get a different error when I run lein repl andy@Aspire-V3-571:~/projects/clojure/test$ lein repl Exception in thread "main" java.lang.IllegalArgumentException: No value supplied for key: [:init (use (quote clojure.math.numeric-tower))] (N

Re: cider status

2013-11-19 Thread Colin Yates
That's the culprit - I was wondering why nrepl wouldn't disappear! For me, cider has been rock solid with midje-mode, but I am not really exercising it too much. On Tuesday, November 19, 2013 2:56:05 PM UTC, Phillip Lord wrote: > > > I discovered one of the reasons for my issues with stability y

Re: configure leiningen to use library when repl starts

2013-11-19 Thread Colin Yates
Something that works is putting ":injections [(require 'clojure.repl)]" in .lein/profiles.clj. It works (as evidenced by (doc ...) working in "lein repl") but I don't know if that is the correct approach. On Tuesday, November 19, 2013 4:57:48 PM UTC, Andy Smith wrote: > > Hi, > > total newbie

Re: Do web apps need Clojure?

2013-11-19 Thread Colin Yates
this. The ease of which data can be mangled and transformed was the primary reason I chose Clojure over Java, Groovy and Scala. That, and the fact the language is just so darn expressive. On Thursday, November 14, 2013 8:56:59 AM UTC, Islon Scherer wrote: > > For me it's about 1 thing: Data. >

[ANN] Leiningen 2.3.4 released

2013-11-19 Thread Phil Hagelberg
Hello folks. I'm happy to announce the release of Leiningen 2.3.4. This one is primarily a bugfix release; though there are a few minor enhancements. ## 2.3.4 / 2013-11-18 * Suggest `:exclusions` to possibly confusing `:pedantic?` dependencies. (Nelson Morris, Phil Hagelberg) * Optionally look

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-19 Thread David Simmons
> > Ryan - that is great news. Are we allowed to know what else will be > release :-). > cheers Dave -- -- 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 member

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Sean Corfield
To Michael: It is fairly up to date - there have only been a few small changes to java.jdbc since the last updates to that part of clojure-doc.org. Now that java.jdbc 0.3.0 has hit beta and has a stable API for release, I feel more comfortable about updating the clojure-doc.org pages to include the

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Sean Corfield
On Sun, Nov 17, 2013 at 1:57 AM, Andrey Antukh wrote: > Additionally I have > copied some useful functions like parsing dbspec to URI or a map of > protocol->cases > and the rest are written from scratch. Looking through the source code, there are quite a few functions copied directly from parts

Re: [ClojureCLR] Clojure.Compile.exe

2013-11-19 Thread dmiller
ClojureCLR follows ClojureJVM in translating hyphens in namespace names to underscores in filenames. -David On Tuesday, November 19, 2013 11:00:37 AM UTC-6, Frank Hale wrote: > > Thanks Shantanu, I will look into lein-clr. > > > On Tue, Nov 19, 2013 at 11:57 AM, Frank Hale > > wrote: > >> Ugh,

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread gaz jones
"Because there is no patch for human stupidity"? On Tue, Nov 19, 2013 at 1:35 PM, Sean Corfield wrote: > On Sun, Nov 17, 2013 at 1:57 AM, Andrey Antukh wrote: > > Additionally I have > > copied some useful functions like parsing dbspec to URI or a map of > > protocol->cases > > and the rest are

Super-simple recursive-descent parser in Clojure?

2013-11-19 Thread markjszy
Hi everyone, I have been learning Clojure for a little bit now and had thought about using the language to try to explore compilation/language parsing. I had a lot of trouble getting a recursive-descent parser implementation implemented in the language, and was hoping someone might be able to s

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Softaddicts
You have the typical profile of people who do not understand open source. To you, open source is the same thing has a side hobby, ... with lack of commitment and seriousness. How do you expect open source software quality to improve if each of us starts to spin off our own flavor of the same lib ?

ANN Elastisch 1.3.0-rc1 is released

2013-11-19 Thread Michael Klishin
Elastisch [1] is a minimalistic Clojure client for ElasticSearch. 1.3.0-rc1 is a release candidate that introduces one minor feature and fixes one bug. Release notes: http://blog.clojurewerkz.org/blog/2013/11/20/elastisch-1-dot-3-0-rc1-is-released/ 1. http://clojureelasticsearch.info -- MK htt

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Andrey Antukh
Hi Sean. 2013/11/19 Sean Corfield > To Michael: It is fairly up to date - there have only been a few small > changes to java.jdbc since the last updates to that part of > clojure-doc.org. Now that java.jdbc 0.3.0 has hit beta and has a > stable API for release, I feel more comfortable about upd

Re: Super-simple recursive-descent parser in Clojure?

2013-11-19 Thread James Reeves
If anything, parsing is easier to do with immutable structures, as backtracing is trivial. You don't need a mutable stream of symbols, you just need to have parsing functions with a type signature like: tokens -> [ast tokens] Rather than the function parsing a stream of tokens and returning

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Softaddicts
Gaz, excuse me if I misunderstood you, I reread your reply and it was not clear to me to whom you were referring in your comment. I still stand by what I said toward the op. Saying that if rewritten the code would be the same as the original is a lame excuse, it's the same as all that internet ch

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Michael Klishin
2013/11/20 Softaddicts > How do you expect open source software quality to improve if each of us > starts to spin off our own flavor of the same lib ? > Sometimes creating a new library is the right thing to do. I'll give you one example. When I started Langohr and Monger in 2011, there were W

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Michael Klishin
2013/11/20 Andrey Antukh > > About license question: if these functions had not copied, but written > from scratch, them would be the same functions with minimal differences or > none... > Sorry but that's a ridiculous argument. You must respect and obey by the license of the project you take co

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread gaz jones
Whoops, sorry looks like my intended light-hearted sarcasm based on one of the email signatures in the thread got mis-interpreted. Hard to express in an email, perhaps a cheeky :P after would have let you know I wasn't being particularly serious! No offense intended, or taken :) On Tue, Nov 19,

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Andrey Antukh
Is not an excuse, is only a opinion, nothing more. This opinion can not change that, mention the original author is right and I've done it. I have no way intend to belittle anyone. ;) Andrey 2013/11/19 Softaddicts > Gaz, excuse me if I misunderstood you, I reread your reply and it was not >

ANN 2 years of ClojureWerkz

2013-11-19 Thread Michael Klishin
A couple of weeks ago ClojureWerkz [1] turned two years old. We are at 29 projects (not including failed experiments) and kicking. There have been dozens of contributors, entire major releases brilliantly managed by people outside of our tiny core team, and a pretty high bar in project quality sus

Re: ANN 2 years of ClojureWerkz

2013-11-19 Thread Andrey Antukh
Congrats! clojurewerkz is now my reference for search a good and well documented clojure libraries. Thanks for all efforts! ;) Andrey 2013/11/20 Michael Klishin > A couple of weeks ago ClojureWerkz [1] turned two years old. > We are at 29 projects (not including failed experiments) and kicki

Re: ANN 2 years of ClojureWerkz

2013-11-19 Thread Bruce Durling
Michael, Congrats and keep on going. I love using your libraries. cheers, Bruce On Tue, Nov 19, 2013 at 11:05 PM, Michael Klishin wrote: > A couple of weeks ago ClojureWerkz [1] turned two years old. > We are at 29 projects (not including failed experiments) and kicking. > > There have been doz

Re: instaparse: composing smaller rules into a bigger one

2013-11-19 Thread Mark Engelberg
On Tue, Nov 19, 2013 at 3:12 AM, Jim - FooBar(); wrote: > > Shouldn't the EFF rule have caught the [:SIGN [:ADV "significantly"]] tag? > Why did it start a new PHRASE ? The same thing happens with XFOLD. iF the > 'x-fold' is before the adverb (2-fold increases) it shows in the DDIPK tag > otherwis

Re: [Job spam] Write Clojure in your pajamas, for decent money in a pleasant company, remote pairing all the time

2013-11-19 Thread Alexey Verkhovsky
On Monday, 18 November 2013 16:45:40 UTC-7, Tony Tam wrote: > > If I sent you a like to a github profile that looked like yours ( > https://github.com/alexeyv?tab=repositories), would I ever get an answer? > I mean, it's very probable that all your activity is going into private > repos. > I'd p

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Alexander Hudek
Sean, for what it's worth many of us do appreciate the slow and careful development of java.jdbc. When it's used so widely in production code frequent breaking changes are very costly. The new 0.3.0 API is pretty nice, though I have found documentation for it somewhat lacking. That said, I have

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Joshua Ballanco
In an attempt to be slightly more "elegant" (whatever that means ;-) ): -8<-8<- (def start [{:key 3 :value 10} {:key 6 :value 30}]) (into [] (map (fn [[k v]] {:key k :value v}) (merge (into {} (for [x (range 6)] {x nil})) (into {} (map (juxt :key :value) start) ;;=> [{:key 6, :

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread John Mastro
This was my first thought (quite close to Jim's): (def the-maps [{:key 3 :value 30} {:key 4 :value 40}]) (def mandatory-keys [1 2 3 4 5]) (defn find-missing-keys [maps keys] (let [found (into #{} (map :key maps))] (remove #(contains? found %) keys))) (defn ensure-mandatory-keys [maps] (

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Sean Corfield
I'll address the java.jdbc.sql question in a separate thread (I've actually addressed it before so I'll search the archives and elaborate on my previous responses). Give me an hour or so... On Tue, Nov 19, 2013 at 5:03 PM, Alexander Hudek wrote: > Sean, for what it's worth many of us do appreciat

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Sean Corfield
On Tue, Nov 19, 2013 at 2:28 PM, Michael Klishin wrote: > 2013/11/20 Andrey Antukh >> About license question: if these functions had not copied, but written >> from scratch, them would be the same functions with minimal differences or >> none... > Sorry but that's a ridiculous argument. You must

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Cedric Greevey
On Tue, Nov 19, 2013 at 10:02 AM, James Reeves wrote: > > > I think in this case it's more a problem with the Java API, which the fs > library wraps. Until Java 7, I don't think relative path normalisation > existed in the core Java libraries. > > It didn't, and .toPath isn't in the 1.6 java.io.Fil

java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl)

2013-11-19 Thread Sean Corfield
In response to the (very reasonable) question from Alex Hudek in a recent thread, here are some of my responses to questions that have arisen about the inclusion of the minimal DSLs in the java.jdbc contrib library: > Just wondering if the intention is to make the DSL the primary way to work > wit

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-19 Thread Sean Corfield
Yes, the path separator is O/S dependent: user> (import '(java.io File)) java.io.File user> (reduce #(File. %1 %2) ["one" "two" ".." "three"]) # user> (.getCanonicalFile (reduce #(File. %1 %2) ["one" "two" ".." "three"])) # user> (.getPath (reduce #(File. %1 %2) ["one" "two" ".." "three"])) "one/

Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-19 Thread Jiaqi Liu
Hi,all I want to parse big log files using Clojure. And the structure of each line record is "UserID,Lantitude,Lontitude,Timestamp". My implemented steps are: > Read log file & Get top-n user list > Find each top-n user's records and store in separate log file (UserID.log) . The implement

Re: Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-19 Thread Mark Engelberg
Looks like you're "holding on to the head" by giving a name (lines) to the result of line-seq. Don't do that. Try: (parse-recur (line-seq rdr)) On Tue, Nov 19, 2013 at 7:27 PM, Jiaqi Liu wrote: > Hi,all > I want to parse big log files using Clojure. > And the structure of each line record is

Re: parse a text file that has some binary characters

2013-11-19 Thread John Mastro
On Tue, Nov 19, 2013 at 6:24 AM, smk wrote: > Hi > I am trying to parse a text file that has some binary characters(such as > 0x001 or 0x002) and replace them with text characters. > How to do it in clojure? > Would something like this work? (require '[clojure.java.io :as io]) (def replace-cha

Re: Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-19 Thread Jiaqi Liu
hi,Mark ,thanks for your suggestion. I modified the main function to : ; (defn parse-file "" [file n] (with-open [rdr (io/reader file)] (println "001 begin with open " (type rdr)) (let [;lines (line-seq rdr) *res (parse-recur (line-seq rdr))*

Re: Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-19 Thread Jiaqi Liu
sorry, i mean "weird"... 2013/11/20 Jiaqi Liu > hi,Mark ,thanks for your suggestion. > I modified the main function to : > ; > (defn parse-file > "" > [file n] > (with-open [rdr (io/reader file)] > (println "001 begin with open " (type rdr)) > (let

Re: Question regarding core.async

2013-11-19 Thread bob
I write a test to produce it,just run the fact several times quickly, and we can see that (println "3" v (java.util.Date.) only be executed one time. (defn handler [c] (go (let [] (loop [] (when-let [v (! c "hello")) (alts!! [c (timeout 3000)]) (println "4" (java.util.Dat

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Kelker Ryan
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

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Kelker Ryan
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

Compojure session handling across concurrent requests

2013-11-19 Thread Binita
Hello everyone, I have a long running POST request which updates the session with the requested result. Now, when such concurrent POST requests are made from the same session, the updates done in concurrent request don't get visibility across each other. The effect is that, the session updates

Re: Get "OutOfMemoryError Java heap space" when parsing big log file

2013-11-19 Thread Mark Engelberg
Yeah, I see now that you're still holding on to the head because a name is given to the line sequence in the functions that you call. One option would be making parse-recur and related functions that take lines as an input into a macro. You could also try: (defn parse-recur "" [ls res] (i

Re: Question regarding core.async

2013-11-19 Thread Timothy Baldridge
This took me a few minutes to figure out, but it's a race condition in your code. There are two things attempting to read from the channel, and one attempting to write. This means sometimes the "hello" put into the channel will be read out right away by the alts!!. If the handler is sleeping, then

Re: [ClojureCLR] Clojure.Compile.exe

2013-11-19 Thread Joshua Ballanco
…and just yesterday a ticket was opened to address at the very least warning when this happens: http://dev.clojure.org/jira/browse/CLJ-1297 . If you've wasted valuable development hours on this, up votes would be appreciated ;-) - Josh On Tuesday, November 19, 2013 at 10:10 PM, dmiller wrote:

Re: [ANN]: clj.jdbc 0.1-beta1 - Alternative implementation of jdbc wrapper for clojure.

2013-11-19 Thread Andrey Antukh
Hi agai Soan. Repeating now: as I said previously, copyright notice of taken code should to be present. And is my mistake from the start not incluide it, I don't have any problem for it. Now I have added a copyright notice. Yo can explain me that is a current legal problem has my library. I would