Re: Trying to make an uberjar

2017-03-03 Thread Jeaye
On Sat, Mar 04, 2017 at 08:09:39AM +0100, Cecil Westerhof wrote: > 2017-03-04 7:44 GMT+01:00 Jeaye : > > > Cecil, > > > > > But when running: > > > lein uberjar > > > I still get: > > > This code is executed when starting Clojure. > > > Compiling quotes.core > > > Warning: The Main-Class speci

Re: Trying to make an uberjar

2017-03-03 Thread Cecil Westerhof
2017-03-04 7:44 GMT+01:00 Jeaye : > Cecil, > > > But when running: > > lein uberjar > > I still get: > > This code is executed when starting Clojure. > > Compiling quotes.core > > Warning: The Main-Class specified does not exist within the jar. It may > not > > be executable as expected. A gen

Re: Trying to make an uberjar

2017-03-03 Thread Jeaye
Cecil, > But when running: > lein uberjar > I still get: > This code is executed when starting Clojure. > Compiling quotes.core > Warning: The Main-Class specified does not exist within the jar. It may not > be executable as expected. A gen-class directive may be missing in the > namespace whi

Re: Contribute Specter to Clojure core?

2017-03-03 Thread Asim Jalis
What might be a Clojurey syntax for doing path navigation? In other words how could get-in be extended so that it could parse nested vectors like it parses nested maps? Thinking out aloud, an integer in the path when the data structure at that level is a vector should treat the integer as an index.

Trying to make an uberjar

2017-03-03 Thread Cecil Westerhof
Until now I can run my project without a problem with: lein trampoline run & But I was told that I should use an uberjar. My project.clj was: (defproject quotes "0.0.1" :description "Initial quotes application" :url "http://example.com/FIXME"; :dependencies [[org.clojure/clojure

Re: Contribute Specter to Clojure core?

2017-03-03 Thread Mars0i
I've never used Specter, but my needs are modest compared to some Clojure programmers'. (Great introductory blog post, Nathan, btw.) Intuitively, it feels to me like Specter is too big of a monster to be in core. I am not surprised that that's not going to be an option. The idea of making

lein jar, uberjar don't allow hyphens in paths?

2017-03-03 Thread Mars0i
It looks like 'lein uberjar' and 'lein jar' don't like namespace path elements that contain hyphens. Example: lein new app foo-bar cd foo-bar Now edit src/foo_bar/core.clj, changing (ns foo-bar.core (:gen-class)) to (ns foo-bar.core (:gen-class :name foo-bar.core)) Then 'lein uberja

1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-03 Thread Mars0i
I have a working application that I've been developing using Clojure 1.8.0, and just tried it with 1.9.0-alpha14 on it. This generated a bunch of errors that look something like this: In: [3 :methods 32 2] val: java.lang.Object fails spec: :clojure.core.specs/method at: [:args :clauses :gen-cl

Re: Contribute Specter to Clojure core?

2017-03-03 Thread John Newman
I think the path navigator DSL feels slightly un-Clojurey. But other than that, I think Specter is pure magic and Nathan is right that editing deeply nested data structures in Clojure is a point of deficiency, especially for people coming from mutable languages/data structures. To that extent, I th

Re: Making a Java class implement ILookup

2017-03-03 Thread William la Forge
On Friday, March 3, 2017 at 9:42:30 AM UTC-5, Ernesto Garcia wrote: > > > Can you point out to some implementation of this kind? I don't know what > you are referring to here. Would AOT compilation help in my case? > > In the clojure toolbox, the first entry under data structures is aatree: htt

Re: Clojurescript 1.9.493+ breaks core.async with :advanced optimizations

2017-03-03 Thread Kenny Williams
Yup, it is a known issue. See http://dev.clojure.org/jira/browse/CLJS-1954. On Friday, March 3, 2017 at 2:44:52 PM UTC-8, Chad Harrington wrote: > > I believe that cljs versions 1.9.493 and above break core.async (and > possibly other libraries) under :advanced optimizations. > > Here is a mini

Clojurescript 1.9.493+ breaks core.async with :advanced optimizations

2017-03-03 Thread Chad Harrington
I believe that cljs versions 1.9.493 and above break core.async (and possibly other libraries) under :advanced optimizations. Here is a minimal reproduction: In src/ca_adv_bug/core.cljs: (ns ca-adv-bug.core (:require [cljs.core.async :as ca] [cljs.nodejs :as nodejs]) (:require-macros

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

2017-03-03 Thread Alex Miller
Note that using the auto-promoting ops will automatically overflow into an arbitrary precision type: user=> (*' 3037000500 3037000500) 922337203700025N user=> (*' 1000 1000) 100N The trailing N indicates the arbitrary precision integer. On Friday, March 3

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

Application silently shuts down by itself after running for some hours

2017-03-03 Thread JokkeB
I have an application which I run with "lein run". The main looks something like this (defn -main [] (log/info "start") (log/info "channel returned" (async/http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: Vars as global thread-locals?

2017-03-03 Thread Ernesto Garcia
On Sunday, February 26, 2017 at 6:23:28 AM UTC+1, Didier wrote: > > Dynamic scoping and Java ThreadLocals gives you equal functionality, so > I'd use them equally. This is because Clojure supports thread bound dynamic > scope. > I wouldn't say that. While dynamically scoped Vars are meant to be

Re: Making a Java class implement ILookup

2017-03-03 Thread Ernesto Garcia
On Thursday, March 2, 2017 at 3:36:53 AM UTC+1, William la Forge wrote: > > Alternative implementations for clojure maps are hard. You tend to use AOT > a lot, which is non-idiomatic. But a number of people have done this, > including myself. In retrospect, it isn't worth it. At least not most of

Re: Making a Java class implement ILookup

2017-03-03 Thread Ernesto Garcia
On Wednesday, March 1, 2017 at 3:21:51 AM UTC+1, Mikera wrote: > > You might want to try implementing a small wrapper class that implements > ILookup. > > Then you can do something like: > > (:keyword (MyWrapper. my-obj)) > Yeah, but to be more convenient, it would need to return a wrapper in cas

is it a bug in clojure? unchecked-multiply

2017-03-03 Thread BongHyeon. Jo
3037000500 * 3037000500 = 922337203700025 1000 * 1000 = 100 ( 10^11 * 10^11 = 10^22) but , in clojure user=> (unchecked-multiply 3037000500 3037000500) -92233720

GSoC 2017 - KLIPSE

2017-03-03 Thread Maitreya Verma
Hello, I am Maitreya Verma, second year undergrad student. I am very enthusiastic to work on the idea of adding cool features to KLIPSE for GSoC. There are many other ideas which I think can be implemented on this plugin. Can anybody guide me on how can I work on this plugin. I am quite profei

Re: Making a Java class implement ILookup

2017-03-03 Thread Ernesto Garcia
On Tuesday, February 28, 2017 at 9:40:12 PM UTC+1, Alex Miller wrote: > > If it follows Java bean semantics, you can use the `bean` function to view > it as a map with properties as keys. > The class is not actually a bean. It contains a map, with a .getPropertyValue method, but it doesn't impl