Your post is nice but does not at all talk about the issue I am presenting.
I know metadata is attached to the form reader reads and not to the evaled
result of that form. My issue is of the evaluation of the metadata map
itself.
Best,
Jozef
On Thursday, July 25, 2013 2:50:38 AM UTC+2,
Hi list,
Just a thought, I usually limit my usage of (:use) to DSL-like functions,
like for instance cascalog :
(?- (stdout) [?a ?b] (generator : ?a ?b))
Without a use, or (:require :refer :all), this would become very
cumbersome to read :
(cascalog/?- (cascalog/stdout) [?a ?b] (generator
Hi,
my understanding is, that the metadata is evaluated when the literal is
evaluated. In the first case this means to just strip the surrounding
quote. So nothing happens to the metadata. In the second case upon
evaluation the literal vector is traversed and its elements are evaluated.
Hi,
I was just going to post exactly the same. I've looked in the Compiler.java
and the evaluation of metadata happens together with evaluation of the
form. So it is a desired behavior after all.
Regarding empty vector, I've already created a ticket for it,
On Tuesday, 23 July 2013 21:55:12 UTC+1, Sean Corfield wrote:
On Tue, Jul 23, 2013 at 1:53 PM, Ben Wolfson wol...@gmail.comjavascript:
wrote:
On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen
ska...@gmail.comjavascript:
wrote:
It complects require and refer ;-)
How so?
Hi all,
please consider the following record definition
(defrecord RDistance
[node dist visited])
as well as an instance and a tree set with a custom comparator ordering
content first by :visited and after that by :dist
(def d (RDistance. foo 1 0))
(def tree (sorted-set-by (comparator (juxt
This is just a thin wrapper over byte-streams [1] and some best-in-class
hash and compression algorithms, but I figure there are at least a few
people out there who'd like to use Snappy or MurmurHash but don't want to
crawl through javadocs. Enjoy.
Zach
[1]
Hi all,
Consider the following record definition, a respective record instance as
well as a sorted tree set with a custom comparator sorting first the
:visited property and the by the :dist property of the record.
(defrecord RDistance
[node dist visited])
(def d (RDistance. foo 1 0))
(def
2013/7/25 Philippe Guillebert philippe.guilleb...@gmail.com:
Hi list,
Just a thought, I usually limit my usage of (:use) to DSL-like functions,
like for instance cascalog :
(?- (stdout) [?a ?b] (generator : ?a ?b))
Without a use, or (:require :refer :all), this would become very
On Tuesday, 23 July 2013 16:50:50 UTC+1, Greg Slepak wrote:
I think I read somewhere that :use is no longer encouraged, but I could be
mistaken.
From what I've read, it seems like most people agree that Clojure has too
many ways of including/importing/referencing/requiring/using things:
Hi,
you are using comparator incorrectly. The function you pass there should
return true, when x is to the left of y when called as (f x y). See the
following example.
user= (defrecord Foo [a b])
user.Foo
; Wrong usage: your example (The new element is always smaller!)
user= (- (sorted-set-by
On Tuesday, 23 July 2013 19:17:02 UTC+1, Jozef Wagner wrote:
+1, :use is IMO an antipattern.
I hate it mainly in blogs, where they explain some new API. They :use like
3 namespaces and you have to guess which fn is from which ns :)
Hmmm perhaps I'm guilty of this.
But I find code much
Two more releases in the ongoing crusade to bring top-class numerical
computing facilities to Clojure:
https://github.com/mikera/matrix-api
https://github.com/mikera/vectorz-clj
Key contents:
- New API function fill!
- First version of Dmitry's generic NDArray implementation (GSoC project)
-
Philippe Guillebert writes:
Hi list,
Just a thought, I usually limit my usage of (:use) to DSL-like functions,
like for instance cascalog :
(?- (stdout) [?a ?b] (generator : ?a ?b))
Without a use, or (:require :refer :all), this would become very
cumbersome to read :
(cascalog/?-
On Wed, Jul 24, 2013 at 3:16 PM, Phillip Lord
phillip.l...@newcastle.ac.ukwrote:
What I'd really want to be able to do is to use some sort of query; so I'd
write a data structure like so:
{:annotation
#{(label ? it)}}
Some time ago I wrote a little library to act as a model layer for
This looks very useful - thanks Zach!
On Thursday, 25 July 2013 03:05:05 UTC+1, Zach Tellman wrote:
https://github.com/ztellman/byte-transforms
This is just a thin wrapper over byte-streams [1] and some best-in-class
hashing and compression algorithms, but I figure there are at least a few
Hi everyone,
I am the technical lead for a sport betting platform based in Nigeria.
We are in the process of re-writing our community site (fanalysis.net) and
betting platform(playcenter.fanalysis.net).
We intend to use clojure for the development. So far we have recruited two
local
Timothy Baldridge tbaldri...@gmail.com writes:
I think the first hint to an answer is found in your question. You are
dealing with complex data, simplify the data, and querying the data is much
simpler.
Part of the problem is that the data structure that I have is
intrinsically fairly
Timothy Washington twash...@gmail.com writes:
Like Tim, I was thinking about the Datomic query language. Before you do
that though, remember that there's some basic relational algebra functions
in clojure.set http://richhickey.github.io/clojure/clojure.set-api.html.
I did think about
Okay, this is worth poking into.
Ben Wolfson wolf...@gmail.com writes:
On Wed, Jul 24, 2013 at 5:16 AM, Phillip Lord
phillip.l...@newcastle.ac.ukwrote:
So, with this case, say I want the Italian label, in the set which is the
value of the annotation key, find any list with the first
I am using the clojure maven plugin to build a project. The projects
contains a test, let us *mytest.clj*, that looks like the following:
(def ^:dynamic *server*
(create-server tcp://bla.bla:))
(deftest1...)(deftest2...)
If I run mvn clojure:compile or *mvn clojure:test* , the build
Laurent PETIT laurent.pe...@gmail.com writes:
(:use foo :only [a b c]) will become (:require foo :refer [a b c])
(:use foo) will become (:require foo :refer :all)
The same logic could suggest we remove or because we can express it
with and and not.
This will save lots of time and frustration
try
mvn compile -Dmaven.test.skip=true
On Thu, Jul 25, 2013 at 12:24 PM, Horace adram...@googlemail.com wrote:
I am using the clojure maven plugin to build a project. The projects
contains a test, let us mytest.clj, that looks like the following:
(def ^:dynamic *server*
(create-server
You could also do (use 'clojure.test) below the ns form. One thing that
generally annoys me with 'ns' is that people feel it's some magical thing
that has to be in the head of every file, like java imports, but it's
really just a macro.
It just goes to show that conventions are important.
Gary Trakhman writes:
You could also do (use 'clojure.test) below the ns form. One thing that
generally annoys me with 'ns' is that people feel it's some magical thing
that has to be in the head of every file, like java imports, but it's
really just a macro.
It just goes to show that
I think that's a good thing. I like to think of (ns) like a magical thing
that has to be at the head of every file. It gives me consistency and
predictability. It lets me not have to think. I almost wish it were just
some magical required thing.
-Steven
On Thu, Jul 25, 2013 at 10:43 AM, Gary
2013/7/25 Phillip Lord phillip.l...@newcastle.ac.uk:
Laurent PETIT laurent.pe...@gmail.com writes:
(:use foo :only [a b c]) will become (:require foo :refer [a b c])
(:use foo) will become (:require foo :refer :all)
The same logic could suggest we remove or because we can express it
with and
I tend to use plain ol' maps for data structures but was showing
someone defrecord the other day and had some questions about idiomatic
usage:
Given:
(defrecord Point [x y])
Which constructor form is considered more idiomatic:
(Point. 10 10) or (-Point 10 10)
Which accessor form is considered
Chas Emerick's excellent clojure type flowchart[1] is my goto for when to
use a defrecord over deftype / plain 'ol map.
Since the criteria to choose defrecord is basically 'do you need it to
behave like a clojure immutable map, but with enhanced protocols support'
then I'd argue that the
The second form in both the cases. The first ones IMHO are
implementation detail. ~BG
On Thu, Jul 25, 2013 at 9:48 PM, Sean Corfield seancorfi...@gmail.com wrote:
I tend to use plain ol' maps for data structures but was showing
someone defrecord the other day and had some questions about
+1 to that interpretation
On Thu, Jul 25, 2013 at 12:03 PM, Baishampayan Ghose b.gh...@gmail.comwrote:
The second form in both the cases. The first ones IMHO are
implementation detail. ~BG
On Thu, Jul 25, 2013 at 9:48 PM, Sean Corfield seancorfi...@gmail.com
wrote:
I tend to use plain
I find this interesting. I've been using light table mostly, but recently I
tried my hand at socket programming and light table flopped on this type of
a project. I ended up using lein repl for most of my work which became a
pain and now I'm looking at emacs with a slight kink in my lips. I'll
+1 on Phil's proposal
My assumption from our discussion would be that a warning would be added
in a near release when :use was detected in the ns macro, and that it would
be removed for Clojure 2.0 when backwards-incompatible changes are OK.
Thanks
Ryan
On Thursday, July 25, 2013 12:07:53 PM
Everyone has their preferences, and the best thing to do is to try it all and
pick what you like.
That said... here's my experience with IntelliJ, and others
Table of Contents:
1. On IntelliJ
2. On Emacs and Emacs Live
3. On Light Table
4. On Sublime Text (ST)
5. Conclusion
1. On IntelliJ
On Thu, Jul 25, 2013 at 12:05 PM, Greg g...@kinostudios.com wrote:
1. On IntelliJ
2. On Emacs and Emacs Live
3. On Light Table
4. On Sublime Text (ST)
5. Conclusion
I've tried IntelliJ several times and just can't on with the way it
operates. Clearly a very personal thing. I used to use
On Jul 25, 2013, at 3:37 PM, Sean Corfield wrote:
In October 2011, I decided to give Emacs another chance - specifically
for Clojure development - and that's what I use day-in, day-out. I
have a slightly customized setup but it really doesn't have much
beyond the starter kit, rainbow
tl;dr: why not at least *try* Counterclockwise before skipping it
'because of Eclipse'? You may find its editor with paredit shortcuts
appealing. A full standalone Eclipse+Counterclockwise is available for
your platform here:
Is there a better way to do this, making a map of certain keys from a list
of maps?
(apply hash-map (mapcat (fn [x] [(x :a) (x :b)]) [{:a blah :b ack}
{:a red :b blue}]))
{red blue, blah ack}
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To
user (into {} (map (juxt :a :b) [{:a blah :b ack} {:a red :b
blue}]))
{blah ack, red blue}
On Thu, Jul 25, 2013 at 5:34 PM, Brian Craft craft.br...@gmail.com wrote:
Is there a better way to do this, making a map of certain keys from a list
of maps?
(apply hash-map (mapcat (fn [x] [(x :a)
Ah, interesting. Only works for keys that are functions.
On Thursday, July 25, 2013 2:48:10 PM UTC-7, Gary Trakhman wrote:
user (into {} (map (juxt :a :b) [{:a blah :b ack} {:a red :b
blue}]))
{blah ack, red blue}
On Thu, Jul 25, 2013 at 5:34 PM, Brian Craft
2013/7/26 Colin Fleming colin.mailingl...@gmail.com:
Hi Laurent,
Thanks for those links, I'll try the standalone version. I recently tried to
set up CCW, I got it running but several of the Paredit keybindings didn't
work for me and they didn't appear in the shortcut preferences either. I'm
Hello Cedric,
2013/7/26 Cedric Greevey cgree...@gmail.com:
On Thu, Jul 25, 2013 at 3:05 PM, Greg g...@kinostudios.com wrote:
Everyone has their preferences, and the best thing to do is to try it all
and pick what you like.
That said... here's my experience with IntelliJ, and others
Table
You can pick and choose your level of bloat with emacs.
It's pretty good at being a lisp editor. I don't customize mine much, been
using it for a year and a half, and I was 80% as productive as I am now
within just a few weeks, though I realize there's a lifetime left to learn.
Starter-kit +
Laurent is correct - both the IntelliJ community edition and La Clojure are
Apache licensed.
On 26 July 2013 11:02, Laurent PETIT laurent.pe...@gmail.com wrote:
Hello Cedric,
2013/7/26 Cedric Greevey cgree...@gmail.com:
On Thu, Jul 25, 2013 at 3:05 PM, Greg g...@kinostudios.com wrote:
Nope, it's perfectly functional as long as all you want is basic
functionality - Java, XML/XPath/XSLT, Git/SVN, Android, Maven/Ant, Groovy,
JUnit/TestNG and of course Clojure if you install La Clojure. If you want
any of the Enterprise Java stuff you have to go to the Ultimate edition.
Probably
You can use whatever functions you want with juxt:
user= (into {} (map (juxt #(% a) #(% b)) [{a blah b ack} {a
red b blue}]))
{blah ack, red blue}
On Thursday, July 25, 2013 2:55:18 PM UTC-7, Brian Craft wrote:
Ah, interesting. Only works for keys that are functions.
On Thursday, July 25,
Would agree with Laurent. For newbies, I would not recommend anything apart
from Eclipse. It's really stable and I have been using it for multiple
projects over the past year. It just work. I really love the integrated
REPL and ability to debug with breakpoints.
I spent 5-6 years with Eclipse
Indeed - I was using a community-edition intellij setup the other day, and
only realised when I went to edit some JavaScript, and found some features
missing (like code indenting).
We use intellij (mostly) in our team at work, and I use emacs (mostly) at
home.
My current take on this endless
'jumping to a symbol's definition (and back again)? Those didn't seem to
be there last time, and I'd struggle to live without them on a project of
any size.'
Besides paredit, this is absolutely the most important feature for me
day-to-day. Nothing will replace emacs unless it has that. The
I'm developing a stand-alone paredit widget, basically connecting
paredit.clj to a swing text area.
As part of my research, I've spent the last few days looking into intellij,
and the la clojure source.
One gets the feeling that eclipse and netbeans have hit a wall of
designed-by-committee
On Jul 25, 2013, at 8:22 PM, Anand Prakash wrote:
Would agree with Laurent. For newbies, I would not recommend anything apart
from Eclipse.
For real newbies I'd second the earlier mention of clooj. It's really the
simplest thing to get and use that integrates a Clojure-aware editor and a
Hello, I'm trying to figure out what is the best way in handling this
problem.
Using Ring I have a handlers set to direct routes with relative URI paths
(e.g. /, ./posts, /about). But I would like the URI to be
automatically redirected to /posts/ and /about/ with the trailing
slash, so that
Hi,
Could you try (str uri_path /)
在 2013年7月26日星期五UTC+8上午9时08分50秒,Reginald Choudari写道:
Hello, I'm trying to figure out what is the best way in handling this
problem.
Using Ring I have a handlers set to direct routes with relative URI paths
(e.g. /, ./posts, /about). But I would like the
Checkout this middleware in lib-noir
https://github.com/noir-clojure/lib-noir/blob/master/src/noir/util/middleware.clj#L70
On Thursday, July 25, 2013 9:08:50 PM UTC-4, Reginald Choudari wrote:
Hello, I'm trying to figure out what is the best way in handling this
problem.
Using Ring I have
Hello,
I have a problem how we convert from string to symbol, for example:
(def str_name name)
I want have a result that symbol is :name through processing str_name,
could you a best advice?
thank you!
--
--
You received this message because you are subscribed to the Google
Groups
It might be more clear if you simply show sample inputs and outputs.
Something like this:
in: name
out: 'name
probably what you want is:
(symbol (name x))
works for keywords too, cuts off any namespace prefix.
On Thu, Jul 25, 2013 at 9:29 PM, ljcppu...@gmail.com wrote:
Hello,
I have a
On 26 July 2013 11:17, Sebastian Rojas sebastian.rojas.viva...@gmail.comwrote:
Checkout this middleware in lib-noir
https://github.com/noir-clojure/lib-noir/blob/master/src/noir/util/middleware.clj#L70
Unfortunately that middleware only changes the way your handlers see the
URI of the
There's some problems with acting as if /foo and /foo/ are the same thing.
I read about it years ago but don't have the link handy. Basically it
messes with caching and other things, and so it's better to just redirect
to the canonical one. So if /foo/ is the right one, make /foo redirect to
it. I
Hi, Gary Trakhman
Good job, thank you very much!
On Friday, July 26, 2013 9:44:31 AM UTC+8, Gary Trakhman wrote:
It might be more clear if you simply show sample inputs and outputs.
Something like this:
in: name
out: 'name
probably what you want is:
(symbol (name x))
works for
Yeah, the right way (300-series moved permanently codes, which smart
tools will know means update bookmarks and etc.), the icky way (meta
headers), and the really, really broken way (JS navigate calls, which
simply won't work if your users are using NoScript as a first line of
defense against
'jumping to a symbol's definition (and back again)? Those didn't seem to be
there last time, and I'd struggle to live without them on a project of any
size.'
Besides paredit, this is absolutely the most important feature for me
day-to-day. Nothing will replace emacs unless it has that.
You submit patches to nonfree software?!
On Thu, Jul 25, 2013 at 10:54 PM, Greg g...@kinostudios.com wrote:
'jumping to a symbol's definition (and back again)? Those didn't seem to
be there last time, and I'd struggle to live without them on a project of
any size.'
Besides paredit, this
You submit patches to nonfree software?!
How do you make a screwy-eyed emoticon?
The plugin is free software. ST is nagware. Oh, and IntelliJ, as others have
already pointed out, is also free software (community edition, which is great).
-Greg
--
Please do not email me anything that you are
BTW, if anyone here has decent Python experience and wants to try out Sublime
for Clojure development, the plugin I linked to could really be improved by
supporting regular expressions... :-)
--
Please do not email me anything that you are not comfortable also sharing with
the NSA.
On Jul 25,
Someone makes free software plugins for nonfree software?!
On Thu, Jul 25, 2013 at 11:04 PM, Greg g...@kinostudios.com wrote:
You submit patches to nonfree software?!
How do you make a screwy-eyed emoticon?
The plugin is free software. ST is nagware. Oh, and IntelliJ, as others
have
On 25.07.2013 11:19, gixxi wrote:
Consider the following record definition, a respective record instance
as well as a sorted tree set with a custom comparator sorting first the
:visited property and the by the :dist property of the record.
(defrecord RDistance
[node dist visited])
(def
it happens all the time.
In a sense, it's not weirder than making free software for proprietary
operating systems 8)
On Thursday, July 25, 2013 11:15:15 PM UTC-4, Cedric Greevey wrote:
Someone makes free software plugins for nonfree software?!
--
--
You received this message because you
Seems a bit more at risk from the vendor goes kaput, though. It's far
easier to imagine the vendor of Sublime Text going out of business than
either Apple or Microsoft doing likewise.
Of course, none of what I said applies to plugins that adhere to a standard
implemented by both free and nonfree
On 26.07.2013 00:34, Brian Craft wrote:
Is there a better way to do this, making a map of certain keys from a
list of maps?
(apply hash-map (mapcat (fn [x] [(x :a) (x :b)]) [{:a blah :b ack}
{:a red :b blue}]))
{red blue, blah ack}
Here's another way:
(let [xs [{:a blah, :b ack} {:a
Sure, it's not as weird as it sounds. Some of us would rather pay to have
reliable tools, but still want to customise them. There are several free
plugins for IntelliJ Ultimate, which as usual are people scratching their
own itch. See also the people who spend a huge amount of time customising
Thanks for sharing.
Will check it out.
On Fri, Jul 26, 2013 at 1:17 AM, Steven Degutis sbdegu...@gmail.com wrote:
- Renamed project to Nevermore
- Moved repo to https://github.com/evanescence/nevermore
- Test functions are required to return all assertions as a seq
- Added around-each
71 matches
Mail list logo