This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-21
Channels
- # arachne (21)
- # beginners (22)
- # boot (58)
- # cider (27)
- # cljs-dev (67)
- # cljsjs (10)
- # cljsrn (13)
- # clojure (91)
- # clojure-greece (6)
- # clojure-russia (1)
- # clojure-uk (6)
- # clojurescript (6)
- # core-async (3)
- # cursive (6)
- # datomic (3)
- # events (2)
- # hoplon (152)
- # off-topic (44)
- # om (8)
- # om-next (7)
- # onyx (16)
- # protorepl (10)
- # re-frame (10)
- # reagent (22)
- # untangled (5)
@seancorfield !! 😄 it works
thanks for your good juju
Is it ok to publish Clojure applications (as opposed to libraries) to http://clojars.org ?
Tangentially, I'm wondering what the best way to publish a Clojure Swing app would be. How do you package a cross-platform GUI app written in Clojure?
It doesn’t really make sense to publish an application to http://clojars.org since it wouldn’t be used as a JAR dependency in another program @beppu
As for packaging an app, you want to build an uberjar — a JAR that includes Clojure and all other dependencies — so you can just run it with java -jar path/to/the.jar
@seancorfield Thanks for the feedback. If possible, I'd like to find a tool that can take an uberjar and make it something that can be opened via doubleclicking.
I thought double-clicking a JAR file ran it?
Does it? I don't normally open apps that way since I'm a command line junkie. (I was just trying to be considerate to non cli people.)
@seancorfield It works (as long as I set the executable bit). Cool. Now, I just need to figure out how to set an icon for an uberjar.
https://metametadata.wordpress.com/2016/01/25/how-to-package-a-clojure-desktop-app-for-mac-os-x/
Hi, what is idiomatic way in Clojure to build a double linked list and keep track of what element you last time where reading to easily go to previous or next element.
You can of course just use norma list, and you take-while/drop-while to find the last read place, but that doesn't feel very elegant
@neurogoo What you want is a functional Zipper 🙂 https://en.wikipedia.org/wiki/Zipper_(data_structure)#Example:_Bidirectional_list_traversal
no problem, here's a quick demo:
user=> (require '[clojure.zip :as zip])
nil
user=> ;; create a zipper, descend down to the first element
user=> (def my-zipper (zip/down (zip/vector-zip [1 2 3 4 5])))
#'user/my-zipper
user=> ;; get current element
user=> (zip/node my-zipper)
1
user=> ;; move right, get element
user=> (zip/node (zip/right my-zipper))
2
user=> ;; and again...
user=> (zip/node (zip/right (zip/right my-zipper)))
3
user=>
I think I've seen a function/form that takes a Clojure var and returns a unique ID for the object it references. I can't seem to find it lately though. Is that a real thing?
I'm looking to enforce a consistent (but arbitrary) order on collections of arbitrary things. Using .hashCode isn't guaranteed unique and probably has some overhead. There are those times where you're trying to print a map or something to console and instead you see [object/type]/#[some uuid-looking string]. That seems like it might be unique per object and, if you can get it on-purpose, maybe the best thing on which to sort.