How should I begin this project?

2014-03-20 Thread kurofune
At my job, I have to meet clients multiple times a week and schedule appointments with them at various places around town. Recently, I have seen a boom in business and while this is very fortunate it has made scheduling tedious. Lamenting this fact, it dawned on me that I might be able to make

Re: [GSoC] Proposal: persistent probabilistic data structures

2014-03-20 Thread Matteo Ceccarello
Thank you Nicola :D Il giorno mercoledì 19 marzo 2014 13:42:31 UTC+1, Nicola Mometto ha scritto: Matteo, When sending the CA adding a project name is optional, you can leave it empty. Usually the name for a contrib project will be chosen in the thread in clojure-dev when proposing the

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Michał Marczyk
On 19 March 2014 21:14, Alex Miller a...@puredanger.com wrote: Rich just pushed a change to the String hashing to address this. We're going to grab the string hashcode (which is cached after first call) and murmur the result of that. This gives us constant time hashcode after first call with

Re: STM and persistent data structures performance on mutli-core archs

2014-03-20 Thread François Rey
On 20/03/14 04:03, Andy C wrote: So, the following test puzzles me. Not because it takes virtually the same time (I know that Fork/Join is not cheap and memory is probably the biggest bottleneck here). But because I do not get why map (as opposed to r/ma) uses all 8 cores on my MacBookPro.

Re: STM and persistent data structures performance on mutli-core archs

2014-03-20 Thread László Török
into uses reduce under the hood, you probably need fold to have the computation to run on FJ: (def a (time (r/foldcat (r/map #( Math/sin (* % %)) l) this runs more than 2x as fast on my macbook pro Las On Thu, Mar 20, 2014 at 10:34 AM, François Rey fmj...@gmail.com wrote: On 20/03/14

Re: STM and persistent data structures performance on mutli-core archs

2014-03-20 Thread François Rey
On 20/03/14 12:26, László Török wrote: into uses reduce under the hood, you probably need fold to have the computation to run on FJ: Yes, now I see all my CPUs being maxed-out. francois@laptop:~$ perf stat java -cp ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar clojure.main -e

Re: How should I begin this project?

2014-03-20 Thread Tim Visher
I would just use Google Calendar for that. On Thu, Mar 20, 2014 at 3:53 AM, kurofune jesseluisd...@gmail.com wrote: At my job, I have to meet clients multiple times a week and schedule appointments with them at various places around town. Recently, I have seen a boom in business and while

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Alex Miller
Yes, agreed. -- 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

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Alex Miller
case depends on hashCode, not hasheq, so should be unaffected by these changes. -- 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

om component state

2014-03-20 Thread Adrian Miron
I'm starting to use om in some projects and one of the first components I had to build was a simple notification component. It shows a message at the top of the page. Other components in the page will use it to display messages when errors happen. My idea was to send the message string to it

Clojure Cookbook is out

2014-03-20 Thread Nando Breiter
I got an email from O'Reilly this morning saying that the Clojure Cookbook had been released, and bought it immediately. Thanks to everyone who contributed! It's very helpful. http://shop.oreilly.com/product/0636920029786.do Nando Aria Media Sagl Via Rompada 40 6987 Caslano Switzerland +41

Re: Clojure Cookbook is out

2014-03-20 Thread Thomas
woooh More good books is good for Clojure. Going to order mine today. And a BIG BIG BIG thank you for everyone who has contributed, that is what I love about Clojure (almost ;) ) most, the community!!! Thomas On Thursday, March 20, 2014 1:15:57 PM UTC, Nando Breiter wrote: I got an

Re: How should I begin this project?

2014-03-20 Thread Nando Breiter
I'm not sure what you mean by scheduling asymmetries. If you mean that someone misunderstood where and when you are supposed to meet, that's one thing. Instead of a web application, you could use a simple email to confirm appointments in this way. At least your clients already use email and would

[ANN] Eastwood 0.1.1 Clojure lint tool

2014-03-20 Thread Andy Fingerhut
Eastwood is a Clojure lint tool. It analyzes Clojure source code in Leiningen projects, reporting things that may be errors. Installation instructions are in the documentation here: https://github.com/jonase/eastwood/#installation--quick-usage The previous release was in January 2014.

Re: How should I begin this project?

2014-03-20 Thread kurofune
Thanks for the responses. I looked into google calendar but I couldn't find anything about this feature. I agree that things can get complex and unwieldy really quick. I am of course using emails and calendars. The problem is that when dealing with large numbers of customers it would be nice to

Re: How should I begin this project?

2014-03-20 Thread Gary Trakhman
This sounds like exactly what doodle does: http://doodle.com/en/ On Thu, Mar 20, 2014 at 11:43 AM, kurofune jesseluisd...@gmail.com wrote: Thanks for the responses. I looked into google calendar but I couldn't find anything about this feature. I agree that things can get complex and unwieldy

Re: How should I begin this project?

2014-03-20 Thread Gary Trakhman
Also, general programming advice: I find myself switching between top-down and bottom-up approaches willy-nilly, but in either case I would avoid worrying about choosing components and impls right away. With both approaches, when prototyping, I'd favor use of core functions and data structures

Re: [GSoC] Proposal, question and possible call for menthor

2014-03-20 Thread Reid Draper
I think #2 would be a great addition to test.check, and I'd be happy to be a mentor. Reid On Wednesday, March 19, 2014 3:49:30 PM UTC-5, Dmitry Groshev wrote: Hello, Clojurians! GSoC application deadline is dangerously close and it's time to fill an application, at last. But here is a

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Tim McCormack
On Wednesday, March 19, 2014 4:14:38 PM UTC-4, Alex Miller wrote: Rich just pushed a change to the String hashing to address this. We're going to grab the string hashcode (which is cached after first call) and murmur the result of that. This gives us constant time hashcode after first call

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Michał Marczyk
We're vulnerable to this problem anyway as long as hashing is deterministic, which is why I think it would be cool to use some universal-hashing-like scheme... I think Murmur3 actually uses a seed that could be randomized? Not really safe in the cryptographic sense of the word, but would make

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Andy Fingerhut
Regarding Michal's comment of using BST (binary search tree)-based dictionaries, Clojure does already have sorted-maps and sorted-sets that do this, for comparable keys/elements. A nice hybrid of the nearly-O(1) typical case of hash maps/sets, and simultaneously protecting against the cases where

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Andy Fingerhut
In case it isn't clear, I don't think such drastic changes could ever hope to be done in a reasonable time frame for Clojure 1.6.0. Probably better to have a different thread for this if there is interest in discussing it. Andy On Thu, Mar 20, 2014 at 10:03 AM, Andy Fingerhut

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Alex Miller
On Thursday, March 20, 2014 11:56:46 AM UTC-5, Michał Marczyk wrote: We're vulnerable to this problem anyway as long as hashing is deterministic, which is why I think it would be cool to use some universal-hashing-like scheme... Agreed - whether it's the old algorithm or new, it's still

Re: How should I begin this project?

2014-03-20 Thread David Pidcock
I second Google Calendar. You can make appointments show as busy so the details are not shared with all clients. Then share your calendar with each client. You can invite specific clients to specific appointments via email, make some of them recurring, and it's up to the client to respond to

Re: How should I begin this project?

2014-03-20 Thread kurofune
Thank you very much for both of those emails Gary. Your programming advice rang very true and doodle does look almost exactly like what I need. I'll look into that and google calendar, but now I need a good project to work on! How does one go about getting mentored in Clojure? Is that even a

ANN simple-time

2014-03-20 Thread Matt Bossenbroek
It is my pleasure to announce simple-time to the world: https://github.com/mbossenbroek/simple-time simple-time is a dead simple datetime timespan library for Clojure. It's an opinionated alternative for clj-time that takes a more functional twist on the object-heavy Joda time library. Full

local mutable state

2014-03-20 Thread Andy Smith
Is is very bad form to use local mutable state to solve problems like : https://www.4clojure.com/problem/114 i.e. (fn [n f xs] (let [c (atom 0)] (take-while #(if (f %) ( n (swap! c inc)) true) xs))) If so, what is the strongest reason to reject this kind of code? Since its a local atom it

Re: Defining custom tags using hiccup ?

2014-03-20 Thread Carlos Fontes
Dave Sann Custom tags are awesome! Just what I was looking for! Do you have this anywhere in clojars.org? On Thursday, April 25, 2013 10:17:42 AM UTC+1, Dave Sann wrote: see this commit for main changes to hiccup

Re: ANN simple-time

2014-03-20 Thread James Trunk
Hi Matt, Thanks for your work on this library, it looks truly excellent. The next time I need to deal with dates or times I'll be reaching straight for simple-time. Cheers, James On Thursday, March 20, 2014 7:15:55 PM UTC+1, Matt Bossenbroek wrote: It is my pleasure to announce simple-time

Re: local mutable state

2014-03-20 Thread Jacob Goodson
I suggest using proteus https://github.com/ztellman/proteus for performant local mutation. On Thursday, March 20, 2014 3:34:20 PM UTC-4, Andy Smith wrote: Is is very bad form to use local mutable state to solve problems like : https://www.4clojure.com/problem/114 i.e. (fn [n f xs] (let

Re: local mutable state

2014-03-20 Thread James Reeves
There are a few reasons to reject this style of code: 1. It's typically less performant. 2. It's more prone to error. 3. It's not particularly idiomatic. Also, as this is a learning exercise, I suspect that the question is directing you toward a more functional solution. - James On 20 March

Re: local mutable state

2014-03-20 Thread Timothy Baldridge
Not to mention that this isn't local mutation. You are handing the atom to a closure that then gets wrapped by lazy-seq and returned. So the atom may actually sit around for some time. On Thu, Mar 20, 2014 at 2:26 PM, James Reeves ja...@booleanknot.com wrote: There are a few reasons to reject

Re: local mutable state

2014-03-20 Thread Andy Smith
Also from the proteus link, i read 'these variables cannot escape the local scope; if passed into a function or closed over', which is a problem with code such as in my example I suppose. I wasnt trying to avoid the functional approach but just being devils advocate. Thanks for your comments.

Re: [ANN] Eastwood 0.1.1 Clojure lint tool

2014-03-20 Thread Sean Corfield
Thanx for Eastwood - it's a great tool! Just FYI, using Clojure 1.6.0 builds produces these warnings: WARNING: record? already refers to: #'clojure.core/record? in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/record? WARNING: record? already refers

Re: local mutable state

2014-03-20 Thread Jacob Goodson
You can use proteus with a while loop and be as imperative as you like, however, I think the point of 4clojure is to learn the functional approach to solving problems(I do not really advocate one over the other honestly; multiparadigm ftw) On Thursday, March 20, 2014 4:35:14 PM UTC-4, Andy

Re: [ANN] Eastwood 0.1.1 Clojure lint tool

2014-03-20 Thread Nicola Mometto
Are you sure it's pulling the last tools.analyzer version? That warning has been disabled by this commit in tools.analyzer https://github.com/clojure/tools.analyzer/commit/89d98b688448fe3d02bcabea240bcb2f6d2bbd70 which is two months old Nicola Sean Corfield writes: Thanx for Eastwood - it's a

Re: om component state

2014-03-20 Thread Moritz Ulrich
Adrian Miron writes: I'm starting to use om in some projects and one of the first components I had to build was a simple notification component. It shows a message at the top of the page. Other components in the page will use it to display messages when errors happen. My idea was to

Re: om component state

2014-03-20 Thread David Nolen
On Thu, Mar 20, 2014 at 5:57 AM, Adrian Miron adrian.miron...@gmail.comwrote: I'm starting to use om in some projects and one of the first components I had to build was a simple notification component. It shows a message at the top of the page. Other components in the page will use it to

Perfect Functional Shuffle in Clojure

2014-03-20 Thread Peter Brachwitz
I tried to implement perfect functional shuffle in Clojure as outlined in http://okmij.org/ftp/Haskell/perfect-shuffle.txt This is purely for educational purposes as I am learning Clojure (so please don't be too hard on me if I did something silly) The code:

[ANN] Counterclockwise 0.24.0

2014-03-20 Thread Laurent PETIT
Hello, New release for Counterclockwise. With this release of Counterclockwise, Leiningen projects are automatically started by Leiningen itself. not by some Counterclockwise code trying to mimic / understand leiningen project.clj. This means you can Run as ... and you will get everything

[ANN] stch.dom 0.1.0 - A new jQuery-like DOM manipulation library for ClojureScript

2014-03-20 Thread david
https://github.com/stch-library/dom Add the following to your project dependencies to use: [stch-library/dom 0.1.0] BTW, I'm currently looking for work as a Clojure developer. If you like what you see, please hit me up. David -- You received this message because you are subscribed to the

Re: local mutable state

2014-03-20 Thread James Trunk
Hi Andy, I think Mr. Reeves gave you some excellent reasons to avoid using local mutable state, especially when trying to learn functional programming. If you're interested in seeing a spoiler for 114 you can look at one approach below (if you don't want a spoiler, then close this tab

Re: [ANN] Eastwood 0.1.1 Clojure lint tool

2014-03-20 Thread Andy Fingerhut
Sean, which version of Eastwood are you using when you see those warnings about record? Eastwood output has a line like this near the beginning of its output that should verify: == Eastwood 0.1.1 Clojure 1.6.0-master-SNAPSHOT JVM 1.7.0_51 Does your project depend on the

Re: Help a Startup use Clojure!

2014-03-20 Thread Ravindra Jaju
David, While it is a very detailed and good document, my reaction is that it isn't an appropriate one for business to make the switch. I suspect they will not see any value. I'm not sure what background your boss has, but if the boss isn't into code and only cares about managing the team and the

How to update an atom return the change?

2014-03-20 Thread Jakub Holy
I have couple of times run into a situation where I want to update a state map held in an atom and return the change, not the new value. I haven't found a good way to do it so either I am missing something obvious or there are more idiomatic ways to achieve what I need. Could you advise me? A

[ANN] stch.html 0.1.0 - A brand new library for HTML generation that supports Clojure and ClojureScript

2014-03-20 Thread david
Announcing stch.html. A library for HTML generation that supports Clojure and ClojureScript. Based on ideas from Hoplon. Feedback is welcome. Full documentation and examples can be found at https://github.com/stch-library/html. Add the following to your project dependencies to use:

Re: Perfect Functional Shuffle in Clojure

2014-03-20 Thread Andy Fingerhut
I haven't read all of your code, but note that the Haskell algorithm says it takes a sequence of random values where the first is in the range [0,n-1], the second in the range [0,n-2], third in [0,n-3], etc. Your repeatedly call here:

Re: How to update an atom return the change?

2014-03-20 Thread Stephen Gilardi
There was a stackoverflow question recently that requested a solution for a similar problem: https://stackoverflow.com/questions/22409638/remove-first-item-from-clojure-vector-atom-and-return-it One solution there is similar to this: (defn swap*! Like swap! but returns a vector of [old-value

Re: [ANN] Eastwood 0.1.1 Clojure lint tool

2014-03-20 Thread Sean Corfield
On Mar 20, 2014, at 3:07 PM, Andy Fingerhut andy.finger...@gmail.com wrote: Sean, which version of Eastwood are you using when you see those warnings about record? Eastwood output has a line like this near the beginning of its output that should verify: Ugh! I updated project.clj to use

How did you learn Clojure?

2014-03-20 Thread Marcus Blankenship
Hi Folks, I'm a post technical PM who's fascinated by Clojure, and want to learn it, but am having a hard time without a real project to work on. It's actually excited me so much I'm considering hanging up my PM hat and diving back in the programmer pool again! My problem appears to be 1)

Re: Defining custom tags using hiccup ?

2014-03-20 Thread Carlos Fontes
Hey, I provided it here: [ccfontes/hiccup 1.0.3-custom-tags] so don't bother if you didn't do it. Btw, it's working alright, thanks! On Thursday, March 20, 2014 8:01:55 PM UTC, Carlos Fontes wrote: Dave Sann Custom tags are awesome! Just what I was looking for! Do you have this anywhere in

Re: How did you learn Clojure?

2014-03-20 Thread blake . watson
I'm learning it now. In my case, we had a single Clojure programmer who's leaving and I was volunteered to take his place. =) So, in this case, fear is very focusing. Heh. Fun, though. He's been giving lessons and I've been reading books, using 4Clojure, looking at a variety of different

Re: How did you learn Clojure?

2014-03-20 Thread Marcus Blankenship
Cool, thanks! Nice to have a project to work on, I'm sure! Sent from my iPhone On Mar 20, 2014, at 6:52 PM, blake.wat...@pnmac.com wrote: I'm learning it now. In my case, we had a single Clojure programmer who's leaving and I was volunteered to take his place. =) So, in this case, fear

Re: How did you learn Clojure?

2014-03-20 Thread Alex Miller
Hi Marcus, Some great problem sites that can provide opportunities for practice: - http://clojurescriptkoans.com/ (I think everything here is actually Clojure) - http://4clojure.com - make sure to turn on code golf mode and look at others' solutions too - http://exercism.io - get feedback from

Re: Creating multi-module projects with dependencies between modules

2014-03-20 Thread Jim Crossley
Hi again David, I just released lein-modules 0.2.1 that hopefully addresses your concerns: 1) Dependency symbols in the :versions map are more lenient now. You can use either the group id or the artifact id by itself. 2) You exposed a bug where versions for dependencies specified in the

Re: How did you learn Clojure?

2014-03-20 Thread Marcus Blankenship
Thanks, Alex! Is it kosher to post questions about 4Clojure here? I'm stumped on a few, and simply looking up the answer often isn't helpful... Is there a clojure-noobs list? Sent from my iPhone On Mar 20, 2014, at 8:11 PM, Alex Miller a...@puredanger.com wrote: Hi Marcus, Some

Spawn external process and read from output

2014-03-20 Thread gvim
I'm not familiar with the Java standard library and didn't find anything matching my question on Google so here goes. From my Clojure app I need to call an executable written in C and parse the text output within my Clojure app. What's the standard way to call an external process and read its

Re: How did you learn Clojure?

2014-03-20 Thread Devin Walters
Shameless self-promotion: http://GetClojure.com is something I wrote to hopefully help people learn Clojure. One of the primary methods I used for learning Clojure was to do problems, like the ones Alex mentioned, read source, and ask questions in irc. The last one is important IMO and it's the