Re: Why is next.jdbc using my IP address?

2022-03-03 Thread Kevin Downey
That is a message from MySQL, not next.jdbc. MySQL allows you to grant permissions to a user base on the host they are connecting from so permission denied kinds of errors include the username and the host the users connection came from. On Thu, Mar 3, 2022, 11:18 Lawrence Krubner wrote: > I ju

Re: [JOB] Clojure Developer for smart lighting IoT platform

2018-02-06 Thread Kevin
Note that this is position is located in San Jose, CA. -- 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 po

[JOB] Clojure Developer for smart lighting IoT platform

2018-02-05 Thread Kevin
*Clojure Developer* Work with highly scaling back-end smart lighting IoT platform. The group is a startup purchased by a large corporation (6-12+ contract through HCL), so you get the best of both worlds. Must Have: -- 1 to 3 years hands, production on experience in Clojure or another

Clojure JD in San Jose, CA

2018-01-25 Thread Kevin
Must Have: -- 1 to 3 years hands, production on experience in Clojure or another Lisp based language Strong functional programming background Minimum 1 year experience in Java Hands on experience with leiningen and git Hands on experience in API Experience in Scrum and CI Nice to have

Re: Why is Clojure slow? (fibonacci)

2017-08-13 Thread Kevin Baldor
You could also memoize. Sent from my iPad > On Aug 13, 2017, at 7:27 AM, James Reeves wrote: > > With type hints your implementation should run faster: > > (defn fib ^long [^long n] > (if (< n 2) > n > (+ (fib (- n 2)) (fib (- n 1) > > What does your Java code look like? Is it a

Unnamed Types - What Am I Doing Wrong?

2017-07-25 Thread Kevin Kleinfelter
I ran into the 'refactoring an unnamed type' problem. I'd like to know how experienced Clojurists avoid it. I've got an account record/structure. It has things like an account name, account number, etc. I started off storing it in a vector, because it had just two elements. Account name was

Re: Leiningen template for pure Clojure/ClojureScript project ?

2017-07-25 Thread Kevin Baldor
I haven't used Clojurescript, so I can't address that part of your question. For the Clojure part, you can execute the contents of a file with java -cp clojure.jar clojure.main file.clj On Tue, Jul 25, 2017 at 9:09 AM, Khalid Jebbari wrote: > Hello, does anyone know a Leiningen template th

Control Break in Report

2017-07-15 Thread Kevin Kleinfelter
How does one detect a change in a doseq? I'm trying to do what data processing people would call a control break in a report. I'm printing account + fund names. My data is sorted by account, so each row has a new fund, and accounts change less frequently. I'd like to print a separator line

Re: Modern opengl bindings in clojure

2017-07-14 Thread Kevin Baldor
I see that it's uploaded to clojars so it might be a bit late to ask, but what is the convention on naming libraries like this? I'm used to seeing something like clj-gl for libraries that provide a Clojure wrapper around an existing library. Regardless, this is awesome and I hope to play with it

Re: Clojure <--> LISP

2017-07-10 Thread Kevin Baldor
And for good and ill, being hosted means that some of the semantics are affected by the host language. There is a discussion of differences between Clojure and Clojurescript here https://www.clojurescript.org/about/differences and I'm sure there's a similar set for differences between Clojure on th

Re: core.async/close! locks on chans with pending transforms

2017-07-03 Thread Kevin Downey
On 07/03/2017 03:12 PM, Vitalie Spinu wrote: On Monday, 3 July 2017 22:48:40 UTC+2, red...@gmail.com wrote: Discussion of locks aside, doing blocking operations like io or !! or basically anything that looks like it blocks and isn't >! or Is this the limitation in general or only whe

Re: core.async/close! locks on chans with pending transforms

2017-07-03 Thread Kevin Downey
On 07/03/2017 11:03 AM, Vitalie Spinu wrote: Hi, Async/close! causes deadlocks if its reducer is stalled (e.g. waits for an event from another chan). Consider: (let [d (chan) s (chan 1 (map (fn [v] (println "this:" v) (printl

Re: error in nrepl

2017-06-23 Thread Kevin Baldor
e I can find some time to upgrade my whole Emacs setup next > weekend. It is a bit out of date. > > I'm curious if folks think it is easier to work with Emacs on a Linux > machine, or on a Mac? > > > > On Friday, June 23, 2017 at 5:39:42 PM UTC-4, Kevin B

Re: error in nrepl

2017-06-23 Thread Kevin Baldor
Have you tried following the instructions at http://www.braveclojure.com/basic-emacs/ ? It's a bit heavy-handed (replacing your entire .emacs directory), but it might give you a starting point to figure out how to integrate it into your emacs setup. On Fri, Jun 23, 2017 at 4:36 PM, wrote: > > Y

Re: Spec without global registry?

2017-06-12 Thread Kevin Baldor
I'm interested in the answer to whether it is just an accident of implementation or if there is some compelling reason for the global registry. I'm still new to Clojure and it would be good to hear the tradeoffs and design process that led to the current implementation. On Mon, Jun 12, 2017 at 1

testing println in clojure.test

2017-05-30 Thread Kevin Kleinfelter
I've got a function which is supposed to println a computed value. How do I test whether it printed that value, when using clojure.test? Or, another way of asking the same question is how do I grab the output from println when testing a function with clojure.test? TIA -- You received this me

Let and For Doesn't Execute - Where Is My Misunderstanding?

2017-05-17 Thread Kevin Kleinfelter
I'm stumped by the behavior of the following code fragment. Can someone help me understand what's happening? *This code*: (println "Holding:" (:class holding)) (let [t (:class holding)] (for [x t] (println "here" x)) (for [x t] (println "there" x *Produces this output*: hold

Functional Pattern to Replace Temp Var

2017-05-13 Thread Kevin Kleinfelter
How would one convert the following procedural logic into functional/Clojure? x = expensive-calculation return (f1(x), f2(x), f3(x)) I'm sure I could force it by using a var to save the intermediate value, but that's still procedural. It seems like the pattern of reusing an expensive r

class and case

2017-05-12 Thread Kevin Kleinfelter
Can someone help me get un-stuck with a problem of using class in a case? This returns true, as I expect: (= (type "x") java.lang.String) This returns an error, and I'd hoped it would print STRING: (case (type "x") class java.lang.String (println "STRING") class java.lang.Long (println "NUM"))

Re: Contract Clojure Developer Position (Mandarin Fluency) in Santa Clara, CA

2017-05-12 Thread Kevin
If you are interested, you can reply to me at kevin.degraaf at huawei.com as well as here... -- 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

Contract Clojure Developer Position (Mandarin Fluency) in Santa Clara, CA

2017-05-11 Thread Kevin
Distributed System/Clojure Senior/Staff Software Engineer (Contract to possible hire) The main requirement for this position is strong experience with Clojure and Java on Linux. Must be fluent in Mandarin for technical communication (written and verbal). May consider limited Clojure experience

def with function call - how often executed?

2017-05-11 Thread Kevin Kleinfelter
If I write a def with a function call, such as: (def x (+ 1 2)) and I use x a gazillion times in my code, does Clojure execute the function ("+" in this case) on each use? Clearly, with (+ 1 2) it doesn't really matter, but if it is an expensive function such as reading a file it is a big de

Incomplete With Destructuring Lists

2017-05-10 Thread Kevin Kleinfelter
Can I destructure a list, assigning the first and last few items individually, while putting several items from the middle into a list? I see that I can assign a list: (let [a '( 1 2 3 4)] ...) I can destructure the list as a whole: (let [[a b c d] '(1 2 3 4)] ...) I can destructure the lis

Re: Leiningen, AOT compilation, and classloaders

2017-03-15 Thread Kevin Downey
On 03/07/2017 09:07 PM, 'Tianxiang Xiong' via Clojure wrote: > I recently ran into an issue with AOT compilation that I'd like to > understand better. A minimal working example (MWE) can be found here > . > > Basically, using `:aot :all` in `project

Re: Error in main using Stuart Sierra's Component when deploying to Heroku

2017-03-13 Thread Kevin Downey
On 03/13/2017 09:38 AM, 'Rickesh Bedia' via Clojure wrote: > I am trying to start my clojure application on my heroku dyno but I keep > getting and error in my stuartsierra.component/start. > > Below is my core file containing my main function. > > (defrecord Listener [listener] > component/Lif

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Kevin Corcoran
On Mon, Mar 6, 2017 at 11:56 PM, JokkeB wrote: > After adding this, I still can't see an exception before the app dies. > I've encountered this before when the Linux "OOM killer" kicks in, which is especially likely if you are running your application on a resource-constrained system (say, a VM

Re: loop macro generates a wrapping let

2017-03-06 Thread Kevin Downey
On 03/06/2017 03:28 PM, juan.facorro wrote: > While I was debugging some code I found something related to the *loop > *macro that I found curious. I'm probably missing something but here it > goes. > > The expression generated by the *loop* macro includes a wrapping *let > *when there is any de-s

Re: What makes Clojure Clojure?

2017-03-05 Thread Kevin Baldor
I feel like it should be obvious, but what are the acronyms (initialisms?) clj and cljc? I'm assuming that cljs is ClojureScript. Sent from my iPhone > On Mar 4, 2017, at 6:46 PM, John Newman wrote: > > Yeah, only Rich can really answer that question, right? :) But for me, > Clojure is incre

Re: is it a bug in clojure? unchecked-multiply

2017-03-03 Thread Kevin Downey
On 03/03/2017 12:14 AM, BongHyeon. Jo wrote: > (unchecked-multiply 1000 1000) The default type clojure uses for integers is the jvm's long (or the boxed variant Long) type. Longs are signed 64bit numbers. 100 is outside the range of longs. `(* 1000 1

Re: how to send SSL certificate in POST request?

2017-02-24 Thread Kevin Corcoran
On Thu, Feb 23, 2017 at 5:11 PM, mascip wrote: > Amazing, thank you James, thank you Micheal, it works! > > In Perl things are often pretty complex, but in this specific case the > code is dead easy: > > my $client = REST::Client->new( > cert => '/path/to/ssl.cert', > key => '/path/to/ssl.key

Re: When did this start? java.lang.IllegalAccessError cond* does not exist nippy

2017-02-07 Thread Kevin Downey
definitely turn on https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L81 :pedantic? :abort and resolve the issues lein deps :tree shows you. given that you are aot compiling, but have implicit clean disabled, my guess is you compiled the project once using a version of some l

Re: Is there a standard name for this transducer? Or a more idiomatic way to do it?

2016-09-14 Thread Kevin Downey
looks like a variation of partition-by On 09/14/2016 07:16 PM, Marshall handheld Flax wrote: > This looks like a standard thing you might want to do with a transducer: > accept a stream of inputs and statefully group them into a stream of > varying-length vectors. A typical example might be to ac

Re: [ANN] Clojure 1.9.0-alpha11

2016-09-01 Thread Kevin Downey
instrument is going to have issues with any calling convention outisde of the normal deref var + invoking path. http://dev.clojure.org/jira/browse/CLJ-1941 is a similar case with some discussion in the comments. On 09/01/2016 11:33 AM, Ambrose Bonnaire-Sergeant wrote: > Hi, > > There seems to be

Re: Why is this not considered to be in a go block?

2016-08-25 Thread Kevin Downey
The analysis for the go macro to determine that the fn never escapes the go block is not something core.async does. Because of that functions are sort of a black box to the transforms the go macro does. http://dev.clojure.org/jira/browse/ASYNC-93 is a declined issue regarding this. http://dev.cloj

Re: clojure.spec & protocol fn

2016-06-05 Thread Kevin Downey
http://dev.clojure.org/jira/browse/CLJ-1941 has some discussion about places where instrumenting won't work. On 06/05/2016 09:57 AM, Claudius Nicolae wrote: > It seems that protocol fns don't participate in s/fdef specfications. It > would be nice they were. Sample: > > (ns sample > (:r

Re: clojure.spec

2016-05-25 Thread Kevin Corcoran
Would it be a reasonable feature request to ask for Java classes to be implicitly converted to specs, the same as predicates? FWIW, plumatic/schema allows classes to be used as schemas. The spec guide contains this example: (import java.util.Date) (s/valid? #(instance? Date %) (Date.)) ;; true

Re: atoms not working same in cljs as in clj?

2016-05-20 Thread Kevin Downey
This is a difference in the type function. The clojurescript type function ignores metadata. So the clojurescript type function is like the clojure class function, and clojurescript doesn't have a class function. On 05/20/2016 09:22 AM, hiskennyness wrote: > I see here > https://github.com/clojure

Re: :default catch blocks with core.async and clojurescript

2016-05-16 Thread Kevin Downey
On 05/15/2016 06:39 PM, Kevin Downey wrote: > On 05/14/2016 09:31 PM, cameron wrote: >> I'm having an issue where :default catch blocks are not working in >> clojurescript when in a go block. >> >> The following code prints "a str" as expected: &

Re: :default catch blocks with core.async and clojurescript

2016-05-15 Thread Kevin Downey
On 05/14/2016 09:31 PM, cameron wrote: > I'm having an issue where :default catch blocks are not working in > clojurescript when in a go block. > > The following code prints "a str" as expected: > > (prn (try >(throw "a str") >(catch :default e e ))) > > The same code in

Re: Strange exception: Cannot cast to compile stub??

2016-05-09 Thread Kevin Downey
There is a jira issue http://dev.clojure.org/jira/browse/CLJ-1226 and it looks like it is marked as fixed in 1.8 On 05/09/2016 01:10 AM, Kevin Downey wrote: > If I recall correctly, looking at the code at around line 483, I think I > have seen that error arise when using (set! (.fieldNam

Re: Strange exception: Cannot cast to compile stub??

2016-05-09 Thread Kevin Downey
If I recall correctly, looking at the code at around line 483, I think I have seen that error arise when using (set! (.fieldName this-reference) value) inside defrecord and deftype bodies. if you use (set! fieldName value) syntax you might be fine. On 05/08/2016 07:21 PM, JvJ wrote: > I'm implemen

Re: Possible bug with (keys some-container) in a try-catch?

2016-04-22 Thread Kevin Downey
keys is lazy, you see the exception at the repl because printing out the result forces the sequence, but if you don't do anything with the result then it isn't forced, so no errors. On 04/22/2016 01:28 PM, Steve Riley wrote: > I am trying to determine if a container, x, passed to a function, is a

Re: [core.logic] What's the difference between "q" and a fresh LVar? Or: "java.lang.ClassCastException: clojure.core.logic.LVar cannot be cast to java.lang.Number"

2016-04-09 Thread Kevin Downey
Check 'lein deps :tree' for conflicting core.logic versions, and delete the target directory to make sure you don't have old classfiles sitting around. On 04/09/2016 04:47 AM, Daniel Ziltener wrote: > Oops, yes, in my actual code it was both ":db/id", so that's not the > issue. It's really confusi

Re: Attempt At Futures

2016-04-08 Thread Kevin Downey
The thing to remember is map is lazy, so you are lazily (on demand) creating a bunch of futures. Then doseq walks through those futures, demanding one at a time. You deref the future immediately after doseq requested it from the lazy-seq and are blocking on its completion then doseq can move on to

Re: [core.logic] What's the difference between "q" and a fresh LVar? Or: "java.lang.ClassCastException: clojure.core.logic.LVar cannot be cast to java.lang.Number"

2016-04-08 Thread Kevin Downey
Hard to say, the class cast exception will have more information in it that could cast light on the issue. You also are using :id in one variation, and :db/id in the other. On 04/08/2016 05:46 PM, Daniel Ziltener wrote: > Hi clj, > > I'm trying to do some simple core.logic stuff. My input is a ve

Re: Webassembly as a Clojure target platform

2016-04-04 Thread Kevin Downey
I recommend reading up on WebAssembly, a good place to start might be https://github.com/WebAssembly/design/blob/master/FAQ.md#is-webassembly-only-for-cc-programmers/ In those three paragraphs, it is pretty clear that, at least as it stands now, wasm is much closer semantically to actual asm than

Re: Nesting semantics for the thread last operator

2016-03-19 Thread Kevin Downey
They are a logical consequence of the machine. ->> is a mechanical transformation taking a form (->> x (a ... w)) turning it into (a ... w x), and this same mechanical transformation is in place when nested. You example expands in steps like: (->> a b c (->> d e f)) (->> (b a) c (->> d e f)) (->>

Re: Strange problem with input stream starting clojure 1.7.0-alpha6

2016-03-07 Thread Kevin Downey
you can still structure you computation as a reduce, even if it is side effectful. (reduce (fn [sink record] (emit sink record) sink) sink source) There is also a function introduced in 1.7 called "run!" which is for processing a collection using reduce for side effects. On 03/07/2016 04:49 PM,

Re: Strange problem with input stream starting clojure 1.7.0-alpha6

2016-03-07 Thread Kevin Downey
Hard to say, I can't think of a change that would directly change how the shaed code would work. The "ArchiveReader" type hint on "warc-value" seems to be incorrect, because it is used as a seq by "doseq". Assuming this is the correct ArchiveReader (http://crawler.archive.org/apidocs/org/archive/i

Re: #'lamina.core. - No implementation of method: :enqueue for class: nil

2016-03-06 Thread Kevin Downey
On 03/05/2016 10:18 PM, Nasko wrote: > I am trying to implement a simple asynchronous chat service using Aleph > and Lamina. However, it looks like the enqueue function coming from > lamina cannot be implemented and causes an exception. This is what my > chat function looks like: > | > (defn chat [

Re: Implementing Clojure

2016-03-01 Thread Kevin Downey
On 02/28/2016 10:40 AM, evins.mi...@gmail.com wrote: > > > On Sunday, February 28, 2016 at 4:13:23 AM UTC-6, puzzler wrote: > > Yes, unfortunately, Clojure doesn't have an actual spec. The lack > of a spec probably helps keep the language more "agile", but I know > several people wh

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Kevin Downey
On 02/24/2016 02:53 AM, Michael du Breuil wrote: > The following (this is interop with libgdx if anyone is curious, > hud-corner-top-left is a delayed TextureRegion > > (.draw batch ^TextureRegion @hud-corner-top-left >(float -199) >(float -32)) > > Which yields the follow

Re: (type ...) vs (class ...)

2016-02-12 Thread Kevin Downey
On 02/12/2016 01:47 PM, Kevin Downey wrote: > On 02/12/2016 01:37 PM, Alan Thompson wrote: >> Hey - Just saw something on the clojure.core/type function: >> >> >> >> (defn type >> "Returns the :type metadata of x, or its Class if none" >&

Re: (type ...) vs (class ...)

2016-02-12 Thread Kevin Downey
On 02/12/2016 01:37 PM, Alan Thompson wrote: > Hey - Just saw something on the clojure.core/type function: > > > > (defn type > "Returns the :type metadata of x, or its Class if none" > {:added "1.0" > :static true} > [x] > (or (get (meta x) :type) (class x))) > >

Re: top-level lets or private globals

2015-08-26 Thread Kevin Downey
On 8/25/15 12:06 AM, Kurt Sys wrote: > I'm refering to a few posts in an old thread: > https://groups.google.com/d/msg/clojure/r_ym-h53f1E/RzUdb5oYeX4J > > What really puzzles me is that it doesn't seem to be generally > regarded as idiomatic Clojure style to just use top-level (let)s for

Re: Reflection warnings in async/go-loop

2015-07-23 Thread Kevin Downey
Regardless of the outcome of the type issue, this code is doing blocking io inside a go block, which should be avoided. Consider using `thread` and `loop`, which would also likely work around the type hinting issue because it would avoid the state machine transform. The code already using the block

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Kevin Corcoran
Herwig, Thanks for the explanation! -- 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

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Kevin Corcoran
Hi Herwig,​ This looks nice, thanks for contributing. One question, though: The projects on which I work already use lein's :pedantic? flag. Is there any reason we might want to use lein-collisions instead of :pedantic? - Kevin -- You received this message because you are subscribed t

[RFC] Testing ClojureScript code with clojurescript.test and Karma

2015-02-10 Thread Kevin Bell
We at CircleCI have been running our clojurescript.test tests with Karma lately, with great results. Easy access to Chrome devtools for unit tests is great, and it provides great community plugins like junit-formatted xml output (which CircleCI understands). You can read about how it works in o

Re: snubbed on clojurescript one

2014-11-18 Thread Kevin Banjo
Is there anywhere where the different available options are compared, like in a table? -- 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 - plea

Re: snubbed on clojurescript one

2014-11-18 Thread Kevin Banjo
On Monday, November 17, 2014 11:28:34 PM UTC-8, David Della Costa wrote: > > Hi Kevin, my understanding is that ClojureScript One is not actively > maintained and pretty out of date at this point. You're probably better > suited to starting from a different place in the eco-

Re: snubbed on clojurescript one

2014-11-18 Thread Kevin Ilchmann Jørgensen
is also a very nice template. On Tue, Nov 18, 2014 at 8:28 AM, Dave Della Costa wrote: > Hi Kevin, my understanding is that ClojureScript One is not actively > maintained and pretty out of date at this point. You're probably better > suited to starting from a different place in

snubbed on clojurescript one

2014-11-17 Thread Kevin Banjo
Really excited to use clojurescript one but got shot down right out of the gate. Anyone here have the answer? https://github.com/brentonashworth/one/issues/145 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: Demoralising experience trying to install on Win 7

2014-10-25 Thread Kevin Ilchmann Jørgensen
at 12:03 AM, David Powell wrote: > oh, sorry, yeah, I meant curl :) > > > On Sat, Oct 25, 2014 at 11:00 PM, Kevin Ilchmann Jørgensen < > kijm...@gmail.com> wrote: > >> Hey David, >> >> Does it really provide wget? I got an curl here. >> >> /K

Re: Demoralising experience trying to install on Win 7

2014-10-25 Thread Kevin Ilchmann Jørgensen
Hey David, Does it really provide wget? I got an curl here. /Kevin On Sat, Oct 25, 2014 at 11:52 PM, David Powell wrote: > Hi, > > I wrote the leiningen installer for Windows. It was working. > It simply downloads lein.bat from Leinignen stable, and provides a working

Re: Demoralising experience trying to install on Win 7

2014-10-25 Thread Kevin Ilchmann Jørgensen
n.bat downloading by uncommenting the wget part out. One could try to move the curl part above wget also. Your lein.bat file might be in \Users\name\.lein\bin\lein.bat I'll create an issue on github. Thanks for noticing, good luck. /Kevin (mobile) On Oct 25, 2014 6:34 AM, "Geoff Caplan

Re: Clojure statechart / hierarchical FSM implementation

2014-09-07 Thread Kevin Lynagh
with Harel's notation before I consider releasing any code. If you end up exploring the space and want to discuss design/implementation issues re: statecharts, I'd be happy to discuss off-list. cheers, Kevin On Friday, September 5, 2014 12:13:43 AM UTC-7, Andre Van Der Merwe wrote: > >

Re: alter-var-root, what am I doing wrong?

2014-08-16 Thread Kevin webster
gt; x > nil > user=> (binding [x 2] (alter-var-root #'x (constantly 1)) x) > 2 > user=> x > 1 > user=> (binding [x 2] (set! x 3) x) > 3 > user=> x > 1 > > Nicola > > Kevin webster writes: > > > Can someone explain why this is n

alter-var-root, what am I doing wrong?

2014-08-16 Thread Kevin webster
Can someone explain why this is not altering the *data-readers* dynamic var? Does this work for anyone else? Using 1.6.0 (assert (= {} *data-readers*)) ;; nil (alter-var-root (var *data-readers*) (fn [_] {:test 2})) ;; {:test 2} (assert (= {:test 2} *data-readers*)) ;; AssertionError (assert (

Re: lazy list comprehension

2014-06-27 Thread Kevin Downey
On 6/27/14, 8:01 AM, Glen Rubin wrote: > I have a list that I want to combine in some way with an incremented list, > so I was trying to write a for expression like this: > > (for [i '(my-list-of-crap), j (iterate inc 0)] (str i j)) the equivalent of this code written using map and mapcat is (m

Re: delete-file needs to be vector?

2014-06-12 Thread Kevin Ilchmann Jørgensen
You seem to be missing the parameter vector (defn del-temps [] ..) On Jun 12, 2014 6:14 PM, "Glen Rubin" wrote: > I wrote a fn to delete a couple files: > > (defn del-temps > (clojure.java.io/delete-file "C:/temp/fs.png" true) > (clojure.java.io/delete-file "C:/temp/fs.txt" true)) > > > Whe

Re: auto include a certain line in all *.cljs files

2014-04-13 Thread Kevin Ilchmann Jørgensen
Look at :injections in https://github.com/technomancy/leiningen/blob/master/sample.project.clj. Would that help you? On Sun, Apr 13, 2014 at 7:36 PM, t x wrote: > Hi, > > Can I edit some user.clj/config.clj/project.clj file, so that it's as if: > > (:require-macros [swiss.arrows :refer (-<>

Re: Output of printf is buffered

2014-04-10 Thread Kevin Ilchmann Jørgensen
is terminal then it's default to line buffered. >> That means it buffer the output until '\n' occurs, you can force output via >> flush. >> > > The printf format string is "%s: %s\n", so there is a newline, but it is > not acted upon. > > &

Re: Output of printf is buffered

2014-04-10 Thread Kevin Ilchmann Jørgensen
I believe this is how the terminal behave. You can force an (clojure.core/flush) /Kevin On Thu, Apr 10, 2014 at 12:34 PM, Cecil Westerhof wrote: > I have the following simple program: > (def time-format (new java.text.SimpleDateFormat "hh:mm:ss")) > > (de

Re: test.check, quickcheck concurrency

2014-03-31 Thread Kevin Downey
On 3/28/14, 9:48 PM, Brian Craft wrote: > Re: John Hughes' talk at clojure/west, at the end he did a fairly > incredible demo of testing concurrency. It doesn't look like this was > implemented in test.check (or I'm not finding it). Are there any plans? > from my understanding his approach is u

Re: CLJX & CLJS problem

2014-02-13 Thread Kevin Lynagh
e same use case as you do (using cljx in a clj and cljs library), so perhaps you can glean a magic config option from their project.clj. best, Kevin On Thursday, February 13, 2014 3:22:25 AM UTC-8, Karsten Schmidt wrote: > > I've been busy working on a few libraries ta

Re: clj-http client translated from php/curl implementation fails, why?

2014-02-13 Thread Kevin Ilchmann Jørgensen
They return identical data if you use http://httpbin.org/post as url ? /Kevin On Thu, Feb 13, 2014 at 1:35 PM, Gijs S. wrote: > Untested of course, but I think you need to use either :body or > :form-params rather than :query-params to put the query-params data into > the body of

Re: [Kind of off-topic] Enlightenment

2014-02-10 Thread Kevin Ilchmann Jørgensen
Maybe only tangentially relevant. But way back in another time, i enjoyed the stories Kenny Tilton collected for the Road to Lisp Survey. /Kevin -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: let bindings

2014-01-20 Thread Kevin Downey
On 1/20/14, 12:38 PM, Andy Smith wrote: > Hi, > > (let bindings form) is a special form. As I understand it, let can be > reformulated in terms of functions e.g. > > (let [x 2] (* x 20)) equivalent to ((fn [x] (* x 20)) 2) > (let [x 3 y (* x x)] (- y x)) equivalent to ((fn [x] ((fn [x y] (- y x

[ANN] DACOM: A skeleton app, Leiningen template for Datomic, Compojure, and Om

2014-01-09 Thread Kevin Bell
A Leiningen template featuring all of the most popular Clojure technologies that all of the coolest kids are using: sample project repo or `lein new dacom my-project` -- -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: odd failure on recursive use of protocol member

2013-12-10 Thread Kevin Downey
extend mutates some state (the protocol definition), so what is happen here is comp is returning a new function built from the value of the rest-serialize var (the protocol function before the extend changes it) and the value of the deref var. I have not verified this, but I suspect if you use (fn

Re: CloudFormation template generation with Clojure

2013-11-27 Thread Kevin Bell
Cool, thanks Marshall! I do think it would be nice to have an option to more or less compile/decompile between Clojure and CloudFormation templates. That would help lower the barrier to entry for people currently heavily using CF but not so much Clojure. (I'm kind of trying to use this project

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Kevin Bell
Hey Gary, Thanks for the references. Those videos were awesome! I think Cristophe definitely hit the nail on the head with this slide about the challenges of binding. Though, I'm not sure I fully get what he meant by "binding specs" and "capturi

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Kevin Bell
Hey Craig and Jeroen, Jeroen: Can you elaborate on what kind of features you would like to support? Are you just deciding on DSL syntax or do you have already some kind of Clojure layer working? -My main goals are to create as "pretty" of a format for defining CF templates within Clojure synt

Re: CloudFormation template generation with Clojure

2013-11-26 Thread Kevin Bell
y-instance aws.ec2/instance :image-id "ami-79fd7eee") > > (output my-first-output (:instance-type my-instance)) > (output my-second-output my-parameter)) > > Craig > > > On Tuesday, November 26, 2013 3:41:29 PM UTC+11, Kevin Bell wrote: >> >> Hey

CloudFormation template generation with Clojure

2013-11-25 Thread Kevin Bell
Hey folks, I'm working on a tool to enable the generation of AWS CloudFormation templates using a Clojure-based syntax kind of like leiningen's project.clj. I'm working on how the syntax should look to be most clojurey, and I wonder if anyone has some input: https://gist.github.com/bellkev/7653

Re: core.logic merge substitutions map?

2013-11-18 Thread Kevin Downey
https://github.com/sonian/Greenmail/blob/master/src/clj/greenmail/db.clj#L98-L126 has an example, using clojure.core.logic/all to make a goal which is a conjunction of the clojure.core.logic/== goals On 11/16/13, 5:04 PM, Mark wrote: > d'oh! Answering my own question: Just compose the unify func

Re: Surprising behaviour related to records, protocols and AOT

2013-10-28 Thread Kevin Downey
I don't know about the rest of this thread, but loom seems to suffer from what I've outlined in http://dev.clojure.org/jira/browse/CLJ-322?focusedCommentId=32246&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-32246 pulling in the interface that the protocol generates

Re: Clojure On Java Friendly Microcontrollers, Beaglebone, etc

2013-09-05 Thread Kevin Downey
t; Thanks for the slide deck Kevin. I'm not sure I've found all the slides > yet, but it's great information. Do you have any links or information on > Clojure robotics work you've done since the 2012 Conj? Any thoughts on > using the GPIO pins through the file syste

Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Kevin Downey
tuple is doing under the hood with macros. > > On Aug 26, 2013, at 10:38 AM, Kevin Downey wrote: > >> A Tuple protocol that defines get0 get1 get3 etc for fast element access >> that doesn't tie you to using field names might be a good idea. >> >> On 8/25/13 9:3

[ANN] jetty7-websockets-async: A core.async wrapper for websocket client/server communications

2013-08-26 Thread Kevin Lynagh
r 2013 batch of Hacker School for help designing and coding this library cheers, Kevin -- -- 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

[ANN] zmq-async: A thread safe core.async wrapper for ZeroMQ

2013-08-26 Thread Kevin Lynagh
dge, and Rich Hickey for help with designing+coding this library. cheers, Kevin -- -- 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 -

Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Kevin Downey
A Tuple protocol that defines get0 get1 get3 etc for fast element access that doesn't tie you to using field names might be a good idea. On 8/25/13 9:35 AM, Zach Tellman wrote: > I don't think so, even the existence of all the Tuple* types are an > implementation detail, and you'd need to hint it

Re: Two Way DOM binding in clojurescript

2013-08-21 Thread Kevin Lynagh
heers, Kevin On Wednesday, June 13, 2012 11:47:15 PM UTC-7, Murtaza Husain wrote: > > Hi, > > I would like to data in atoms to DOM elements in clojurescript. Are there > any examples out there that demonstrate this ? > > Something like what knockout.js or angular.js provi

Re: What are the phases of the Clojure compiler?

2013-08-06 Thread Kevin Downey
On 8/6/13 2:23 PM, gixxi wrote: > Hi there, > > I wanne dive a bit more deep into the clojure compiler and I wonder whether > it follows the std procedure for compiled languages > > Character Stream -> Scanner (lexical analysis) -> Token Stream > Token Stream -> Parser (syntax analysis) -> Parse

Re: Two Dimensional Associative Map

2013-08-05 Thread Kevin Downey
On 8/2/13 8:08 PM, JvJ wrote: > Actually, what I'm looking for is a way to use arbitrary types of keys > rather than integers. > > I have this so far: > > Table data structure. > For now, the table data structure is a map of maps. > > (defn row > "Get a row of the table. > If only

Re: Two Dimensional Associative Map

2013-08-02 Thread Kevin Downey
On 8/1/13 5:59 PM, JvJ wrote: > I'm looking for an associative data structure that can be accessed by both > rows and columns, and could potentially be sparse. > > Suppose the following table is called t: > > | | :A | :B | :C ||---+--+--+--|| 1 | | > | '[x

Re: Getting a living standalone jar with "lein uberjar" and a handful of resources

2013-07-31 Thread Kevin Downey
On 7/31/13 4:18 AM, Alex Fowler wrote: > I have an application which is built fine with uberjar with an exception of > two things which do not get incuded: > 1) Additonal jar files (about 150Mb) from various Java libraries that are > not present on Clojars and that I have no power of will or time

Re: Clojure 1.5.1 head holding

2013-07-01 Thread Kevin Downey
On 7/1/13 3:49 AM, Gerrard McNulty wrote: > Suppose I had code like: > > ((fn [rs] (take-last 3 rs)) (range 2000)) > > This seems to run fine with no head holding. But if I write something like: > > (defn- log [f] > (println "start") > (f) > (println "end")) > > ((fn [rs] (log #(take

[ANN] JSON tagged literals library (worse-is-better EDN)

2013-06-27 Thread Kevin Lynagh
While the library can be used from ClojureScript (which we do), it does not depend on ClojureScript, so you can use it in vanilla JavaScript apps as well with little overhead (it's 2kB). cheers, Kevin -- -- You received this message because you are subscribed to the Google Groups "Clo

  1   2   3   4   5   6   >