state management

2013-05-27 Thread John Walker
Hi, I'm dealing with a problem where numerical data needs to be read through a serial port, then rendered to a chart and displayed to the user. The user has to be able to export the chart, and control whether or not reading is actually being done. In addition to this, the chart needs to reflect

Re: (newbie) replace certain values of a map based on a predicate

2013-07-05 Thread John Walker
I had to do something similar, and used clojure.walk. On Friday, July 5, 2013 8:59:54 PM UTC, Colin Yates wrote: > > Hi all, > > I think this is one of those questions which has quite a few answers, but > given a map, how do I replace the v

Re: [ANN] Pedestal-app Tutorial has been released

2013-07-09 Thread John Walker
This is so cool! Brenton and Ryan, thanks so much for taking the time to write this. On Tuesday, July 9, 2013 12:03:58 PM UTC-4, Ryan Neufeld wrote: > > Hey there, Clojurians/Pedestallions! > > I'm pleased to announce the release of a comprehensive tutorial for > pedestal-app: http://bit.ly/ped

[ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-16 Thread john walker
Hello everyone. This is a lein plugin that helps you add dependencies to projects pretty quickly. The git repo is here: https://github.com/johnwalker/lein-plz Basically, you write something like this: lein new foo cd foo lein plz add cljs async match jdbc and get this: (defproject foo "0.1.0

Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-17 Thread john walker
Great! I hope he likes it :) On Sunday, August 17, 2014 3:46:52 PM UTC-7, Ashton Kemerling wrote: > > Ahh, I just had a coworker who is used to NPM complain about leiningen not > having this, thank you! > > -- > Ashton > > On Saturday, August 16, 2014 6:19:42 PM

Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-18 Thread john walker
Thats really strange. I don't know why thats happening, but it should overwrite the project.clj The only i/o relevant to this is over here. It's a combination of with-out-str and spit. https://github.com/johnwalker/lein-plz/blob/master/src/leiningen/plz.clj#L149 On Monday, August 18, 2014 1:08

Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-18 Thread john walker
I hadn't planned on adding remove, but with groups of dependencies, it makes sense. I like it Dependencies that will surely be added get lookups, but no one else. I'm going to play with exclusions to see if I can make it launch faster, but I suspect that it's largely a clojure issue in general.

Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-18 Thread john walker
o edit your .edn file and add {om > #{"om"}} making the addition of the abbreviation substantially longer than > the full dependency name :) > > Sean > > On Aug 16, 2014, at 5:19 PM, john walker > wrote: > > This is a lein plugin that helps you add dependenci

Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-18 Thread john walker
art! I'm almost done with an automatic > template generator (also using re that's at least very helpful for template > development. > > On Aug 18, 2014, at 6:28 PM, john walker > wrote: > > I hadn't planned on adding remove, but with groups of dependencies, it

Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-23 Thread john walker
August 23, 2014 8:21:38 AM UTC-7, Kyle Cordes wrote: > > On Saturday, August 16, 2014 at 7:19 PM, john walker wrote: > > Hello everyone. > > > > This is a lein plugin that helps you add dependencies to projects pretty > quickly. The git repo is here: h

Re: GSoC: Congratulations Aleksandr and Prasant!

2014-08-25 Thread john walker
Thanks so much for your work! I'd be very interested to read more in detail about some of the work you did this summer. -- 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

Re: [ANN] lein-plz 0.1.1 - Add dependencies quickly

2014-08-25 Thread john walker
3> ? Dylan, I've added groups. They're a little different from your suggestion - you basically add nicknames for files, and the keys get inserted. On Monday, August 25, 2014 7:39:23 PM UTC-7, Sean Corfield wrote: > > On Aug 18, 2014, at 10:01 PM, john walker > wrote: >

Re: lein 2.4.3 repl outside project?

2014-08-28 Thread john walker
Right, so if you're having this problem, just do. lein upgrade 2.4.2 Cider users might also get this behavior and not know it - weird things like pretty printing not working are related to this issue. On Thursday, August 28, 2014 9:01:40 AM UTC-7, John Gabriele wrote: > > On Thursday, August 28

Re: how do you name your protocols?

2014-09-05 Thread john walker
As you demonstrated, P, I or nothing is up to taste. The only consensus I know of is camel case. https://github.com/bbatsov/clojure-style-guide#CamelCase-for-protocols-records-structs-and-types On Friday, September 5, 2014 2:52:48 AM UTC-7, Dave Sann wrote: > > I saw a comment on protocol naming

[ANN] Yakshave 0.1.2 - Zoooomm :)

2014-09-18 Thread john walker
Hi everyone, I've produced yakshave, a Nodejs (Clojurescript) utility that currently supports rendering modified Leiningen templates. It's significantly faster than the lein new task, at least before going through https://github.com/technomancy/leiningen/wiki/Faster You can get it with: npm i

[ANN] lein-plz "0.3.0" - Add dependencies quickly

2014-09-22 Thread john walker
Hi everyone, lein-plz is a plugin for adding dependencies quickly. It lets you do things like $ lein plz add cljs core.async instead of editing the project.clj directly. @luxbock added ~450 new builtins from crossclj.info and a list task that simplifies searching

Re: Clojure beginner: angst about "doing things right"

2014-09-22 Thread john walker
Here's one way you could do part of it: https://gist.github.com/johnwalker/7fcf1f988cd5e6e21fd5 (let [day->index(into {} (map-indexed (fn [k v] [v k]) "MTWRFSN")) ;; So M (Monday) maps to 0, S (Saturday) maps to 5 initial-state (into [] (repeat 7 0))] ;; Create an empty vector

Re: Help me make this fn better/prettier

2014-10-01 Thread john walker
Hi! Here's another way you could do it: (defn say-hello ([names] (say-hello names #{})) ([names saluted] (reduce (fn [saluted name] (if (saluted name) (do (println "Hello" name "!") (conj saluted name)) (do (println "W

Re: Help me make this fn better/prettier

2014-10-01 Thread john walker
Sorry, the if should be if-not. The gist is corrected. On Wednesday, October 1, 2014 5:20:28 PM UTC-7, john walker wrote: > > Hi! > > Here's another way you could do it: > > (defn say-hello > ([names] (say-hello names #{})) > ([names saluted] >

Re: Recursive codec/frames in gloss?

2014-10-10 Thread john walker
What information do you want after this is decoded? Do you want the sum of byte0 ... byten, as well as the actual payload? Do you also want the header-length? On Thursday, October 9, 2014 11:34:59 PM UTC-7, Ken Restivo wrote: > > I'm playing around with Gloss, trying to decode a packet, part of

Re: CCW bug [SEVERE]

2014-10-26 Thread john walker
All of those are google pages, so you don't have to create another username or password combination. On Saturday, October 25, 2014 11:19:12 PM UTC-7, Fluid Dynamics wrote: > > On Sunday, October 26, 2014 2:07:16 AM UTC-4, David Della Costa wrote: >> >> Here's the counterclockwise project home pag

Re: better way to group consecutive numbers in a vector?

2014-11-06 Thread john walker
Hi John, As miner mentioned, peek is preferable to last for vectors. Here is an implementation based on the observation that consecutive increasing numbers are equivalent when you subtract their indices. Maybe it is more clever than simple. (ns experimental-clojure.congeal-consecutives) (def

Re: [ANN] Suricatta: 0.1.0-alpha - high level sql toolkit for clojure (backed by jooq)

2014-11-06 Thread john walker
Cool! I can see myself using this in an upcoming project. Thanks as usual for your work :) On Thursday, November 6, 2014 9:23:53 AM UTC-8, Andrey Antukh wrote: > > Hello everybody. > > I wanted to announce the first alpha release of suricatta, a high level > sql toolkit for clojure (backed by fa

Re: core.typed and cider

2015-09-25 Thread john walker
Hello, Have you given typed-clojure-mode a shot? If there are any issues, post on the github page and I'll address them. There are similar modes for vim and light table. https://github.com/typedclojure/typed-clojure-mode John On Thursday, September 24, 2015 at 1:36:07 PM UTC-7, JvJ wrote: >

Re: [ANN]: Buddy 0.1.0-beta3: Authentication, Authorization & Signing library for Clojure.

2014-02-09 Thread john walker
I love the documentation. Thanks for building this. On Sunday, February 9, 2014 11:54:59 AM UTC-5, Andrey Antukh wrote: > > Hi! > > Buddy is an authentication, authorization and signing library for clojure, > designed with simplicity in mind. > > Features / Sub libraries: > * Modular Authenticati

Re: a couple questions about counting frequencies of words in a text file

2014-02-10 Thread john walker
Well, I took a peek at the source for frequencies. It definitely forces evaluation, since it's done in terms of reduce. I don't think that it actually keeps the entire file in memory. Are you getting out of memory errors with large files? I like how you did this. Actually, the python you sugge

Re: a couple questions about counting frequencies of words in a text file

2014-02-10 Thread john walker
Neat blog by the way. On Monday, February 10, 2014 8:41:51 PM UTC-5, Rob Buhler wrote: > > Hi, > > I'm learning Clojure and I wrote a word-frequencies function that relies > heavily on clojure.core/frequencies (plus a little filtering) > > (ns topwords.core > (require [clojure.java.io :as io] >

Re: a couple questions about counting frequencies of words in a text file

2014-02-11 Thread john walker
No problem. If you haven't already, look at the frequencies implementation, since it's fairly instructive. On Tuesday, February 11, 2014 5:55:15 AM UTC-5, Rob Buhler wrote: > > I did need a doall in my function at one point, but later (must have been > when I moved frequencies in) I removed it a

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-11 Thread john walker
I'm still on my first cup, so let me know what you think: https://github.com/johnwalker/typed-clojure-el On Tuesday, February 11, 2014 12:01:36 PM UTC-5, Ambrose Bonnaire-Sergeant wrote: > > Hi, > > I need a relatively straightforward Emacs plugin for Typed Clojure written. > > I'm offering a $2

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread john walker
; namespace. If the var is > referred into the current ns-map, then use the fully qualified namespace > or a namespace alias prefix > if available. > > Thanks, > Ambrose > > > On Wed, Feb 12, 2014 at 3:18 PM, john walker > > > wrote: > >> I'm st

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread john walker
ocumentation note of this quirk. > > Thanks, > Ambrose > > > On Wed, Feb 12, 2014 at 4:03 PM, john walker > > > wrote: > >> Ahh, this turned out to be fairly interesting. My first thought was to >> check the aliases using (ns-alias), but it turns o

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread john walker
*" nil t) then recompile your clojure-mode.el. This probably will not exist after the February 1st snapshot. Source: https://github.com/clojure-emacs/clojure-mode/commit/32feee877233a4d98fb934dcbd42789e56dac790 On Wednesday, February 12, 2014 3:24:12 AM UTC-5, john walker wrote: > > Add

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread john walker
're ready please claim the bounty. > > Thanks, > Ambrose > > On Wed, Feb 12, 2014 at 4:46 PM, john walker > > > wrote: > >> Well, that was easy to find. It will be fixed in the next version of >> clojure mode. If you are impatient, do >> &

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread john walker
Thanks Alex, I've added this. On Wednesday, February 12, 2014 10:39:49 AM UTC-5, Alex Ott wrote: > > Hi John > > it would be nice to add the > > ;;;###autoload > > cookie for minor-mode definition... > > > > On Wed, Feb 12, 2014 at 4:32 PM, john walker &

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread john walker
mind for GSoC? Perhaps more Typed Clojure > work? > > Thanks, > Ambrose > > On Wed, Feb 12, 2014 at 11:32 PM, john walker > > > wrote: > >> OK, thanks! I realigned the repository name / filename / modename to be >> both more correct and compliant

Re: Any elegant solutions for this problem?

2013-12-01 Thread john walker
Sorry, I spoke without seeing that you were aware of partition-by. Here's one that isn't vectorized. (def v ["foo" 1 "bar" 10 20 "clown" 5]) (->> v (partition-by string?) (partition 2) (map #(apply concat %))) On Sunday, December 1, 2013 2:10:04 PM UTC-5, Ben wrote: > > user=> (def v

Re: Any elegant solutions for this problem?

2013-12-01 Thread john walker
Use partition-by http://clojuredocs.org/clojure_core/clojure.core/partition-by On Sunday, December 1, 2013 1:57:52 PM UTC-5, Ryan wrote: > > Hi all, > > I have a vector which contains an unknown number of repetitions of the > following pattern: > > String, followed by 1 or more integers > > For

Re: Any elegant solutions for this problem?

2013-12-01 Thread john walker
(for [y (rest %)] [x y]))) (reduce into [])) On Sunday, December 1, 2013 2:21:14 PM UTC-5, john walker wrote: > > Sorry, I spoke without seeing that you were aware of partition-by. Here's > one that isn't vectorized. > > (def v ["foo"

Re: Is Clojure right for me?

2013-12-26 Thread john walker
clojurekoans.com uses Joodo. https://github.com/slagyr/joodo What are some other cool sites powered by Clojure? On Wednesday, December 25, 2013 4:06:20 PM UTC-5, Massimiliano Tomassoli wrote: > > Hi, > I'm not sure if Clojure is the right language for me. I'd like to use > Clojure mainly for w

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-27 Thread john walker
I posted this in response to the original gist, but it probably wasn't seen. Does this demonstrate the behavior you want? https://gist.github.com/johnwalker/8142143 On Friday, December 27, 2013 1:08:49 PM UTC-5, puzzler wrote: > > I ended up accidentally injecting a completely different thread

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-27 Thread john walker
of thing because: > 1. The implementations of the functions are too long to implement inline > in the record definition. > 2. Protocols are significantly more restricted than regular functions > (e.g., aren't they restricted to 4 parameters, no indefinite arities, and > no destruct

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-27 Thread john walker
This works (clever hack!), but you would have to reduplicate the keys in (defn bar [..]...), (defn baz [...] ...) etc. On Friday, December 27, 2013 3:05:24 PM UTC-5, Cedric Greevey wrote: > > On Fri, Dec 27, 2013 at 2:32 PM, Mark Engelberg > > > wrote: > >> On Fri, Dec 27, 2013 at 10:27 AM, Ced

Re: Is Clojure right for me?

2013-12-27 Thread john walker
Err, a lot of these questions are quite open in nature. I don't think anyone in software engineering has great answers - see "Everything is an Object" for Javaland and then some of the proposals in Doug Hoyte's Let Over Lambda (an excellent read if you're after Common Lisp books and recognize t

Re: Sorting Nested Vectors and filter out some

2014-01-03 Thread john walker
You can do something like this. https://gist.github.com/johnwalker/8243534 On Friday, January 3, 2014 12:37:07 PM UTC-5, Jeff Angle wrote: > > Hi guys! this has made me pull quite a load of hair new to clojure.. > > have a nested vector say [[salt 0 0 %deviation 0&0] [sugar 5 10 > %deviatio

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-05 Thread john walker
If boot time is your primary concern, this can help. The jvm is still there, though :/ https://github.com/technomancy/grenchman On Saturday, January 4, 2014 9:43:22 AM UTC-5, g vim wrote: > > I have recently moved most of my work to Clojure and Clojurescript but > neither of these implementat

Re: Clojure development & laptop battery usage

2014-01-19 Thread john walker
The JVM hasn't been receiving the love it deserves lately! Fortunately, percent memory usage isn't going to have any effect on battery life until you hit swap. The resources you should consider are just activity on the cpu/gpu/disk. So yeah, it's light table. It's not its fault for being releas

Re: cljs / format

2014-01-19 Thread john walker
Kind of ..? Based off the discussion, it's probably better not to, but the closure library provides an implementation that's trivial to wrap (accepting the problems). Discussion: http://dev.clojure.org/jira/browse/CLJS-324 Example: https://www.refheap.com/19693 On Monday, January 20, 2014 1:3

Re: [ANN] play-clj, a game library

2014-01-20 Thread john walker
Is there any chance of support for javascript/webgl? On Monday, January 20, 2014 10:31:50 AM UTC-5, Zach Oakes wrote: > > Today I'm releasing play-clj , a > Clojure wrapper for LibGDX that allows you to write games for desktop OSes, > Android, and iOS from the

Re: semantics of >! on closed channels

2014-01-23 Thread john walker
This is a common windows problem. On Thursday, January 23, 2014 9:17:09 PM UTC-5, Cedric Greevey wrote: > > [meta, but about something apparently triggered by the message, from this > thread, that I'm quoting] > > Why did reading this post cause gmail to go bonkers? I saw this thread had > new a

Re: ANN: Om 0.3.0

2014-01-25 Thread john walker
I'm getting the deref error, but the first example failed as expected in 0.3.0. On Saturday, January 25, 2014 2:51:08 PM UTC-5, David Pidcock wrote: > > I was following along with this and hit an interesting "bug" > > The contact list delete button actually works "out of the gate" in the > firs

Re: ANN: Om 0.3.0

2014-01-25 Thread john walker
This is what I did (using the om-start template.) On Saturday, January 25, 2014 5:51:06 PM UTC-5, David Nolen wrote: > > I cannot replicate this. If somebody wants to publish a repo that exhibits > the problem I'll take a look. Thanks. > > > On Sat, Jan 25, 2014 at 5:12 PM, Rudi Engelbrecht > >

Re: ANN: Om 0.3.0

2014-01-25 Thread john walker
Woops, left it off: https://github.com/johnwalker/hellom On Saturday, January 25, 2014 6:15:59 PM UTC-5, john walker wrote: > > This is what I did (using the om-start template.) > > On Saturday, January 25, 2014 5:51:06 PM UTC-5, David Nolen wrote: >> >> I cannot rep

Re: ANN: Om 0.3.0

2014-01-25 Thread john walker
The one on master is using 0.2.3. Checkout the 0.3.0 branch for the same results. On Saturday, January 25, 2014 6:17:32 PM UTC-5, David Nolen wrote: > > That project.clj is using Om 0.2.3 and not Om 0.3.0. > > > On Sat, Jan 25, 2014 at 6:16 PM, john walker > > > wrote:

Re: ANN: Om 0.3.0

2014-01-25 Thread john walker
would want to use. > > HTH. > > > On Sat, Jan 25, 2014 at 6:40 PM, john walker > > > wrote: > >> The one on master is using 0.2.3. Checkout the 0.3.0 branch for the same >> results. >> >> >> On Saturday, January 25, 2014 6:17:32 PM UTC-5,

Re: Web App structure on server?

2014-01-26 Thread john walker
I spent some time yesterday with node webkit and clojurescript. There's not really much to it. There's a :target :nodejs that you can hand off to leiningen, but I don't really know what it's for (and no one else seems to either). Make sure that when you inspect the resultant javascript source t

Re: mimic erlang in core.async

2014-01-28 Thread john walker
This doesn't answer your question, but you might find it interesting if you search for actors on it: https://github.com/halgari/clojure-conj-2013-core.async-examples/blob/master/src/clojure_conj_talk/core.clj On Tuesday, January 28, 2014 6:43:19 PM UTC-5, t x wrote: > > Hi, > > With apologies

Re: mimic erlang in core.async

2014-01-28 Thread john walker
No problem, I'm glad you also think it is cool :) On Tuesday, January 28, 2014 6:54:22 PM UTC-5, t x wrote: > > Hi John, > > This is great. I really like "minimal examples" to hack on / play with. > > Thanks! > > On Tue, Jan 28, 2014 at 3:46 PM, john