Re: clojurescript, sourcemaps, and debugging info

2014-05-18 Thread Thomas Heller
Don't think plugins can touch the devtools. I tend to organize my code that the public interface of foo reside in foo.cljs and the implementation details go into foo/something.cljs so in your case you'd get foo.cljs foo/whatever.cljs bar.cljs bar/stuff.cljs Maybe an alternative solution to

[ANN] Quil 2.0.0 released

2014-05-18 Thread Nikita Beloglazov
Happy to announce release of Quil 2.0.0! To use Quil 2.0.0 update project.clj to following: :dependencies [... [quil 2.0.0]] Major change is that Quil now uses latest Processing 2.2.0. Check release notes https://github.com/quil/quil/blob/master/RELEASE-NOTES.md for list of all

Non-blocking file I/O Clojure library?

2014-05-18 Thread Mike Fikes
Does anyone know of any libraries for Clojure that wrap up non-blocking file I/O? I'm interested in one suitable for use with core.async on Java 7+. Below is a naïve stab at a function that reads file and returns it on a channel. It blocks somewhat (in the open and length calls), but overall,

Re: [ANN] ring-auth middleware for protecting sessions

2014-05-18 Thread Brendan Younger
On Saturday, May 17, 2014 9:03:01 PM UTC-4, James Reeves wrote: On 18 May 2014 00:09, Brendan Younger brendan...@gmail.com javascript:wrote: For anyone else following along at home, I'll just re-iterate the benefits of using ring-auth versus trying to write your routes *just right* to

Re: clojurescript, sourcemaps, and debugging info

2014-05-18 Thread Timothy Baldridge
foo.cljs foo/whatever.cljs bar.cljs bar/stuff.cljs yes, do this, it also matches what most of the Clojure community does. On Sun, May 18, 2014 at 4:16 AM, Thomas Heller th.hel...@gmail.com wrote: Don't think plugins can touch the devtools. I tend to organize my code that the public

Re: [ANN] ring-auth middleware for protecting sessions

2014-05-18 Thread James Reeves
I don't want to seem like I'm badgering you. You have a lot of sound ideas. But I don't think we should be trying to work around insecure designs; we should be making it easier for people to design things securely. In terms of *specific* things wrong that I've yet to mention: the middleware you

Re: clojurescript, sourcemaps, and debugging info

2014-05-18 Thread t x
On Sun, May 18, 2014 at 7:25 AM, Timothy Baldridge tbaldri...@gmail.com wrote: foo.cljs foo/whatever.cljs bar.cljs bar/stuff.cljs yes, do this, it also matches what most of the Clojure community does. I'm convinced. Using this style now. On Sun, May 18, 2014 at 4:16 AM, Thomas Heller

Cljs and core.async issue

2014-05-18 Thread Joseph Rollins
I'm having some trouble with what should be a trivial application of core.async and cljs-http. I have tried to debug it, but I don't have a great setup for properly debugging. Also, debugging core.async channels is well above my current ability. I've whittled the code down to the least common

Re: [ANN] Quil 2.0.0 released

2014-05-18 Thread Dylan Butman
Great news! Thanks Nikita! On Sunday, May 18, 2014 6:59:00 AM UTC-4, Nikita Beloglazov wrote: Happy to announce release of Quil 2.0.0! To use Quil 2.0.0 update project.clj to following: :dependencies [... [quil 2.0.0]] Major change is that Quil now uses latest Processing

Re-evaluating recuring go blocks

2014-05-18 Thread Dylan Butman
When working with channels and go blocks with nRepl, I often want to do something like this. (def events (event-generator)) (go-loop [] (when-let [event (! events)] (handle-event event) (recur))) Sometime later I want to stop listening, so I (close! events) This

Re: Cljs and core.async issue

2014-05-18 Thread Joseph Rollins
Managed to figure out the culprit with some help from IRC. I was attempting to use cljs-http 0.1.10 with clojurescript 0.0-2173 (for lighttable compat). By swapping to using 0.1.8 of cljs-http, it worked perfectly. I assumed that leiningen would alert me that I had dependency mismatches, but

Re: Cljs and core.async issue

2014-05-18 Thread Michael Breen
Hi Joseph. Good to hear that you figured out your issue. LightTable has actually fixed this issue and it is available in master. Best. Mike On May 18, 2014 4:15 PM, Joseph Rollins rollins.jos...@gmail.com wrote: Managed to figure out the culprit with some help from IRC. I was attempting to

Re: Cljs and core.async issue

2014-05-18 Thread Joseph Rollins
I'm glad to hear that the issue no longer remains. I will have to check out master. -Joseph On Sunday, May 18, 2014 4:32:51 PM UTC-4, Michael Breen wrote: Hi Joseph. Good to hear that you figured out your issue. LightTable has actually fixed this issue and it is available in master.

Re: Re-evaluating recuring go blocks

2014-05-18 Thread Herwig Hochleitner
I always pass a control-channel into go loops, by which I can close it: (defn looper [event-ch ctl-ch] (go-loop [] (alt! event-ch ([event _] (handle-event event) (recur)) ctl-ch ([msg _] (assert (nil? msg)) This also makes it easy to funnel more control events then just

Re: Looking for help with a Stack Overflow error

2014-05-18 Thread Leif
Hi, Brad (and Karsten). I solved the problem with core.logic, to try out its CLP(FD) features. It took about 220-230ms to find a solution. It took about 400ms to find all solutions. Here it is for you to peek at after you try it: https://gist.github.com/leifp/b4af5f4cd7289c38b55a The code

SQL Korma namespace problem

2014-05-18 Thread gvim
I'm using SQL Korma inside a Luminus project: (ns lum.models.db (:require [korma.db :refer :all] [clojure.string :as str])) (defdb dev (postgres {:db lum :user secret :password secret :host localhost}))

Re: Looking for help with a Stack Overflow error

2014-05-18 Thread Brad Kurtz
I've seen David Nolen talk a bit about core.logic and I admit it seems interesting. Since I'm new to Clojure I didn't think to look into it. I'll take a look at your solution Leif. Thanks for the suggestions everyone. On Sunday, May 18, 2014 6:28:15 PM UTC-5, Leif wrote: Hi, Brad (and

Re: Re-evaluating recuring go blocks

2014-05-18 Thread Timothy Baldridge
Also, go blocks that are waiting on channels that are garbage collected will be garbage collected themselves. This means I often just re-compile an entire namespace, this redefines the channel, re-binds the def the channel is attached to, and recreates all gos. The channel is now free go be GC'd