Re: New Clojurescript Project: browsing the web collectively.

2012-12-27 Thread Vinzent
Wow! It looks really cool! I was unable to install the Chrome extension from the site though. I wish you good luck! суббота, 1 декабря 2012 г., 10:45:24 UTC+7 пользователь Jeremy Kross написал: > > Hi all, > > I wrote a little thing in Clojurescript. Hopefully someone here will find > it inter

Re: Question about sets

2012-08-05 Thread Vinzent
eld написал: > > On Sun, Aug 5, 2012 at 3:33 AM, Vinzent wrote: > > Also, I have a huge number of literal vectors with expressions inside > > (typical example: (let [[x y] coll] ...) is an equvalent to [(coll 0) > (coll > > 1)]). > > A destructuring vector is n

Re: Question about sets

2012-08-05 Thread Vinzent
I agree with puzzler and Alex. Also, I have a huge number of literal vectors with expressions inside (typical example: (let [[x y] coll] ...) is an equvalent to [(coll 0) (coll 1)]). -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: record constructor

2012-08-05 Thread Vinzent
+1 for Warren's proposal. I thought about the same thing earlier, but haven't shared it with community because I believed it'd be rejected. Though, I don't see how OOP relates to the topic of this discussion. Records are not objects; they are rather typed maps. Everyone writes that "constructor

Re: auxiliary methods like :before and :after for multimethods?

2012-07-28 Thread Vinzent
> robert.hooke works fine with multimethods: > > user=> (defmulti foo class) > nil > user=> (defmethod foo :default [x] (str x)) > # > user=> (require '[robert.hooke :refer (add-hook)]) > nil > user=> (add-hook #'foo (fn [f & [x]] (str "K: " (f x > (#) > user=> (foo 42) > "K: 42" >

Re: Problems extending sequences

2012-07-28 Thread Vinzent
nth is used by the clojure printer (see print-method). Try the following code: (do (ConsCell. 1 nil) :ok) It looks like you have to implement Sequential in order to get nth working on your datasctructure. суббота, 28 июля 2012 г., 10:33:48 UTC+6 пользователь JvJ написал: > > I'm trying to creat

Re: Extending protocol for maps

2012-07-28 Thread Vinzent
You can implement the clojure.lang.IPersistentMap interface if you want to create your own map type. суббота, 28 июля 2012 г., 8:09:05 UTC+6 пользователь JvJ написал: > > Is there a way to extend whatever protocol is used by Clojure maps (struct > maps, array maps, hash maps, etc.)? -- You rec

Re: auxiliary methods like :before and :after for multimethods?

2012-07-28 Thread Vinzent
ions and multimethods in this case. суббота, 28 июля 2012 г., 9:37:57 UTC+6 пользователь George Oliver написал: > > > > On Friday, July 27, 2012 12:06:33 PM UTC-7, Vinzent wrote: >> >> robert-hooke actualy doesn't work with multimethods afaik. You can try my >> ne

Re: Experiences developing a crowdfunding site for open source projects in Clojure (from a Python background)

2012-07-27 Thread Vinzent
against that. > Perhaps I should? > > On Friday, July 27, 2012 2:37:51 PM UTC-5, Vinzent wrote: >> >> Very cool! Thanks for sharing. It's interesting to read such a detailed >> report about experience with the language. >> >> Unfortunately, I can

Re: Experiences developing a crowdfunding site for open source projects in Clojure (from a Python background)

2012-07-27 Thread Vinzent
Very cool! Thanks for sharing. It's interesting to read such a detailed report about experience with the language. Unfortunately, I can't access your site: http://kodefund.com/ gives me "The domain name you have requested isn't available". The idea sounds good though, and I'll definitely try ko

Re: auxiliary methods like :before and :after for multimethods?

2012-07-27 Thread Vinzent
robert-hooke actualy doesn't work with multimethods afaik. You can try my new library (https://github.com/dnaumov/hooks), but it's alpha (no docs yet, sorry). Any suggestions about API is welcome. пятница, 27 июля 2012 г., 3:15:44 UTC+6 пользователь George Oliver написал: > > hi, I'm wondering

Re: Protocol specific type hierarchy

2012-07-05 Thread Vinzent
> You can get hold of a protocol's implementation for a particular type > if it was attached to a type with extend / extend-type / > extend-protocol: > Yes, but it's unofficial, undocumented and, as you've stated already, can't be used with inlined implementations. > Implementations spec

Re: Using type hints to document return types

2012-07-03 Thread Vinzent
See http://kotka.de/blog/2012/06/Did_you_know_IX.html. I'd propose to use Trammel or clojure-contracts for such purpose. https://github.com/fogus/trammel https://github.com/dnaumov/clojure-contracts вторник, 3 июля 2012 г., 17:16:15 UTC+6 пользователь skuro написал: > > Hi *, > > I'm developing

Re: Protocol specific type hierarchy

2012-07-03 Thread Vinzent
think it'd be a good idea to implement proof-of-concept of what you have in mind and publish it on Github, so people could try it and compare to what they already have. вторник, 3 июля 2012 г., 21:13:27 UTC+6 пользователь Warren Lynn написал: > > > > On Tuesday, July 3, 2012 4:18

Re: Protocol specific type hierarchy

2012-07-03 Thread Vinzent
I believe the protocol's analogue for get-method would be enough. вторник, 3 июля 2012 г., 2:58:49 UTC+6 пользователь Warren Lynn написал: > > When I re-read the thread "defrecord with inheritance" > > https://groups.google.com/forum/?fromgroups#!searchin/clojure/inherit/clojure/mr-o9sRyiZ0/oM4zRz

Re: Protocol as an abstract data type

2012-07-02 Thread Vinzent
IIndexed is the protocol that maps to nth. Well, IIndexed is the protocol behind -nth, and some dispatching also happens in nth itself. So there is two levels of dispatch: in the nth function (closed) and in the IIndexed protocol (open). See the Michał Marczyk's comment about IIndexable and

Re: 'last' on empty collections

2012-07-02 Thread Vinzent
This decision definitely is a part of clojure design; as far as I can tell, clojure tends to not throw an exception unless the input is terribly wrong (e.g. can't be converted to a seq in your case). Of course, it has some drawbacks, but is pretty convenient for the programmer and doesn't cause

Re: Protocol as an abstract data type

2012-07-01 Thread Vinzent
Extend on nil, IIndexed and default (I realize that it's currently impossible in cljs). воскресенье, 1 июля 2012 г., 18:39:27 UTC+6 пользователь David Nolen написал: > > How do you think the conditionals can be removed? > > On Sunday, July 1, 2012, Vinzent wrote: > >&g

Re: Protocol as an abstract data type

2012-07-01 Thread Vinzent
Just an idea: predicate dispatch can be combined with protocols into one thing, eliminating the need for defrecord-like things at all. Low level types defined with deftype, higher-level abstractions defined with that "dynamic protocols" thing. It'd be fun to play with it :) Don't you think the

Re: Why cannot "last" be fast on vector?

2012-07-01 Thread Vinzent
I fully support Warren's point of view. I'm also unhappy with current behaviour of sequence functions (more accurate: I think it can be made even better). In my mind, protocols (interfaces?) based, polymorphic core functions is just what we need. Moreover, similar request has been done already

Re: Would a"def-" macro for private varibales make sense?

2012-06-30 Thread Vinzent
It's better to use ^:private metadata on the symbol naming the var, since there is also defmacro, defmulti, etc, which not have hyphened versions too. суббота, 30 июня 2012 г., 17:49:36 UTC+6 пользователь Goldritter написал: > > For functions I have a "defn" macro to create public functions and a

Re: {ANN} Project Docs and Examples ... at the Alcove

2012-06-24 Thread Vinzent
One thing I forgot to mention: it'd be nice to have Marginalia support, since it can be used not only for annotated source code, but also for documentation with embedded tests (although, two-column layout doesn't fit very well for this purpose, but it's another question). > That's true. The

Re: {ANN} Project Docs and Examples ... at the Alcove

2012-06-24 Thread Vinzent
It's a great initiative indeed, but I found the project pretty useless in its current state. Forking the repo and sending a pull request just to add an example is painful. Also, I can read rendered readme on github (and have the source code at hand), so why go to another site? I think what woul

Re: struggling with two simple list of lists operations

2012-06-24 Thread Vinzent
I guess you should use vectors, since you can't effectively add an element to the end of list. понедельник, 25 июня 2012 г., 0:46:24 UTC+6 пользователь Andy C написал: > > Hi, > > I am looking for two seemingly simple operations which require adding > to the list: > > (( 1 2 ) ( 20 30) (40))

Re: How to convert a python list to clojure?

2012-06-24 Thread Vinzent
I think versions with `for` is a hell more readable. I vote for this: (def cc (for [i (range 256)] (.GetColor ctf (/ i 255.0 воскресенье, 24 июня 2012 г., 16:15:14 UTC+6 пользователь Michael Klishin написал: > > Antonio Recio: > > > And I would know if this is correct conversion in c

Re: Little question about doto?

2012-06-23 Thread Vinzent
Well, yes, you've written it right: (doto sphere (.SetColor red) (.SetPosition 5 5 0)) ... or what the question was about? суббота, 23 июня 2012 г., 19:21:18 UTC+6 пользователь Antonio Recio написал: > > I create a white sphere at the beginning of my code, and later, after some > lines of c

Re: One little question about vectors and nth?

2012-06-23 Thread Vinzent
You're passing one argument, a list contaning 3 elements, instead of 3 arguments. Try this (by the way, you can omit nth call): (.SetOrigin cone (v 0) (v 2) (v 3)) Another option (not really relevant in this particular case) is to use memfn: (apply (memfn SetOrigin) cone [2 4 6]) суббота, 23

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-23 Thread Vinzent
> > Our web stack is built on small libraries building on eachother's > strengths, could we do the same here ? > Yeah, that's exactly what I had in mind. Just like Ring, c.j.jdbc could accept maps and generate corresponding sql code, thus eliminating the need to write a compiler for each sql D

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-22 Thread Vinzent
> > given java.jdbc's position as the sort of lower level glue all these > libraries are built on, maybe better then including a DSL in java.jdbc > would be including an AST (some data representation of sql) and a > compiler for same. > Yeah, that's exactly what I wanted to suggest too. Seems

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-21 Thread Vinzent
Actually, jsql looks very much like clojureql\korma. Honetly, I wish see better support for clojureql rather than new similar DSLs coming up. четверг, 21 июня 2012 г., 11:36:24 UTC+6 пользователь Sean Corfield написал: > > Just two changes in this release: > > * as-str now treats a.b as two iden

Re: Standard alias for partial?

2012-06-20 Thread Vinzent
Why it has to be reader macro? I don't see any reason. среда, 20 июня 2012 г., 0:56:15 UTC+6 пользователь Jay Fields написал: > > I'd actually like to see %(...) become (partial ...), as I think > people associate % with anonymous functions. Which is why I chose (% > ...), as it's close to what

Re: Doseq, map-style

2012-06-18 Thread Vinzent
Yeah, I'm waiting for concrete example too. By the way, if you really need to change :area from value to deferred computation then you can just change your data structure implementation from hash-map to lazy map (i.e. a map whose values are delays deref'd on access). This would require changing

Re: Doseq, map-style

2012-06-17 Thread Vinzent
> > That is my point, representations SHOULD be considered implementation > details, because representations change... if you treat them as contracts > your code will break everywhere, if you wrap them with abstractions your > code will only need to change in one place... > As I mentioned ab

Re: Docstring state deftype, defrecord etc. are still alpha?

2012-06-17 Thread Vinzent
I still hope we'll get rid of those ugly ->Foo constructors some day. Also, protocols aren't fully implemented yet (no way to get implementation of a protocol for the given type, no way to resolve confilcts (like prefer-method), etc) суббота, 16 июня 2012 г., 13:24:04 UTC+6 пользователь Las нап

Re: Doseq, map-style

2012-06-17 Thread Vinzent
> > Data structure is an implementation detail... > It's not. Not in clojure. It is in OO, but clojure is not an OO language, so it's not an implementation detail in clojure. > interfaces are contracts, if the data representation changes in OO you > need only change one class... > Well, bu

Re: Doseq, map-style

2012-06-17 Thread Vinzent
> > Yes it is... emails was not the best example in this case.. think the > "area" example instead as this is single value rather than collection. > Well, I thought we've already came to the agreement that area is a (polymorphic) function and it has nothing to do with structure of your data,

Re: Doseq, map-style

2012-06-17 Thread Vinzent
> > A really good clojure specific example of data vs api is the discussion >> regarding if the clojurescript analyzer should contain children or if >> children should be a multimethod >> https://groups.google.com/forum/m/?fromgroups#!topic/clojure-dev/vZLVKmKX0oc > > By the way, I have read t

Re: Doseq, map-style

2012-06-17 Thread Vinzent
> > This still requires changing your code to @(:emails contact). If you use >>> (emails contact) you need change your code in only one place. >>> >> The name "emails" implies that it's a sequence. Lazy sequence. > Property is just the OO word for function, semantically they are the same.

Re: Doseq, map-style

2012-06-17 Thread Vinzent
Well, if those assertions are violated, you can't do anything with it anyway - you program is written wrong and you have to release new version which'll fix it. воскресенье, 17 июня 2012 г., 1:41:17 UTC+6 пользователь Alex Baranosky написал: > > To test for violations of those assertions, possi

Re: separating protocols from records problem...

2012-06-17 Thread Vinzent
You're welcome :) -- 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 this group, s

Re: separating protocols from records problem...

2012-06-17 Thread Vinzent
Forget about .method thing. It's an interop form and, strictly speaking, has nothing to do with protocols. The fact that defining record with protocol implementation inline will create class with corresponding methods is just an implementation detail. Protocol functions are just functions; you

Re: Catnip

2012-06-17 Thread Vinzent
Never heard of it before, but it seems interesting. Thank you for pointing to it. воскресенье, 17 июня 2012 г., 5:51:33 UTC+6 пользователь Christian Guimaraes написал: > > Hi, > > Anybody here already used "catnip" (https://github.com/bodil/catnip) to > do some web developement? I saw this vide

Re: Doseq, map-style

2012-06-16 Thread Vinzent
> > I actually think assertions should stay _on_ in production > Why? Could you please elaborate more on it? -- 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 memb

Re: Doseq, map-style

2012-06-16 Thread Vinzent
> > I agree, an explicit type field makes dispatching easy. However this data > structure returned by (http/get ... :as json) so if I want to add type > information I need to walk the tree and rewrite it. Not necessarily a bad > idea, but in some cases the only thing I need is the eTag and so

Re: ANN: lambic v. 0.1.0

2012-06-15 Thread Vinzent
Seems very interesting! -- 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 this gr

Re: Best practices for named arguments

2012-06-15 Thread Vinzent
> > TL;DR: I want to know best practices for designing functions with multiple > optional arguments. > Use destructing: (defn f [required & {:keys [foo bar] :or {foo :default}}] [required foo bar]) (f 3 :bar 1 :foo 2) ;=> [3 2 1] (f 3 :bar 1) ;=> [3 :default 1] -- You received thi

Re: Doseq, map-style

2012-06-13 Thread Vinzent
> > I do use pre-conditions where the test condition is simple, ie is this a > string? does the map have a :field-type? however I get a lot of my input > data from http requests as json which have similar structures but different > semantics, so I often do not have preconditions where type is n

Re: ANN Monger 1.0 RC1: a Clojure MongoDB client for a more civilized age

2012-06-11 Thread Vinzent
Very impressive. Thank you! -- 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 thi

Re: Learning clojure: debugging?

2012-06-03 Thread Vinzent
Actually, it's kinda the same (Fogus and me decided to merge trammel and clojure-contracts into one library) воскресенье, 3 июня 2012 г., 6:31:50 UTC+6 пользователь Sean Corfield написал: > > On Sat, Jun 2, 2012 at 5:22 PM, Vinzent wrote: > > BTW, you may want to use

Re: Learning clojure: debugging?

2012-06-02 Thread Vinzent
BTW, you may want to use clojure-contracts ( https://github.com/dnaumov/clojure-contracts) instead of asserts or :pre\:post in order to get much nicer and informative error reporting. > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: defrecord with "inheritance"

2012-05-20 Thread Vinzent
You can reuse methods by putting them in a map and then just merging it with the new methods: (extend Employee AProtocol (merge default-implementation {:new-function (fn ...)})) The problem is that you can't reuse methods defined inline, i.e. you can't say "my record implements

Re: ANN: Kibit-mode, a minor mode for Emacs

2012-05-18 Thread Vinzent
It'd be interesting to ressurect clojure-refactoring project and merge it with kibit-mode. суббота, 19 мая 2012 г., 0:05:29 UTC+6 пользователь Alex Redinton написал: > > Hello friends, > > Today I decided to hack together a simple learning tool that mashes > Jonas Enlund's sweet kibit tool (htt

Re: what is the deal with ArraySeq?

2012-05-16 Thread Vinzent
Just a side note: you'd easily find the problem if you'd use contract programming facilities of clojure (via pre- and post-conditions, or better clojure-contracts (shameless plug)). среда, 16 мая 2012 г., 22:34:08 UTC+6 пользователь Jim foo.bar нап

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Vinzent
> > As the logical AND of all of the multiple forms? The OR? Only use the > first expression? Only the last? > It should be AND. -- 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 t

Re: docstrings of if-let and when-let incorrect

2012-05-15 Thread Vinzent
Or maybe if-let and when-let should support multiple bindings, like the doc states. воскресенье, 13 мая 2012 г., 4:55:40 UTC+6 пользователь Borkdude написал: > > The docstring of if-let is as follows: > > bindings => binding-form test > > If test is true, evaluates then with binding-form bound to

Re: a library I'm working on for generating PDFs from Clojure

2012-04-18 Thread Vinzent
Thank you, I was looking for something exactly like that! I'll give it a try. четверг, 19 апреля 2012 г., 7:34:10 UTC+6 пользователь Dmitri написал: > > I poked around and noticed that there aren't any libraries for > creating PDFs, and as I needed to make one for work I decided to open > sourc

Re: Boolean

2012-04-14 Thread Vinzent
> > So 'false?' doesn't help you here. > It does, actually (see earlier responses for details) > So if anyone runs into this problem _in real world code_ it's because > > they are calling a Java API that somehow returns a Java Boolean object > embedded in the result. If you are working with a J

Re: Supporting platform specific code

2012-04-13 Thread Vinzent
> > But my own programs already use :platform and :version metadata > with completely different semantics. (Well, no, they don't, but it could > > be.) > That's not a problem, since the same is true for :doc, :macro, :arglists, etc, etc. Also, meta on expressions is probably not used so often.

Re: Supporting platform specific code

2012-04-13 Thread Vinzent
> > ^{:platform :jvm} (load "jvm/lib") ^{:platform :python} (load "python/lib") or platform metadata attached to the 'ns' form should be trated as "this whole file is for this platform". This way, in src/py/blah.clj you'd have ^{:platform :python} (ns blah) ... (your code) ... without relyi

Re: Boolean

2012-04-13 Thread Vinzent
> > http://clojuredocs.org/clojure_core/clojure.core/if It's great, Andy, thank you! I haven't even thought about clojuredocs at all. Since it still doesn't eliminates the problem completely, I believe many clojure newcomers will find it incredibly useful. Stefan Kamphausen writes: > Acco

Re: Supporting platform specific code

2012-04-12 Thread Vinzent
> > And even if it was, why shouldn't I be allowed to build my clojure > projects with ant (like clojure itself) or maven? > Well, theoretically you could be able to do so, but yes, the problem is more fundamental and probably should be solved on a language level rather than one a tooling's one

Re: Boolean

2012-04-12 Thread Vinzent
> > false and true are JVM built-ins. > Yes, but clojure uses this booleans as a basic type, in the same way as it does for lists and symbols. > You could argue the same way that since (1 2 3) and [1 2 3] are equal, > > they represent the same value, and thus you should be able to call > `subv

[ANN]: new library for contract programming

2012-04-12 Thread Vinzent
Hello, I'd like to announce clojure-contracts - a library for contract programming with emphasis on good error messages. In short, it allows you to specify pre- and postconditions for an existing function, and then uses this information to improve

Re: Supporting platform specific code

2012-04-12 Thread Vinzent
> > Such a feature shouldn't depend on a specific tool, it should be part of > the language. Yeah, you're right - I haven't thought about the fact that leiningen isn't available on the platforms other than jvm and js. Given that reader macros are already used for this purpose extensively in th

Re: Accessing defrecord from another namespace

2012-04-12 Thread Vinzent
It should be (ns app.one.a (:require [app.two.b]) (:import [app.two.b Book])) i.e. 'app.two.b' instead of 'ns.app.two.b' пятница, 13 апреля 2012 г., 0:03:49 UTC+6 пользователь Adam Markham написал: > > I have two namespaces as follows: > > (ns app.one.a > (:require [ns.app.two.b]) >

Re: Boolean

2012-04-12 Thread Vinzent
I understand the points you've described, but as I written earlier the thing which is really confuses me is that for 2 equal objects, one considered truthy and the other considered falsey. In terms of clojure, if 2 objects are equal they represents the same value, right? As I've mentioned earli

Re: Supporting platform specific code

2012-04-12 Thread Vinzent
> > I don't think that's too practical. The reader sees the metadata only > after it already started to read the form it should then ignore, if the > platform doesn't match. > As I understand it happens before compilation (lein plugin extracts the appropriate forms and then compiles it), so it

Re: Supporting platform specific code

2012-04-12 Thread Vinzent
> > What we need is even more defined then that, however, Consider this > snippet from core.match: > > (ns clojure.core.match > (:refer-clojure :exclude [compile]) > (:require [clojure.set :as set]) > (:import [java.io Writer])) > > how do we use metadata to restrict/include java.io.Writer v

Re: Boolean

2012-04-12 Thread Vinzent
Well, changing the behaviour of 'if' is not the only way to fix the problem (and it's impossible because of backward compatibility anyway). In my mind, more realistic solution would be: > > 1. Clearly state in the section on interop that clojure, unlike java, doesn't treat 'false' and (Boolean.

Re: Supporting platform specific code

2012-04-12 Thread Vinzent
First thing which comes to mind is to use metadata for this purpose. Something like (defn ^{:platform :jvm} to-string [x] ...) This doesn't force the user to create a separate file for each platform (although it's still possible to do so) and feels very naturally for clojure. Another option i

Re: Boolean

2012-04-10 Thread Vinzent
> > So I agree: you cannot make it work for each and every JVM language, so > the current simplistic behavior is just fine. > Yeah, but my question about 'if' and equality remains open. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Boolean

2012-04-09 Thread Vinzent
That's interesting, thanks for your investigation! Then such decision was clearly made because Java is not the only JVM language, just as Luc said. For example, JRuby has its own class which wraps false: http://jruby.org/apidocs/org/jruby/RubyBoolean.False.html Obviously, it's impossible to imple

Re: Boolean

2012-04-09 Thread Vinzent
I'll answer only C, since other letters are either irrelevant or do not contradict my points. > C) ... By which universal law these two things should be considered equal > ? > Um, that's what my complaint is all about, no? I have no idea by which law these two things are considered equal, an

Re: Boolean

2012-04-08 Thread Vinzent
> > But interop is not the main goal in the design of the language... > > It's a nice feature. > That's not true. Clojure is a hosted language. Easy interop with the host platform is one of the main goals of the language. See http://clojure.org/jvm_hosted. They are not "the same" I've said "

Re: Boolean

2012-04-08 Thread Vinzent
I fully support Steve Obua in his complains (although, I've never ran into such issues myself). Also, I believe that most of answers for this topic are slightly irrelevant; the problem is not java vs. clojure behaviour or something, the problem is (at least for me) that (= (Boolean. false) fals

Re: [ANN]: Trammel (contracts programming) v0.7.0

2012-04-08 Thread Vinzent
Hello, First of all, I'm also very interested in increasing support for contract programming in clojure. In my mind, it's perfectly complements dynamic nature of clojure by providing that type of in-code documentation which people coming from statically-typed language often feel lack of. So, I w

Re: Source code as metadata

2012-03-30 Thread Vinzent
Counter-example: one could write if-authenticated macro, which will take fixed number of args, but should be indented as normal if. суббота, 31 марта 2012 г. 3:07:23 UTC+6 пользователь Cedric Greevey написал: > > On Fri, Mar 30, 2012 at 1:26 PM, Vinzent wrote: > > Another id

Re: Source code as metadata

2012-03-30 Thread Vinzent
gnostic; say, CCW can use the same data, so library maintainers only have to add {:indent :defn} to their defmacros. суббота, 31 марта 2012 г. 2:32:35 UTC+6 пользователь Phil Hagelberg написал: > > Vinzent writes: > > > I'm not sure how I feel about indentation rules &

Re: Source code as metadata

2012-03-30 Thread Vinzent
> > I'm not sure how I feel about indentation rules > changing depending on whether slime is active or not. > What I was thinking, is that there'd be some function which would collect and save indentation metadata, so it can be used later. Thus, active slime connection required only the first t

Re: Source code as metadata

2012-03-30 Thread Vinzent
Another idea is to put :indentation metadata on vars, so user-defined macros could be indented properly. Currently I have (define-clojure-indent ...) with a number of forms in my emacs config file, and it seems to be pretty common solution. It'd be nice to replace this hack with an IDE-independ

Re: [ANN] Clojure & Android mailing list

2012-02-23 Thread Vinzent
Corrected url (without whitespace) is http://groups.google.com/group/clojure-android -- 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

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread Vinzent
Hiccup ? -- 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

Re: ANN: core.unify v0.5.2

2012-01-09 Thread Vinzent
First of all, thank you for your work! But actually I agree with Cedric. He definitely has a point. I'd love to try unify, but I have no idea where to begin! Having short description and some simple use cases in announce would be great. Please do not take this as a critisism, but rather as a w

Re: ClojureQL 1.0.3

2011-12-21 Thread Vinzent
Good to hear it. One more thing: Shantanu Kumar have proposed to create a clojureql google group, and I also think it's a good idea. Would you please create it? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloj

Re: [ANN] ClojureQL 1.0.3

2011-12-21 Thread Vinzent
BTW, http://www.clojureql.org/ is down, do you know what happened? -- 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 yo

Re: [ANN] ClojureQL 1.0.3

2011-12-21 Thread Vinzent
Great! Thank you so much for 1.3 support! -- 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 unsubs

Re: Clojure Stored Procedure

2011-12-15 Thread Vinzent
Hello, I'm interested in this kind of thing too. Do you have any progress? -- 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

Re: Convert Map to string for use in URL as parameters question

2011-08-04 Thread Vinzent
On 2 авг, 04:47, Brad wrote: > I wanted to take a Map and convert it to a string suitable for use as > parameters in a URL. I have got it working below two different ways > but wondered if there was a better or more idiomatic way to do this. > > ;; My test input map > (def input {:a 1 :b 2 :c 3

suggestion: update

2011-07-22 Thread Vinzent
Hello, in clojure.core we have assoc and assoc-in, dissoc and dissoc-in (in the incubator), but there is only update-in, without update. Implementation might look like this: (defn update [m & kfs] (let [coll (partition 2 kfs)] (reduce (fn [m [k f]] (update-in m [k] f)) m coll)))