Re: What to use use for writing GUI's

2014-05-05 Thread Cecil Westerhof
2014-05-04 15:50 GMT+02:00 Timothy Baldridge : > I highly recommend taking a look again at JavaFX2. The latest version > (released as part of Java 8 or as a separate jar with Java 7) has a very > unified API and is a joy to work with. > > I've been hacking on a library that provides a data centric

Re: What to use use for writing GUI's

2014-05-05 Thread Cecil Westerhof
2014-05-04 17:32 GMT+02:00 Gary Verhaegen : > I'm no expert, but the arguments I have seen against Swing are > almost always about the API, so they do not really apply to seesaw. > > The other arguments were about the non-native look, but I seem to remember > that seesaw took care of that too. >

Re: What to use use for writing GUI's

2014-05-05 Thread Fabien Todescato
>From Java 7 onwards, JavaFX is part of the runtime. I strongly recommend you >take a look at JavaFX, the very regular and powerful API will allow you to >build innovative UIs. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Re: Functional programming and security

2014-05-05 Thread Cecil Westerhof
2014-05-04 17:40 GMT+02:00 Evan Rowley : > Most functional languages have design features that enhance their > security. I'm referring to Clojure, Haskell, and Erlang, but this won't be > limited to those three. As someone who was hired to handle cyber security > needs of a contracting IT company,

Re: Functional programming and security

2014-05-05 Thread Cecil Westerhof
2014-05-04 21:59 GMT+02:00 Adam Saleh : > Well, what does it mean to write secure programs? Citation needed :) > ​Well, the statement was that for secure programming you needed to program modular. It was hinted that when you program functional you can not program modular. I would not know why, bu

Re: Functional programming and security

2014-05-05 Thread Cecil Westerhof
2014-05-04 23:40 GMT+02:00 Magnus Therning : > On Sun, May 04, 2014 at 09:24:08AM +0200, Cecil Westerhof wrote: > > I heard the stand that functional programming made it difficult to > > write secure programs. I do not know enough of functional > > programming yet to determine the value of a state

Re: Functional programming and security

2014-05-05 Thread Cecil Westerhof
2014-05-05 5:48 GMT+02:00 Wei Hsu : > Perhaps Cecil is referring to this article, Clojure web security is worse > than you > think, > describing > the immature state of Clojure's web security libraries. I > ​No, it w

Re: Functional programming and security

2014-05-05 Thread Cecil Westerhof
2014-05-05 8:21 GMT+02:00 Magnus Therning : > any language" ;) However, choosing language wisely will allow you to > concentrate on solving the 'real' problem at hand, and relieve you > from solving unrelated problems (memory management, dealing with > pointers, etc). It will also simplify reaso

Re: What to use use for writing GUI's

2014-05-05 Thread Cecil Westerhof
2014-05-05 9:56 GMT+02:00 Fabien Todescato : > From Java 7 onwards, JavaFX is part of the runtime. I strongly recommend > you take a look at JavaFX, the very regular and powerful API will allow you > to build innovative UIs. > ​I see you are right. Two problems: - Can I expect everyone that is go

Re: Functional programming and security

2014-05-05 Thread Magnus Therning
On Mon, May 5, 2014 at 10:09 AM, Cecil Westerhof wrote: > 2014-05-04 23:40 GMT+02:00 Magnus Therning : > >> On Sun, May 04, 2014 at 09:24:08AM +0200, Cecil Westerhof wrote: >> > I heard the stand that functional programming made it difficult to >> > write secure programs. I do not know enough of f

Re: Tools.nrepl middleware-dependency sorting issues

2014-05-05 Thread Jony Hudson
I'm not sure it's relevant, but one thing that caught me out is that the "interruptible-eval" middleware has a hard dependency on the "pr-values" middleware (i.e. it depends on #'clojure.tools.nrepl.middleware.pr-values/pr-values). I found this caused trouble when I was trying to insert my own

Re: Core.logic appendo for string?

2014-05-05 Thread Tassilo Horn
David Nolen writes: > There's no easy way to do this beyond making your own relational > string type as you've suggested. FWIW, I had the same need as Adam and the poor-man's solution below is enough for my use-case. --8<---cut here---start->8--- (defn ground

Re: NoClassDefFoundError when AOT compiling namespace using protocol

2014-05-05 Thread Colin Fleming
So it turns out this is an ordering problem. I worked around it by first compiling the namespace containing the protocol, and then the namespace using it. I guess there's a bug in the transitive compilation. Cheers, Colin On 3 May 2014 21:52, Colin Fleming wrote: > Hi all, > > I'm having a str

Re: devops-ish questions regarding Clojure webapp server-side REPL usage

2014-05-05 Thread Deyan Yotsov
Many thanks to both of you, your answers were very helpful! Regards, Deyan On 05/04/2014 11:28 PM, Akos Gyimesi wrote: Hi Deyan, I also think that it's usually better to have a standalone Clojure app with a built-in HTTP server, and possibly with a reverse proxy as a frontend. You will have m

Re: Achieving structural sharing when composing data

2014-05-05 Thread Alex Miller
To clarify slightly, the Java Language Specification section 5.1.7 requires that the implementation cache *boxed* ints from -128 to 127, boolean true/false, and characters from \u and \u007f. Because Clojure defaults to boxing in many cases you'll see the same effect. The persistent collect

Re: Proposing a new Clojure documentation system (in Clojure)

2014-05-05 Thread Mars0i
(There are now three recent threads on documentation in the Clojure Google group*. *The other threads are "Code Genres" and "Deep Thinking". It was actually *da...@axiom-developer.org's May* 4 post in "Deep Thinking" that stimulated these remarks; I posted in this thread only because it has "

Re: why is this failing on a list

2014-05-05 Thread Erlis Vidal
Hi Roelof, I start the 4Clojure exercises and I did a little project so I can keep a record of my solutions. It's really simple but also I've found it really helpful to see where my errors are. You can fork it from here... if you want. https://github.com/erlis/4Clojure You only have there the f

test.check :autotest ?

2014-05-05 Thread boz
Is there an :autotest for test.check with Leiningen? Something like midje, where you can do: lein midje :autotest Many thanks, boz -- 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 tha

Re: [ANN] packthread 0.1.0

2014-05-05 Thread Jason Felice
I've never seen synthread. I'll investigate in probably a few days. On Sat, May 3, 2014 at 9:52 AM, Jozef Wagner wrote: > Thanks for releasing this library. How does it compare to the synthread > library [1] [2] ? Seems like both libraries have the same goal. > > Jozef > > [1] https://github.c

Re: Functional programming and security

2014-05-05 Thread Cecil Westerhof
2014-05-05 12:05 GMT+02:00 Magnus Therning : > On Mon, May 5, 2014 at 10:09 AM, Cecil Westerhof > wrote: > > 2014-05-04 23:40 GMT+02:00 Magnus Therning : > > > >> On Sun, May 04, 2014 at 09:24:08AM +0200, Cecil Westerhof wrote: > >> > I heard the stand that functional programming made it difficul

Re: Functional programming and security

2014-05-05 Thread Gregg Reynolds
On Mon, May 5, 2014 at 5:05 AM, Magnus Therning wrote: > On Mon, May 5, 2014 at 10:09 AM, Cecil Westerhof > wrote: > > 2014-05-04 23:40 GMT+02:00 Magnus Therning : > > > >> On Sun, May 04, 2014 at 09:24:08AM +0200, Cecil Westerhof wrote: > >> > I heard the stand that functional programming made

Re: Proposing a new Clojure documentation system (in Clojure)

2014-05-05 Thread Gregg Reynolds
On Mon, May 5, 2014 at 9:32 AM, Mars0i wrote: ... > the end, there are no fixed rules. Just figure out what your readers or > students need, however you do it. > > That's exactly what good documentation involves: Figuring out what other > programmers will need when they read your code. (And fig

Re: Functional programming and security

2014-05-05 Thread Magnus Therning
On Mon, May 5, 2014 at 10:20 AM, Cecil Westerhof wrote: > 2014-05-05 8:21 GMT+02:00 Magnus Therning : > >> any language" ;) However, choosing language wisely will allow you to >> concentrate on solving the 'real' problem at hand, and relieve you >> from solving unrelated problems (memory manageme

http-kit AsyncChannel and clojure.core.async.impl.channels.ManyToManyChannel

2014-05-05 Thread Valentin Luchko
Could you explain me why after clients;; => {#/0:0:0:0:0:0:0:1%0:60071> true} (into {} clients) ; => # I get How {#/0:0:0:0:0:0:0:1%0:60071> true} is transformed to #? I suspect it is because I use AsyncChannel as a key, but what is going on? -- You received this message because you are s

Clojure compiled without Eval

2014-05-05 Thread Andrew Stine
I'm wondering if there is a way to generate Clojure executables/jars without the embedded Clojure compiler/interpreter. In older lisps there is usually the option to generate an executable with unused bits of the language expunged for performance reasons. Clojurescript already sort of works thi

Re: Clojure compiled without Eval

2014-05-05 Thread Gary Trakhman
There's a GSOC project to this effect: http://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-LeanJVMRuntime Reid McKenzie's going to be working on it. On Mon, May 5, 2014 at 1:06 PM, Andrew Stine wrote: > I'm wondering if there is a way to generate Clojure executables/jars > with

Re: http-kit AsyncChannel and clojure.core.async.impl.channels.ManyToManyChannel

2014-05-05 Thread Timothy Baldridge
Can you put the sourcecode in refheap or gist? I can't make sense of your initial post. Timothy On Mon, May 5, 2014 at 11:03 AM, Valentin Luchko wrote: > Could you explain me why after > clients;; => {# /0:0:0:0:0:0:0:1%0:<->/0:0:0:0:0:0:0:1%0:60071> true} > (into {} clients) ; => # clojur

Re: Clojure equivalent of special common lisp vars: still looking for that zen place...

2014-05-05 Thread John Gabriele
On Saturday, May 3, 2014 10:53:40 AM UTC-4, Bob Hutchison wrote: > > > On May 3, 2014, at 9:45 AM, Dave Tenny > > wrote: > > I'm still struggling with how to write the most readable, simple clojure > code > to deal with dynamically bindings. > > What is the graceful clojure equivalent of common l

Re: Clojure equivalent of special common lisp vars: still looking for that zen place...

2014-05-05 Thread Gary Trakhman
Sometimes you do want a mutable thing with thread-local binding, noir does this for it's mutable session-flash stuff: https://github.com/noir-clojure/lib-noir/blob/master/src/noir/session.clj#L95 I don't really recommend the approach, but I could see it being convenient. On Mon, May 5, 2014 at 1

Re: Functional programming and security

2014-05-05 Thread Brian Craft
I would never have guessed modularity as a reason to worry about security in fp. I worry about immutability in fp, wrt security. Security requires mutability in order to remove sensitive data from memory, and from app history. A FIPS review, for example, requires demonstrating where in your co

Re: Managing State Changes, using Component

2014-05-05 Thread Timothy Washington
Responses inlined ... On Mon, May 5, 2014 at 12:35 AM, Atamert Ölçgen wrote: > > Hello Timothy, > > > On Sat, May 3, 2014 at 8:49 PM, Timothy Washington wrote: > >> >> Also, have you tried confirming that only one :a is instantiated? >>> >> >> That one *:a* is not the same instance throughout

Re: Achieving structural sharing when composing data

2014-05-05 Thread Mike Fikes
Thanks Gary, Leif, Alex! I suspected memoization might be the way to go—the leap I needed to make was: writing my own data constructors. On Monday, May 5, 2014 9:10:40 AM UTC-4, Alex Miller wrote: > > To clarify slightly, the Java Language Specification section 5.1.7 > requires that the implem

Why does `lein new` default to clojure 1.5.1?

2014-05-05 Thread gvim
I have Clojure 1.6.0 installed so why does `lein new app myapp` default to Clojure 1.5.1 inside project.clj? Even worse, `lein ancient upgrade :all` doesn't return an upgrade for Clojure 1.5.1 gvim -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: Managing State Changes, using Component

2014-05-05 Thread Stuart Sierra
At what point did you **create** the Atom in :a? Any mutable references which need to be shared among all usages of a component must be created in the **constructor**, not the `start` or `stop` methods. -S On Wednesday, April 30, 2014 5:13:15 PM UTC-4, frye wrote: > > Hi all, > > I'm having a

Re: Why does `lein new` default to clojure 1.5.1?

2014-05-05 Thread mynomoto
The default lein template has clojure 1.5.1 hardcoded. It will only change when it's updated there. You can check the lein ancient help with `lein help ancient`. There you will find how to include clojure on the verification. HTH, Marcelo On Monday, May 5, 2014 4:10:38 PM UTC-3, g vim wrote: >

Problem when trying to import SAT4J java class

2014-05-05 Thread Ronan BARZIC
Hi, I'm trying to use the SAT4J java library (http://www.sat4j.org) from Clojure. I've create a clojure app with "lein new app sat4j-app" I've edited the project.clj file to : (defproject sat4j-app "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME"; :

Re: Why does `lein new` default to clojure 1.5.1?

2014-05-05 Thread Alex Miller
The default leiningen templates have already been updated to Clojure 1.6.0: https://github.com/technomancy/leiningen/commit/a296ff8918a581c975f49127d7e37a3f0c510d22 However, I don't think that change will be visible till the next lein release. On Monday, May 5, 2014 3:08:56 PM UTC-5, mynomoto w

Re: Problem when trying to import SAT4J java class

2014-05-05 Thread Jason Felice
The form should be: (:import [org.sat4j.core Vec]) ; note the square braces. On Mon, May 5, 2014 at 3:29 PM, Ronan BARZIC wrote: > Hi, > > I'm trying to use the SAT4J java library (http://www.sat4j.org) from > Clojure. > I've create a clojure app with "lein new app sat4j-app" > > I've edited t

Re: http-kit AsyncChannel and clojure.core.async.impl.channels.ManyToManyChannel

2014-05-05 Thread Valentin Luchko
Here is the gist https://gist.github.com/valichek/ba510de9ff2cf3d0c502 P.S. sorry if my first post was odd понедельник, 5 мая 2014 г., 20:03:09 UTC+3 пользователь Valentin Luchko написал: > > Could you explain me why after > clients;; => {# /0:0:0:0:0:0:0:1%0:<->/0:0:0:0:0:0:0:1%0:60071> tru

Re: JSON authentication with cemerick/friend?

2014-05-05 Thread Ivan Schuetz
Concerning the workflow with the ajax-login... for some reason the middleware to set params with json body of my POST isn't working. As a workaround I added this to ajax-login, to parse the params: (checore/parse-string (slurp (:body request)) true) I had also to remove the interactive-

Re: Managing State Changes, using Component

2014-05-05 Thread Timothy Washington
Ahh, so that was it then. Yeah, I definitely created that atom in the start method. Thanks very much. Tim Washington Interruptsoftware.com On Mon, May 5, 2014 at 3:27 PM, Stuart Sierra wrote: > At what point did you **create** the Atom in :a? Any mutable referen

Re: JSON authentication with cemerick/friend?

2014-05-05 Thread Sam Ritchie
(middleware/wrap-json-params) slurps the body up completely - this is a mutation, so you won't be able to access the body again. Ivan Schuetz May 5, 2014 3:49 PM Concerning the workflow with the ajax-login... for some reason the middleware to set params with

Re: JSON authentication with cemerick/friend?

2014-05-05 Thread Ivan Schuetz
The snippet provided by Eric doesn't use the body... it returns a function that accepts params as argument, but they were not being passed... body was set instead, that's why I added slurp. So maybe there's something wrong with the (middleware/wrap-json-params), because it's evidently not havi

Re: JSON authentication with cemerick/friend?

2014-05-05 Thread Ivan Schuetz
Sorry. I mean accepts the request map as an argument. This map doesn't contain the parameters. Am Dienstag, 6. Mai 2014 02:17:52 UTC+2 schrieb Ivan Schuetz: > > The snippet provided by Eric doesn't use the body... it returns a function > that accepts params as argument, but they were not being

Re: Converting sequence from sort into a list

2014-05-05 Thread Sean Corfield
My question would be: why do you specifically need a list? i.e., why isn't a sequence good enough? Sean On May 3, 2014, at 6:30 AM, Dave Tenny wrote: > After nosing around all I've come up with via clojure mechanisms is to use > (apply list (sort ...)). > It seems to work well enough for lists

Re: [ANN] packthread 0.1.0

2014-05-05 Thread Sean Corfield
A specific case: when I worked at Adobe, we could not use any open source library whose license was not one of a standard set of pre-approved licenses. During a license audit (oh joy!) I had to approach a couple of OSS projects we had started to use in order to persuade them to change their lice

clojure.zip: skip a node

2014-05-05 Thread Pascal Germroth
Hi, I'm using clojure.zip to edit a tree by visiting each location using zip/next, possibly using zip/replace to alter the tree. There are cases where I replace a part of the tree with another tree that will/must not be visited, but I couldn't find a good way to skip nodes, since (zip/next (zip

Re: JSON authentication with cemerick/friend?

2014-05-05 Thread Erik Bakstad
We're using a custom jsonparam-extractor middleware that basically does this: (update-in req [:params] assoc :json-params (read-json b true)) I should probably have clarified this, sorry. Also, we're not using form-login so I haven't tested if the two workflows work together. It shouldn't be a

Re: JSON authentication with cemerick/friend?

2014-05-05 Thread Erik Bakstad
We're using a custom jsonparam-extractor middleware that basically does this: (update-in req [:params] assoc :json-params (read-json (slurp (:body req)) true)) I should probably have clarified this, sorry. Also, we're not using interactive-form so I haven't tested if the two workflows work to