Re: [ANN] Clojure 1.7.0-alpha5 now available

2015-01-12 Thread Bronsa
Do the failing projects require AOT compilation? we used to see a similar exception in eastwood when reloading core.cache and one of the AOT patches committed can cause some namespaces to be reloaded Il giorno 12/gen/2015 02:17, "Sean Corfield" ha scritto: > I tried upgrading a few more apps and

Re: Default implementation for defprotocol

2014-11-17 Thread Bronsa
That's correct, the most specialized implementation is used. In the case where more there is no implementation more specialized than another (two interfaces are extended to a protocol and a class implements both) then an arbitrary implementation from the available ones will be selected. Extending

Re: thread-any macro "%>"

2014-11-15 Thread Bronsa
Looks like I've been too fast in my reply, looking at the docstring I see that I'm wrong and you're right. I didn't realize as-> could take more than one "body" On Sat, Nov 15, 2014 at 3:05 PM, Nicola Mometto wrote: > > as-> only binds the specified expression rather than each result in step > an

Re: Question regarding tools.analyzer.jvm and the :tag, :o-tag, and :class entries

2014-05-22 Thread Bronsa
Hi, When using tools.analyzer.jvm you have to remember that its primary use-case is as a front-end for a compiler, in this case :tag and :o-tag serve to inform tools.emitter.jvm when to emit a cast thus might not always reflect the :tag meta of the expression :form. Regarding the :tag/:o-tag diff

Re: *data-readers* with clojure.tools.reader -- No reader function for tag id

2014-05-12 Thread Bronsa
(binding [clojure.tools.reader/*data-readers* *data-readers*] (clojure.tools.reader/read ..)) is probably what you want. On Tue, May 13, 2014 at 12:17 AM, Sarkis Karayan wrote: > Hi everyone, > > I am trying to use clojure.tools.reader to read from a file and also > process datomic #db/id lit

Re: clojure.edn/read-string exceptions => nil

2014-01-16 Thread Bronsa
What you want is currently not possible. If you need this functionality, I'll take a patch for tools.reader that adds a :nil-on-unreadable option to clojure.tools.reader.edn/read. Il giorno 16/gen/2014 11.05, "t x" ha scritto: > Either you misunderstood my question or I misunderstood your answer

Re: [ANN] tools.analyzer(.jvm) 0.1.0-alpha1

2014-01-15 Thread Bronsa
It is definitely one goal of tools.analyzer/emitter to provide better error messages/info, tools.analyzer already provides some more analysis time checkes than Compiler.java and every exception thrown contins in its ex-data useful info. There's still plently of room for improvements on this side a

Re: should contains? throw an exception on sorted maps?

2013-08-03 Thread Bronsa
Ops, I didn't see Andy already replied, sorry for the unnecessary mail. On Sat, Aug 3, 2013 at 7:10 PM, Nicola Mometto wrote: > > http://dev.clojure.org/jira/browse/CLJ-1242 > > Jay Fields writes: > > > This: (contains? (sorted-map 1 2 3 4) :a) > > Results in this: ClassCastException java.lang.

Re: [GSoC 2013] CinC

2013-04-09 Thread Bronsa
Actually, I would be interested in doing this if still available :) On Mon, Mar 4, 2013 at 6:53 PM, Aaron Cohen wrote: > On Mon, Mar 4, 2013 at 11:26 AM, abp wrote: > >> Is this work related? >> >> http://clojurewest.org/sessions#martin >> https://github.com/kanaka/clojurescript >> > > Nope, c

Re: Understanding vars

2013-03-19 Thread Bronsa
critto: > On Tue, Mar 19, 2013 at 12:57 AM, Bronsa wrote: > >> If I remember correctly, this is a bug due to the fact that constant >> empty literals are handled in a special way from the compiler. >> >> > Interesting. I see you are correct that the problem only o

Re: Understanding vars

2013-03-19 Thread Bronsa
If I remember correctly, this is a bug due to the fact that constant empty literals are handled in a special way from the compiler. Il giorno 19/mar/2013 08.49, "Marko Topolnik" ha scritto: > The way speed is achieved for :const is that it is given the same >> treatment as Java's *compile-time co

Re: Namespaced symbols, and errors

2013-03-09 Thread Bronsa
Gary, ::foo/bar is valid syntax if foo is a valid namespace alias. Try: (alias 'foo 'clojure.core) ::foo/bar Il giorno 09/mar/2013 09.36, "Gary Verhaegen" ha scritto: > The reader basically transforms :: into :namespace/, which means that > the remaining part must be an unqualified symbol (i.e.

Re: Performance issue with hashing records

2013-02-06 Thread Bronsa
2013/2/6 Christophe Grand > Hi > > On Mon, Feb 4, 2013 at 2:29 PM, AtKaaZ wrote: > >> => (class {:x "a" :y 3}) >> clojure.lang.Persistent*Array*Map >> => (def m {:x "a" :y 3}) >> #'runtime.q/m >> => (class m) >> clojure.lang.Persistent*Hash*Map >> > > huh? that one I can't explain, I'll have to

Re: Natively Compiled Clojure

2013-01-21 Thread Bronsa
It is also not longer actively mantained. https://github.com/bagucode/clj-native/issues/6#issuecomment-11930841 2013/1/21 Chouser > I'm pretty sure clj-native is more recent, faster, better, and more > actively maintained. I ought to update clojure-jna to say all that. > > > On Mon, Jan 21, 2013

Re: clojure defining a var with a dot in the name is accepted in clojure 1.5-RC1, but probably shouldn't?

2012-12-22 Thread Bronsa
2012/12/23 Stuart Sierra > On Saturday, December 22, 2012 3:34:52 PM UTC-5, Borkdude wrote: > > Clojure lets me define a var which name contains a dot, > > but I can't dereference it by name (because it is seen as > > a classname with a method or field). Clojure shouldn't let > > me let define it

Re: [ANN] CJD 0.1.0, a documentation technology for Clojure programs

2012-12-18 Thread Bronsa
Awesome! 2012/12/18 greenh > I'd like to announce the availability of CJD 0.1.0. > > CJD is a technology for documenting Clojure programs which I devised to > satisfy my idiosyncratic documentation-related propensities. It's mostly > complete, so I thought I'd share it with the community just in

Re: Clojure contrib datalog

2012-12-10 Thread Bronsa
There's also https://github.com/fogus/bacwn 2012/12/10 Alexander Solovyov > Hi, > > I don't think it's maintained somewhere (at least I haven't seen > anything), but at some point in past I extracted it from sources of > clojure-contrib and put it on github (with few updates to code, nothing > m

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread Bronsa
what about using <= as sorting fuction? 2012/11/20 JvJ > First of all: I don't EXACTLY mean duplicate elements. I just mean > duplicates in those parts of the elements which are compared. > > For instance, I recently tried to have a sorted set of 2-element vectors > where the comparator < was

Re: [Ann] Kibit 0.0.6

2012-11-12 Thread Bronsa
it is not always true that using vec is equal to using "into []" user=> (require '[clojure.core.reducers :as r]) nil user=> (r/map inc (range 2)) # user=> (into [] *1) [1 2] user=> (vec *2) RuntimeException Unable to convert: class clojure.core.reducers$folder$reify__407 to Object[] clojure.lang.U

Re: unseq

2012-11-06 Thread Bronsa
What about using destructuring? (defn F [[a b c d]] (+ a b c d)) 2012/11/6 the80srobot > If I understand this right, you're looking for something like Lua's unpack > function. AFAIK you will not be able to do this in Clojure using functions, > because Clojure functions can only return one argume

Re: "A Practical Optional Type System for Clojure"

2012-10-25 Thread Bronsa
Hi Ambrose, great work! I found a typo on page 14, you wrote "... equivalent to [-> (U nil String] in Typed Clojure" 2012/10/25 Ambrose Bonnaire-Sergeant > Hi, > > I have submitted my honours dissertation for marking, for those > interested: https://github.com/downloads/frenchy64/papers/paper.p

Re: Calling name on a keyword gives nil??

2012-10-22 Thread Bronsa
I've had this happening to me too. Couldn't figure out wtf was going on. Until somebody understands what's the problem is, you can(let [s (.sym ^clojure.lang.Keyword k)] ..) and call name on s 2012/10/22 JvJ > I'm getting a REALLY weird error. I'm trying to check if a set of > keywords are all

Re: [ANN] neurotic-0.2.1 and blind-0.2.2

2012-10-18 Thread Bronsa
In these days I've released a new version of neurotic To use it simply put on your project.clj [bronsa/neurotic "0.3.3"] With the 0.3.3 release neurotic fully supports implementing deftrait from: deftype, defrecor, extend and extend-type. Error messages has also been improved. A

Re: [ANN] neurotic-0.2.1 and blind-0.2.2

2012-10-18 Thread Bronsa
file or change the reader? > > Thanks. > > > On Sun, Oct 14, 2012 at 3:14 PM, Bronsa wrote: > >> Neurotic is a library that implements a `deftrait` macro and support for >> implementing those traits in `deftype`/`defrecod` >> >> The purpose of this library is to

[ANN] neurotic-0.2.1 and blind-0.2.2

2012-10-14 Thread Bronsa
interfaces instead of clojure protcols, where `extend` would simply be impossible to use. https://github.com/Bronsa/neurotic Blind is a complete implementation of the clojure reader written in clojure, based on `clojure.lang.LispReader` and `cljs.reader` https://github.com/Bronsa/blind More

Re: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Bronsa
Starting two different projects at the same time with almost the same purpose seems a waste of efforts... Wouldn't it be better for readevalprintlove and clojuredocs to join forces from the beginning? 2012/10/4 Laurent PETIT > 2012/10/4 Paul deGrandis > >> This is great to see. Along side effo

Re: problem 58 on 4clojure

2012-08-25 Thread Bronsa
its* 2012/8/25 Bronsa > check out clojure.core/comp, and it's source > > > 2012/8/25 John Holland > >> This problem is really confusing me. I found a solution online, but I >> can't understand the solution. Can anyone explain to me why this >

Re: problem 58 on 4clojure

2012-08-25 Thread Bronsa
check out clojure.core/comp, and it's source 2012/8/25 John Holland > This problem is really confusing me. I found a solution online, but I > can't understand the solution. Can anyone explain to me why this > works? > > The problem is stated as: > > > > Write a function which allows you to creat

Re: anonymous fns won't work in seesaw...

2012-08-17 Thread Bronsa
this is because the #() checks for arguments used inside its body to infer its arity. in #(alert "..") you don't use any arg so it creates a function with no argument, such as doing (fn [] ..) Il giorno 17/ago/2012 11.50, "Jim - FooBar();" ha scritto: > Hi everyone, > > I was surprised to discov

Re: assoc! order problem

2012-08-05 Thread Bronsa
because of performance reasons, hash-maps are not ordered. the fact that they are ordered for the first 32 elements is just an implementation detail you shouldn't rely on Il giorno 05/ago/2012 10.10, "llj098" ha scritto: > thanks for reply, > > I know the sorted-map, but my question is : *why the

Re: assoc! order problem

2012-08-04 Thread Bronsa
Note that you can't use a sorted-map in a transient 2012/8/4 Jeff Heon > You are using the map literal, which corresponds to the hash map. > > Use this if you want a sorted map: > http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/sorted-map > > -- > You received this message b

Re: Any downside of record compared to map

2012-07-23 Thread Bronsa
there's also the reader literal user=> (defrecord foo [bar baz]) user.foo user=> #user.foo{:baz 1 :bar 2} #user.foo{:bar 2, :baz 1} 2012/7/23 Takahiro Hozumi > Baishampayan > I didn't know `map->Foo`. Thank you for the infomation! > > > On Monday, July 23, 2012 2:11:45 PM UTC+9, Baishampayan G

Re: Strange evaluation result of the quoted form on 1.3

2012-06-07 Thread Bronsa
o 1 2 3 4) -> arity exception. > > четверг, 7 июня 2012 г., 20:05:43 UTC+4 пользователь Bronsa написал: > >> you' are calling (apply 'foo '(1 2)), what you want is (apply foo '(1 2)) >> just call bar as >> (bar (list foo 1 2)) >> >> 2

Re: Strange evaluation result of the quoted form on 1.3

2012-06-07 Thread Bronsa
you' are calling (apply 'foo '(1 2)), what you want is (apply foo '(1 2)) just call bar as (bar (list foo 1 2)) 2012/6/7 Alex Shabanov > I'm curious why the following form evaluates to 2: > > (defn foo [& more] > (println "foo(" more " )")) > > (defn bar [v] > (apply (first v) (rest v))) > >

Re: "when" function

2012-05-21 Thread Bronsa
or simply use `case` (case group-identifier "ID1" (handle-id1 line) "ID2" (handle-id2 line) "ID3" (handle-id3 line)) 2012/5/21 Timothy Baldridge > In this case I prefer either: > > (cond (= group-identifier "ID1") >(handle-id1 line) > (= group-identifier "ID2")

Re: Disable name mangling for 'static'

2012-04-24 Thread Bronsa
This should fix it http://dev.clojure.org/jira/browse/CLJS-202 2012/4/24 Chris Granger > If I remember right, I did this as a workaround: > > (js/my.ns.express.static "public") > > Cheers, > Chris. > > On Apr 24, 12:33 pm, David Nolen wrote: > > It's a known bug. We should not munge JS reserved

Re: Precondition asserts in macros

2012-03-20 Thread Bronsa
try with {:pre [(string? (eval bar))]} -- 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 that posts from new members are moderated - please be patient with your first post. To unsubscri

Re: (.containsKey {:one 1} :one) throws Exception

2012-03-03 Thread Bronsa
not sure why, but this works: user=> (.containsKey ^clojure.lang.Associative {:one 1} :one) true 2012/3/3 Alf Kristian Støyle > Hi guys, I am wondering why this does not work: > > (.containsKey {:one 1} :one) > ;=> ClassCastException clojure.lang.PersistentArrayMap cannot be cast to > clojure.

Re: Distributed transactions

2011-12-31 Thread Bronsa
maybe avout is what you're looking for? https://github.com/liebke/avout 2011/12/31 Michael Jaaka > Is there any attempt to make distributed transactions? > The usage scenario is the same like in JEE apps. > I mean, there is a web service call, the transaction is started, there > are some changes

Re: Really loving Clooj but..

2011-12-29 Thread Bronsa
you are invoking the function in the wrong way what you really want to do is this: user> (min-1 2 1 3) 1 2011/12/29 Erlis Vidal > Hi guys, > > I've using Clooj and following the labrepl but I'm hitting a wall right > now. How can I debug here? > > This the code I want to debug > > (defn min-1

Re: how to use record as a value

2011-10-06 Thread Bronsa
is it ->record just a shortrand for record.? 2011/10/6 Aaron Bedra > Assuming you want to do things with the record later, why not just > create it in the let binding > > (let [foo (->car 1982 "Mercedes")] > ...) > > or > > (let [foo (car. 1982 "Mercedes")] > ...) > > or even > > (let [foo (ma

Re: clojure.core.logic.core/match usage

2011-10-03 Thread Bronsa
I *think* this is because when there are multiple matches, the most specialized matches and 1 is less generic than _ On Mon, Oct 3, 2011 at 12.39 PM, "Sunil S Nandihalli" < sunil.nandiha...@gmail.com> wrote: > > If I remove the line [{:a 1 :c _}] :a1 it returns :a-1 .. So, I guess it means that the

Re: Does macros evaluates its arguments before?

2011-09-26 Thread Bronsa
oh, that's right 2011/9/26 Alan Malloy > Noo, then you can't do, for example, (let [x 1] (infix (x + 1))). > > On Sep 26, 8:34 am, Bronsa wrote: > > or simply replace ~e with '~e > > -- > You received this message because you are subscribed to the Goo

Re: Does macros evaluates its arguments before?

2011-09-26 Thread Bronsa
or simply replace ~e with '~e -- 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 that posts from new members are moderated - please be patient with your first post. To unsubscribe from t

Re: Re: lein repl newbie question

2011-09-23 Thread Bronsa
wrote: > > well, I was doing control+c which works too. How is control+d different? > > > On , Islon Scherer wrote: > > Have you tried control+d? > > > > > > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Clojure" group. > > > > To post to th

Re: Clojure embedded in a Java Application

2011-09-16 Thread Bronsa
The problem could be that #{} in clojure is a set literal, try using clojure.lang.PersistentHashSet/create > > Hi > > I'm new to Clojure so forgive me if this is a dumb question. I want > to incorporate some Clojure into a Java application. > >String rule="(str key val label)"; >

Re: Deamons in Clojure (was Re: Clojure vs Scala - anecdote)

2011-09-07 Thread Bronsa
the lein-daemon plugin seems to do that Il giorno 07/set/2011 16.27, "Marko Kocić" ha scritto: > While we are at this topic, how do you run Clojure deamons. Do you have some > scripts to set it up how? > Is there a simple way to daemonize lein project? > > Regards, > Marko > > -- > You received th

Re: help with some code

2011-07-12 Thread Bronsa
this is because in order to use ~ to evaluate the fn, you need to use the backtick ` instead of the single quote ' Il giorno 13/lug/2011 00.34, "Paul Meehan" ha scritto: > > Sorry to repoen the discussion, but I got this: > > > => (def alist '(1 ~(fn [x y](+ x y > #'user/alist > > => (apply (s

Re: Native compiler on Clojure

2011-07-11 Thread Bronsa
i think he means clojure in clojure Il giorno 11/lug/2011 12.12, "Philipp Meier" ha scritto: > On 11 Jul., 00:26, cran1988 wrote: >> Did anyone started creating native compiler for Clojure language ? > > Do you mean a compiler which emits native code or do you mean a > compiler > written in cloju