CIDER: function definition is void: nrepl-current-connection-buffer

2016-09-29 Thread fahptv
How do I inspect and resolve the following? (Thanks in advance for any help) I did M-x cider-jack-in-clojurescript with CIDER from MELPA stable as well as MELPA and got the same result. I was thinking perhaps I have inconsistent versions of things, or perhaps I have something that's out-dated.

Re: Using a function to def other functions?

2016-08-08 Thread fahptv
Ah, are you saying the binding isn't taking place at the top level because I had to call 'bar' to get the right hand side (so to speak) of the binding? And if 'bar' were a macro instead, then it would be expanded first and then nothing would have to be evaluated before binding to 'foo', and so i

Re: Using a function to def other functions?

2016-08-08 Thread fahptv
Oh... 'bar' and 'make-step' count as macros? My intent was that they're ordinary functions that return functions. Am I mistaken? Or does the issue you referred to apply to using defining *functions and macros *as non-top-level forms? (defn bar [] (fn ([x] (inc x (defn make-step [some-arg

Using a function to def other functions?

2016-08-08 Thread fahptv
user> (macroexpand-1 '(defn foo [x] (inc x))) (def foo (clojure.core/fn ([x] (inc x If defn is just a macro, then it seems I can do this: user> (defn bar [] (fn ([x] (inc x #'user/bar user> (def foo (bar)) #'user/foo user> foo #function[user/bar/fn--10778] But the result is a little di

Debugging idea for a constrained situation

2016-01-21 Thread fahptv
While not strictly Clojure-related, I thought I'd share this idea with you here because (1) I came up with it while thinking about design from a Clojure / functional point of view and (2) I respect your opinion. It's very likely you'll have better ideas... *I'm in an highly constrained situatio

Re: Questions about channels

2016-01-06 Thread fahptv
Ah, I perhaps should be using node's spawnSync instead. But I'm still interested in what you think because perhaps in the future I might want to write a synchronous wrapper for some other js library which doesn't provide a sync alternative out of the box. On Wednesday, January 6, 2016 at 1:48:1

Questions about channels

2016-01-06 Thread fahptv
I'm using ClojureScript and nodejs and I'd like to spawn a child process and deal with the result (stderr, stdout, exit code). Here's a short gist showing an approach that spawns the process and routes all output to a channel. My go

boot-cljs-test: why is my test not included when tests are run?

2015-12-29 Thread fahptv
Hello again git clone https://github.com/frankhenderson/boot-cljs-test-question install boot run: boot auto-test Why does it say there are 0 tests instead of 1? Thanks in advance! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr

lein cljsbuild once works, but another build method doesn't -- ?

2015-12-28 Thread fahptv
hi I have a ClojureScript project. It builds successfully with lein cljsbuild once and I'm able to run my program on node. I'm trying to follow the QuickStart guide for getting a node REPL. I have node.clj (require 'cljs.build.api) (cljs.build.api/build "src" {:main 'hello-world.core :out

ClojureScript compiler says "No such namespace" ?

2015-12-23 Thread fahptv
Noob question -- what am I doing wrong? 1. lein new mies hello-world ...builds fine 2. add the following to project.clj's dependencies, lein deps, builds fine 1. [com.andrewmcveigh/cljs-time "0.3.14"] 3. add the following to src/hello_world

how to signal failure to start in Stuart Sierra's Component lib?

2015-12-23 Thread fahptv
If a component discovers it cannot start successfully (e.g. some necessary bit of data is badly formatted), how can it tell the system that it's hosed and therefore all dependents are hosed? Should it throw an exception to stop everything? -- You received this message because you are subscribe

socket REPL and OTA patching?

2015-12-08 Thread fahptv
Will the following be possible with Clojure 1.8's socket REPL? When a user reports an error we 1. connect securely and debug the issue on the user's running instance 2. redefine one or more things inside that instance to fix the bug 3. tell the instance to persist a new jar of bytec

ClojureScript vs Clojure: which differences matter in your experience?

2015-12-03 Thread fahptv
I've read https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure and I'm wondering what differences you've found that truly matter to you? Are there cases where you regret you have to use ClojureScript and can't use Clojure itself? All I have (given my limited experience) are g

Re: channels 1:1, callbacks many:many ?

2015-11-25 Thread fahptv
Thanks for all the replies so far. You're right, there is state involved. My situation is this: 1. there are several different kinds of triggers (like phone, doorbell, email, SMS) 2. there are business rules about who should answer and what they should do in response (Bob vs Jane an

Re: channels 1:1, callbacks many:many ?

2015-11-25 Thread fahptv
by the way, the existing code base was created by other people, not me On Wednesday, November 25, 2015 at 9:40:11 AM UTC-8, fah...@gmail.com wrote: > > Thanks for all the replies so far. You're right, there is state involved. > My situation is this: > >1. there are several different kinds of

channels 1:1, callbacks many:many ?

2015-11-24 Thread fahptv
Hello friends, I've read several blog posts about channels but must admit I feel there's something basic that I'm not yet getting... We're supposed to be able to avoid callback hell by using channels. But callbacks can be many-to-many (a single function can be registered as the callback for m