[ANN] Ticket - an encrypted ticket/cookie library

2016-02-10 Thread Michael Ball
Ticket helps create and read encrypted tickets/cookies with expiration dates packaged inside. Feedback and security reviews are welcomed. https://github.com/mikeball/ticket Mike -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: Java Interop for a static method call that returns an ArrayList

2016-02-10 Thread Jeremy Heiler
On Wed, Feb 10, 2016 at 8:43 AM, Adrian Cooley wrote: > > How does clojure deal with an ArrayList that is being passed into clojure > from java? > The trick is to not think in terms of specific classes, but in terms of the different Java-related things you can do. See: http://clojure.org/referen

Re: Advice on introducing a Java dev to Clojure

2016-02-10 Thread Derek Troy-West
Hi Johanna, You could try the angle that a Clojure REPL is a practical adjunct to standard Java tooling, particularly if the developer is using IntelliJ since Cursive is extremely accessible. I wrote something along these lines: http://derek.troywest.com/articles/proximity-and-brevity. T

Re: [ANN] dali SVG library 0.7.0

2016-02-10 Thread Colin Fleming
This looks really lovely, thanks! On 11 February 2016 at 13:51, Stathis Sideris wrote: > ...aaand the link to the repo: https://github.com/stathissideris/dali > > > On Thursday, 11 February 2016 00:49:54 UTC, Stathis Sideris wrote: >> >> Hello all, >> >> dali is a Clojure library for representin

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Alex Miller
> On Feb 10, 2016, at 7:00 PM, Daniel wrote: > > Aside from the survey results, is it fair to say that more developers would > be interested in Clojure on Android if they could use the blessed compiler? Not sure what this refers to? Android is not the focus of my current efforts, although th

conditional logic implemented as pattern-matching and restructuring in the signature of the function

2016-02-10 Thread Daniel
Check out defun. I believe it does exactly what you want. Admittedly I'm not aware of its current state. https://github.com/killme2008/defun -- 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

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Daniel
Aside from the survey results, is it fair to say that more developers would be interested in Clojure on Android if they could use the blessed compiler? Are there any plans to look into the changes in project Skummet or breaking up the core namespace (like dunaj experimented with)? -- You recei

Re: [ANN] dali SVG library 0.7.0

2016-02-10 Thread Stathis Sideris
...aaand the link to the repo: https://github.com/stathissideris/dali On Thursday, 11 February 2016 00:49:54 UTC, Stathis Sideris wrote: > > Hello all, > > dali is a Clojure library for representing the SVG graphics format. It > allows the creation and manipulation of SVG files. The syntax >

[ANN] dali SVG library 0.7.0

2016-02-10 Thread Stathis Sideris
Hello all, dali is a Clojure library for representing the SVG graphics format. It allows the creation and manipulation of SVG files. The syntax used to describe the graphical elements is based on hiccup

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Alex Miller
Based on the responses, many people are seeing slow times with "lein repl", which is generally *much* slower than just starting a normal Clojure repl with clojure.main. If you want to compare, you can use lein to dump your classpath to a file (or the Windows equivalent of these): lein classp

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Marc O'Morain
On 10 February 2016 at 16:36, Alex Miller wrote: > Parallel loading is something I've looked at a little bit. Unfortunately > theory is easier in theory than in practice. :) While in many cases, it > probably works fine, it's possible for there to be problematic ambiguity > with which namespace is

Re: [ANN] Leiningen 2.6.0

2016-02-10 Thread Avi Flax
On Thu, Feb 4, 2016 at 8:27 PM, Jean Niklas L'orange wrote: > The biggest notable change will likely be for Homebrew users. When the > Homebrew formula is updated to 2.6.0, you will likely experience startup > time improvements. Does this mean that those who manually installed will not experience

conditional logic implemented as pattern-matching and restructuring in the signature of the function

2016-02-10 Thread Gary Verhaegen
It's not pattern matching, but would replacing the apply with a reduce achieve the same result? I'm not in a position to test this right now, but I believe (reduce f init ()) returns init without invoking f, and (conj x a b c) is equivalent to (reduce conj x [a b c]), so replacing apply with reduc

Re: Undocumented reader macros?

2016-02-10 Thread James Elliott
Understood! I am certainly not diving in to submit pull requests to add features. On Wednesday, February 10, 2016 at 10:43:25 AM UTC-6, Andy Fingerhut wrote: > > It may be as finished as it will ever be. > > Andy > > On Wed, Feb 10, 2016 at 8:35 AM, James Elliott > wrote: > >> Ah, I see that par

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Gary Trakhman
Personally, I've recently fought machine-specific AOT breakage issues by forcing maven-clojure-plugin to only compile a single entry-point namespace, making compilation order deterministic again. Arguably, it should have worked in any order but this specific issue was hard to track down. In any c

Re: Undocumented reader macros?

2016-02-10 Thread Andy Fingerhut
It may be as finished as it will ever be. Andy On Wed, Feb 10, 2016 at 8:35 AM, James Elliott wrote: > Ah, I see that part of the reason it’s not yet documented is that it’s not > really finished; you can’t, for example, use a keyword as a function with > it. Trying to use #=(:tap-tempo control

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Alex Miller
Parallel loading is something I've looked at a little bit. Unfortunately theory is easier in theory than in practice. :) While in many cases, it probably works fine, it's possible for there to be problematic ambiguity with which namespace is loaded first, especially for things that update state

Re: Undocumented reader macros?

2016-02-10 Thread James Elliott
Ah, I see that part of the reason it’s not yet documented is that it’s not really finished; you can’t, for example, use a keyword as a function with it. Trying to use #=(:tap-tempo control-buttons) as a case target fails with clojure.lang.Keyword cannot be cast to clojure.lang.Symbol. I guess I

Re: Java Interop for a static method call that returns an ArrayList

2016-02-10 Thread Adrian Cooley
Thanks a million Gary, this has been extremely helpful. I'm from an object oriented background and I'm having the usual problems of crossing into the functional thinking land, hence the straightforward question. I appreciate the help, it worked exactly as you've outlined below, Thanks, Adrian.

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Alex Miller
Lazy var loading is one of the things we're looking at. There is some work on this early in the "direct" branch (although at this point it's pretty out of sync with current code). On Wednesday, February 10, 2016 at 2:22:12 AM UTC-6, Mikera wrote: > > Good initiative, I've filled in a response t

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Michał Marczyk
FYI, you may want to have a look at the following commits: commit 71930b6b6537a796cdf13c4ffa7cf93eb53b6235 Author: Rich Hickey Date: Mon Feb 28 17:55:14 2011 -0500 improve startup time via lazy defn loading commit c5681382da775e898915b17f3ab18b49c65359ec Author: Rich Hickey Date: Tue A

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Herwig Hochleitner
2016-02-10 13:06 GMT+01:00 Gary Verhaegen : > Please excuse the very naive question, but if the main problem seems to be > compilation of loaded namespaces, what about aot? Does it help at all? If > not, why? As far as I understand the problem, it does help a little bit, but much less than expec

Re: Java Interop for a static method call that returns an ArrayList

2016-02-10 Thread Gary Trakhman
(map (fn [u] (.getName u)) (DAO/getUsers)) ? You'll need to write a getter since name is private. On Wed, Feb 10, 2016 at 8:44 AM Adrian Cooley wrote: > Hi, > > I have a Java class that has a static method call that returns a Java > Array List of users as follows: > > public final class DAO { >

Java Interop for a static method call that returns an ArrayList

2016-02-10 Thread Adrian Cooley
Hi, I have a Java class that has a static method call that returns a Java Array List of users as follows: public final class DAO { public static List getUsers() { List userList = new ArrayList(); User user = new User("Mike"); userList.add(user); return userLi

Re: Can the data in a vector have data inside it that points to the same vector? vector1=[a b c d] a=[1 2 f s vector1]

2016-02-10 Thread Gary Verhaegen
Basically, since vectors are immutable, you cannot easily construct that kind of recursive structure. Any means of breaking immutability would allow it, though (atoms, promises, undocumented mutable apis, mutable objects inside the vector, etc.). To clarify: the vector itself does not explicitly p

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Gary Verhaegen
Please excuse the very naive question, but if the main problem seems to be compilation of loaded namespaces, what about aot? Does it help at all? If not, why? As far as I know, the JVM already does lazy loading with Java classes essentially in the way that Mike described. On Wednesday, 10 February

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Marc O'Morain
Hi Alex, I've love to offer any help/test data on this that I can. At CircleCI we run (among other processes) a large Clojure app that takes 2 minutes to load on a top of line Macbook Pro, with Java 1.8 (Hotspot) . From my best efforts at profiling, this time is all spend in the Clojure Compiler a

Re: Scripting with Clojure / "slow" boot time

2016-02-10 Thread Mikera
Good initiative, I've filled in a response to the survey. One thing that strikes me is that the main issue with loading time is the time required to transitively load and compile all the referred namespaces (which can be a lot in a big project...). This in turn may trigger class loading of Java