Re: Switch devops environments via namespaces

2023-05-18 Thread Joe R . Smith
I mean, it works, it’s clever, … is it more or less “safe” is my question.  On May 18, 2023, at 12:02 PM, Felix Dorner wrote:  Clojure noob here, I might be totally off the track or committing crimes, so please advise. For ops, I have to often call rest services in different environments, sa

Re: clojure is supposed to be 'code is data' yet I can't add to the end of a list?

2021-07-18 Thread Joe R . Smith
inked list, adding an item to the front is as simple as creating a new list that points to the old list. E.g., adding 5 to the linked list 2 -> 3 -> 4 can be thought of as 5 -> 2 -> 3 -> 4. --- Joe R. Smith j...@uwcreations.com <mailto:j...@uwcreations.com> @solussd On

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-19 Thread Joe R . Smith
Building off of something Benoit mentioned about conj not being about order, but about adding to a collection, consider conj’s behavior when adding a map-entry to a hash-map:  (conj (hash-map :a 4 :c 1) [:b 3]) => {:c 1, :b 3, :a 4} conj is an interface for adding– not to be conflated with orde

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-16 Thread Joe R . Smith
FWIW, the same is true for the inverse operation.  If you pop an item off a list you’ll get the list, less the item you conj’d. Same is true with a vector.  --- Joe R. Smith j...@uwcreations.com <mailto:j...@uwcreations.com> @solussd On Jul 16, 2018, at 4:31 PM, Alex Miller ma

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-16 Thread Joe R . Smith
Another way to think about it is lists and vectors are different and the idiomatic way to add items to them is different. A (singly-linked) list is usually prepended to (otherwise you have to walk the entire list to find the end). A vector is usually added to at it’s n+1 index, where n is the si

Re: Comparing and selecting web API libraries

2018-03-08 Thread Joe R . Smith
Definitely give Pedestal a look. There is also wonderful Lacinia integration (a Clojure GraphQL library).  Pedestal’s notable capabilities:  https://github.com/pedestal/pedestal/blob/master/README.md#notable-capabilities --- Joe Smith j...@uwcreations.com <mailto:j...@uwcreations.com> @s

Re: int arguments for Java annotations

2017-07-24 Thread Joe Littlejohn
Sorry, to be clear, when I say 'thoughts on how this could be solved in Clojure', I mean changes in the core that would allow this to work in a future version of Clojure :) On Sunday, 23 July 2017 21:14:23 UTC+1, Joe Littlejohn wrote: > > Hi all, > > I recently used Cl

int arguments for Java annotations

2017-07-23 Thread Joe Littlejohn
Hi all, I recently used Clojure to create a Java interface and class (via definterface/deftype) that both required Java annotations. I was within striking distance of my goal, but was finally caught out by the fact that although Clojure has a nice Java annotation syntax, one cannot currently s

Re: [ANN] Specter 1.0.2 released

2017-06-15 Thread Joe Python
Nice. Thank you. On Monday, June 12, 2017 at 12:09:30 PM UTC-4, Nathan Marz wrote: > > Specter supercharges your ability to use and manipulate data structures in > Clojure and ClojureScript. 1.0.2 contains minor improvements. > https://github.com/nathanmarz/specter > > > Full changelog: > > * Ad

Re: ANN: Cognitect acquired by Microsoft

2017-04-01 Thread Joe R . Smith
Beware the 1st of April.  --- Joseph Smith j...@uwcreations.com @solussd On Apr 1, 2017, at 3:00 PM, Gregg Reynolds mailto:d...@mobileink.com> > wrote: made ya look! -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: off-topic: stackof developer survey

2017-03-25 Thread Joe Python
Scipy/Numpy had a head start in this area long before others should up in the Open source space. On Friday, March 24, 2017 at 10:46:18 PM UTC-4, Mars0i wrote: > > > > On Friday, March 24, 2017 at 5:17:15 PM UTC-5, Gregg Reynolds wrote: >> >> >> >> On Mar 24, 2017 5:05 PM, wrote: >> >> >> >> > Th

pager for lein repl?

2017-03-23 Thread Joe Python
Is there a equivalent of less/more like pager (found in Linux shells) for Leiningen repl? The lein repl is fast enough for me displaying large data structures making it great for exploratory programming. But it is desperately missing a pager. - Joe -- You received this message because you

Re: Contribute Specter to Clojure core?

2017-03-11 Thread Joe Python
, the code is very readable which is unusual from someone like me :) I recommend Specter to be a part Clojure contrib. Thank you, Nathan Marz. - Joe Python On Thursday, March 9, 2017 at 2:59:46 PM UTC-5, Gregg Reynolds wrote: > > > > On Mar 4, 2017 12:35 AM, "Asim Jalis" >

Re: code from spec with clojure.spec?

2016-11-06 Thread Joe Corneli
This is a late reply to my own question but maybe it will be helpful to a future searcher. http://blog.cognitect.com/blog/2016/10/5/interactive-development-with-clojurespec has an example that showed me more clearly how to use :fn. Specifically here's how I rewrote the spec: (s/fdef mapper

code from spec with clojure.spec?

2016-10-17 Thread Joe Corneli
As a running example related to the ideas in http://clojure.org/guides/spec#_spec_ing_functions, please consider the following function: (defn mapper [x y] {:tacos (vec (range x)) :burritos (vec (range y))}) Example input and output: (mapper 2 4) ;=> {:tacos [0 1], :burritos [0 1 2 3]} O

Re: fspec requires dependency on test.check

2016-07-21 Thread Joe Selman
Great, thanks! On Thursday, July 21, 2016 at 10:02:51 PM UTC-7, Alex Miller wrote: > > Hi Joe, > > This is an area of ongoing work and the following ticket captures this > issue as well: > > http://dev.clojure.org/jira/browse/CLJ-1936 (and duped > http://dev.clojure.

fspec requires dependency on test.check

2016-07-21 Thread Joe Selman
I have a simple lein project on clojure 1.9.0-alpha10 with no other dependencies. Trying to use fspec and explain yields an error: (require '[clojure.spec :as s]) > => nil > (s/def ::my-spec (s/fspec :args string? :ret string?)) > => :user/my-spec > (s/explain ::my-spec (fn [_] "foo")) > FileNotF

[ANN] trapperkeeper 1.4.1

2016-05-23 Thread Joe Pinsonault
Today we released puppetlabs/trapperkeeper v1.4.1 to clojars. There is a single bugfix in this release: TK-375 . TK-375 resolves startup issues for users that use a bootstrap.cfg inside their project's jar file. For more info see the CHANGELOG and

[ANN] trapperkeeper 1.4.0

2016-05-03 Thread Joe Pinsonault
Today we released puppetlabs/trapperkeeper v1.4.0 to clojars. Trapperkeeper[1] is a Clojure framework for hosting long-running applications and services. You can think of it as a sort of "binder" for Ring applications and other modular bits of Clojure code. The major addition in this release ad

Re: How is the emphasis of “data over code” different than the XML advocacy of the early 2000s?

2016-02-01 Thread Joe R. Smith
The reason XML has a bad rap is because it has been used for things like configuration files. XML was intended as a host/platform/language-agnostic data interchange format, not something humans would write by hand, much less have to read. > On Feb 1, 2016, at 4:02 PM, Josh Tilles wrote: >

Re: Clojure beyond Java 6 ?

2016-01-19 Thread Joe Python
You are spot on! Thanks for the clojure dev team to continue supporting Java 1.6. On Tuesday, January 19, 2016 at 2:33:56 PM UTC-5, Sean Corfield wrote: > > Didier wrote on Tuesday, January 19, 2016 at 11:08 AM: > > Why not make new versions of Clojure support the latest Java version and > JDK fe

Re: Smallest Heroku slug size?

2015-10-07 Thread Joe Kutner
. > > onsdag 7. oktober 2015 03.56.26 UTC+2 skrev Joe Kutner følgende: >> >> The slug will also include the JDK, which is ~50mb compressed. It is >> possible to exclude the JDK and use the cedar-14 stack's JVM, which is >> currently openjdk7 because that's wha

Re: Smallest Heroku slug size?

2015-10-06 Thread Joe Kutner
The slug will also include the JDK, which is ~50mb compressed. It is possible to exclude the JDK and use the cedar-14 stack's JVM, which is currently openjdk7 because that's what Canonical supports. But then you don't get the all the goodness of Java 8, which is probably better for your app tha

Re: Reality check: EC2 + Ubuntu + Atom (from GitHub) + Clojure?

2015-08-03 Thread Joe R. Smith
I’ll come out as an Emacs -> Cursive convert. I had been using emacs for Clojure development for 6+ years before I switched. Originally I had no intention of actually switching, but, as Colin suggested, I found enough additional value in Cursive to make my experimentation with Cursive permanent.

Re: [:ann :book] ClojureScript Unraveled

2015-07-17 Thread Joe R. Smith
I believe [:ann :book] is a variant. :D > On Jul 17, 2015, at 1:44 PM, Fluid Dynamics wrote: > > Nitpick: a collection of tag keywords, which can be presumed not to have > duplicates, is probably better represented as a set or a sorted-set rather > than a vector, so "#{:ann :book} ClojureScrip

idiomatic data transformation

2015-07-07 Thread Joe Graham
Hi Clojure Users, I wanted to learn an idiomatic approach to data transformation in Clojure. For example I have a web service that is consuming some ReST services, Ultimately I need to consolidate these services into a data model which resembles a DAG. However I would like to transform the chi

Re: [Documentation] looking for diagramming tools

2015-06-29 Thread Joe R. Smith
I use Omnigraffle to draw entity relationship diagrams like that. > On Jun 29, 2015, at 4:13 AM, dImas Angga Saputra > wrote: > > Hi Everyone, > > I'd like to ask about recommendation about diagramming tools, > So i saw this post : > http://blog.datomic.com/2013/06/using-datomic-from-groovy-

Re: breaking homoiconicity?

2015-06-20 Thread Joe Corneli
On Saturday, June 20, 2015 at 4:15:30 AM UTC+1, Sean Corfield wrote: > > (.getTypeName (Class/forName "[Ljava.lang.String;")) > ;;=> "java.lang.String[]" — that is more readable! > Thanks, that's helpful for me. By chance do you know if the class is natively recoverable from

breaking homoiconicity?

2015-06-19 Thread Joe Corneli
This is an interaction with Clojure via CIDER. repl [1]> (type (into-array String ["Awesome"])) [Ljava.lang.String; repl [2]> [Ljava.lang.String; RuntimeException EOF while reading, starting at line 1 clojure.lang.Util.runtimeException (Util.java:221) repl [3]> (quote [Ljava.lang.String;) CIDER

Re: [ANN] Reagent + Sente (+ Heroku) = Rente

2015-03-27 Thread Joe Kutner
t;? Did it fail the compile process, or just fail to start the app after the compile? On Fri, Mar 27, 2015 at 1:49 AM, Henrik Mohr wrote: > Thanks Joe! :) > > It's not the standard Clojure buildpack, that's the reason it has to be > specified explicitly. > > I actu

Re: [ANN] Reagent + Sente (+ Heroku) = Rente

2015-03-26 Thread Joe Kutner
That's awesome. I'm really glad to see people using the Heroku button for projects like this. Is there a reason you explicitly set the BUILDPACK_URL? Heroku should detect the `project.clj` and use the Clojure buildpack automatically (I was able to deploy like that when I tested it). If there wa

Re: emacs-cider company-mode no match found

2014-09-27 Thread Joe (Zhou Xiangtao)
hi Tassilo, I switch to the prelude package, it works now. thanks a lot. Joe On Sun, Sep 21, 2014 at 3:59 PM, Tassilo Horn wrote: > Xiangtao Zhou writes: > > Hi! > > > I have upgrade the latest emacs-cider, the document suggest me to use > > company for auto complet

Re: Extending clj-time

2014-09-10 Thread joe
I just noticed that the ReadableInstant[0] interface is generic, extending Comparable [1]. Is it possible to implement a generic interface with a defrecord? [0] http://joda-time.sourceforge.net/apidocs/org/joda/time/ReadableInstant.html [1] http://docs.oracle.com/javase/1.5.0/docs/api/java/lang

Re: Extending clj-time

2014-09-10 Thread joe
Thanks. Sorry this is turning into a bit of a brain dump. I've created my record that decorates the original type: (defprotocol IWeirdDate (as-date [this]) (pp [this])) (defrecord WeirdDate [year month day] IWeirdDate (pp [this] (condp = month 21 (str "Spring " year)

Extending clj-time

2014-09-10 Thread joe
is] (clj-time/day (as-date this))) ; ... and the rest of DateTimeProtocol ) Is this the right way to do this? Could I somehow make this implicit and avoid re-writing the DateTimeProtocol implementations? Cheers Joe -- You received this message because you are subscribed to the Google Groups

Re: Attempting to call unbound fn: #'user/

2014-08-13 Thread Joe Smith
Nothing’s wrong with the code, but the `do` inside the catch form is unnecessary. Also, this won’t always convert to a float. Consider using Float/parseFloat, e.g., (Float/parseFloat “3.0”) > On Aug 13, 2014, at 3:31 PM, sindhu hosamane wrote: > > (defn convert-to-float [a] > (try >

Re: How to tackle this concurrency problem?

2014-06-20 Thread Joe Smith
Maybe you want an Agent. On Jun 20, 2014, at 12:10 PM, Hussein B. wrote: > Hi, > > I have a ref that saves the ID of last processed event. > > Of course, I'm using Clojure STM facility. The problem now is I can't control > the value of the ref. Due massive concurrency, it is updated and my lo

Re: howto use reify in defmacro

2013-12-18 Thread Joe (Zhou Xiangtao)
hi Tassilo, that's great, thanks. I current use a function wrap reify, it's simple. (defn make-reify [entity] ...) (defmacro def-site-entity `(let [e# (create-e)] (def ~ent (make-reify e# Joe On Wed, Dec 18, 2013 at 8:14 PM, Tassilo Horn wrote: > Xiangtao Zhou w

Re: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-13 Thread Joe Smith
Very cool, good luck to you! --- Joseph Smith j...@uwcreations.com @solussd On Nov 12, 2013, at 5:52 PM, Ryan Spangler wrote: > Hello Clojure, > > Excited to announce today the release of Caribou! http://let-caribou.in/ > > We have been building web sites and web applications with it fo

Re: [ClojureScript] ANN: ClojureScript 0.0-2030, core.async compatibility

2013-11-08 Thread Joe Smith
Thanks- addresses my duplicate bug! --- Joseph Smith j...@uwcreations.com @solussd On Nov 8, 2013, at 5:11 PM, David Nolen wrote: > ClojureScript, the Clojure compiler that emits JavaScript source code. > > README and source code: https://github.com/clojure/clojurescript > > New release

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-08 Thread Joe Smith
The string concatenation operator in java calls 'toString' on it's args. --- Joseph Smith j...@uwcreations.com @solussd On Oct 8, 2013, at 2:29 PM, Cedric Greevey wrote: > On Tue, Oct 8, 2013 at 8:49 AM, Nando Breiter wrote: > > If you try and add 10 to "Hello" in a typed language, you g

Re: [ClojureScript] ANN: ClojureScript 0.0-1885 (Source maps!)

2013-09-16 Thread Joe Smith
I see that clojure.core/format is gone. Is there a replacement/alternative? --- Joseph Smith j...@uwcreations.com @solussd On Sep 16, 2013, at 7:31 AM, David Nolen wrote: > Nicola Mometto also deserves quite a bit of credit, the fact that > tools.reader emits line and column information o

Re: [ANN] Cognitect

2013-09-16 Thread Joe Smith
Exciting! --- Joseph Smith j...@uwcreations.com @solussd On Sep 16, 2013, at 8:50 AM, Rich Hickey wrote: > I just wanted to let everyone know that Metadata Partners (the company behind > Datomic) and I have merged with Relevance, Inc., to form Cognitect, Inc. This > merger is great for C

How to set up a Clojure nREPL using Vim & Fireplace

2013-07-28 Thread Joe Cooljure
ad me to a very nice article<http://www.boxuk.com/blog/unboxing-vim-fireplace/> from boxuk.com that helped to clear up the sticking points. I've also copied the post here<http://cooljure.blogspot.com/2013/07/how-to-set-up-clojure-nrepl-using-vim.html> in case the origin

[GSOC 2013] Clooj IDE/Suggestions

2013-04-10 Thread Joe Nash
d and have a pretty good background in Haskell and Java. Are there any other projects people would like to see receive some attention that would be particularly fitting for such a skill set? Cheers, Joe Nash -- -- You received this message because you are subscribed to the Google Groups &qu

What is the status of Clojure on LLVM or C?

2013-03-27 Thread Joe Graham
Hi Group, Good afternoon I hope everyone is well. I just wanted to reach out to this group and get the current status of Clojure today on the LLVM compiler or C based implementation? Has anyone looked into a Julia implementation? Just trying to get a roadmap on the main forks before searching

Re: Casting SPELs in Clojure

2012-07-23 Thread Joe Hughes
Denis: Thanks for the link. Looks interesting. Between it and the Euler Project, I should continue learning Clojure. Regards, Joe On Monday, July 23, 2012 10:53:56 AM UTC-5, Denis Labaye wrote: > > Hi, > > On Mon, Jul 23, 2012 at 5:38 PM, Joe Hughes wrote: > >> All

Re: Casting SPELs in Clojure

2012-07-23 Thread Joe Hughes
All, I figured it out. Still trying to get Functional Programming ideas in my head. Regards, Joe On Friday, June 29, 2012 11:11:56 AM UTC-5, Joe Hughes wrote: > > All, > > I've been playing with Clojure and found this website, > http://www.lisperati.com/clojure-spels/

Casting SPELs in Clojure

2012-07-01 Thread Joe Hughes
stead of the if. This was written using Clojure 1.1, so if anyone has a solution about why this works in 1.1 and not 1.4 I would like to hear it. TIA, Joe -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

How to fund open source Clojure development

2009-12-16 Thread Joe
a. Offer new clojure features in binary form to developers who pay $100 a year 3 months before everyone else. b. Run a clojure programmer temp and/or high level consulting agency. c. Charge for cert testing and training. d. Sell for access to online library api calls. e. Find a business for whom Cl

Re: Newbie question: Writing a GUI with clojure

2009-08-05 Thread Joe Van Dyk
On Aug 5, 6:01 am, John Harrop wrote: > On Tue, Aug 4, 2009 at 10:33 PM, Joe Van Dyk wrote: > > Hey, > > > New to Java and Clojure.  My possibly relevant experience is with Gtk > > and Ruby and C++ programming. > > > I'd like to develop a GUI in Clojure.

Re: Improving Clojure's primitive handling (warning: not thought through)

2009-08-05 Thread Joe Van Dyk
"boxing" primitives relies on the JVM's performance > of allocating and deallocating objects. What's meant by "boxing"? Joe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cloju

Re: Newbie question: Writing a GUI with clojure

2009-08-05 Thread Joe Van Dyk
On Aug 5, 6:53 am, Chas Emerick wrote: > We use NetBeans' matisse designer for static form layout, and we hook   > up the components' behaviour using clojure.  This is pretty easy,   > especially if you configure matisse to expose the components in a form   > by creating them with 'public final'

Newbie question: Writing a GUI with clojure

2009-08-05 Thread Joe Van Dyk
Hey, New to Java and Clojure. My possibly relevant experience is with Gtk and Ruby and C++ programming. I'd like to develop a GUI in Clojure. I'm guessing I want to use Swing. This application will be targeted towards scientists who are used to working with the most horribly-designed Tk UI kn