A previous thread that covers a lot of ground, but should give you a lot of
the information you are looking for [1]. There aren't too many use cases
that couldn't be covered with ClojureScript+V8 or some of the other
suggestions.
[1]
Embedding in applications - Python is used very often as a scripting language
in 3d apps, games, mapping software, etc. I've yet to hear of the JVM ever
being used for this.
Related to this, do you have any thoughts on the viability of
embedding clojure-py into a C++ application for similar
On Sun, Jan 27, 2013 at 1:31 PM, Paul deGrandis
paul.degran...@gmail.com wrote:
As far as embedding Clojure is concerned, another option is
ClojureScript-Lua + LuaJit + C.
I've recently started going through the CLJS-Lua source to see how viable
this is.
Thanks, I had forgotten about
I haven't hit any hard limits at this point, but you hit on a use case
where Python and Lua currently hit a sweet spot that I think would be
nice to use Clojure:
C/C++ systems that want to expose scripting capabilities to users
(e.g. game engines, robotics systems).
For these types of use cases,
You can contact the maintainers at the address found at the bottom of [1]
and ask them to remove the clj-xpath group, but you probably don't want to
do that if anyone is using the library.
[1] https://github.com/ato/clojars-web/wiki/Contact
On Tue, Nov 20, 2012 at 10:07 AM, Kyle R. Burton
any issues.
On Tue, Nov 20, 2012 at 10:47 AM, Kyle R. Burton kyle.bur...@gmail.com wrote:
On Tue, Nov 20, 2012 at 10:35 AM, Mark Rathwell mark.rathw...@gmail.com
wrote:
You can contact the maintainers at the address found at the bottom of [1]
and ask them to remove the clj-xpath group
Should I dive into Ring as well? What about Compojure versus Noir?
Noir is higher level than Compojure, and usually easier for new people
to jump into, but not always as flexible, functional or composable.
On Tue, Nov 13, 2012 at 10:27 AM, Jonathon McKitrick
jmckitr...@gmail.com wrote:
These 4 should help you get from zero to a simple web app running on Heroku
pretty quickly:
https://github.com/technomancy/leiningen/wiki/Upgrading
https://github.com/technomancy/swank-clojure
https://github.com/kingtim/nrepl.el
https://devcenter.heroku.com/articles/clojure-web-application
Some
Great work! Really looking forward to NuGet integration.
On Sun, Oct 28, 2012 at 9:13 AM, Shantanu Kumar kumar.shant...@gmail.comwrote:
Hi,
I am happy to announce `lein-clr`, a Leiningen plugin for building
ClojureCLR projects:
https://github.com/kumarshantanu/lein-clr
As of 0.1.0,
https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L588
On Tue, Oct 9, 2012 at 1:03 PM, Larry Travis tra...@cs.wisc.edu wrote:
As participants in this googlegroup have often observed, an excellent way to
learn Clojure is to study the source definitions of its API functions.
It's in there, search Asterisks: Variants, Internal Routines, Mutable Globals
On Tue, Oct 9, 2012 at 1:58 PM, Grant Rettke gret...@acm.org wrote:
Gosh I thought it was in there... maybe it is not. Sorry.
On Tue, Oct 9, 2012 at 12:55 PM, Grant Rettke gret...@acm.org wrote:
On Tue, Oct 9, 2012
It's in there, search Asterisks: Variants, Internal Routines, Mutable Globals
Should have noted that's not how it is used in Clojure though
On Tue, Oct 9, 2012 at 2:00 PM, Mark Rathwell mark.rathw...@gmail.com wrote:
It's in there, search Asterisks: Variants, Internal Routines, Mutable Globals
Now I'm confused! Isn't clojureScript exactly that?
ClojureScript is a Clojure implementation that targets Javascript
(meaning that Clojure core, et al, is also necessarily converted to
Javascript in the build process and a part of what you ship). I'm
assuming this project is a straight
Documentation around libraries (and elsewhere) is recognized
as a primary weakness, but starting a new, larger web Framework project
isn't an obvious solution to that very distributed problem.
Agree 100% with this. I think the various libraries are mostly at the
right level, and are mostly
Well there are many usefull libs for web development you can choose this and
that combine them and get something.
But from newbie perspective it's kind of a difficult question where to start
from, what to use, what good practice is.
What lib to use for persistance with Mysql, Postgre, for
If I'm right then defining your 'globals' (for lack of a
better word) like this would mean, among other things, that you really can't
have two independent Noir apps defined/running in the same project - is that
a correct assessment?
Just out of curiosity, could you expand on what you mean
Emerick c...@cemerick.com wrote:
On Sep 13, 2012, at 11:57 AM, Mark Rathwell wrote:
If I'm right then defining your 'globals' (for lack of a
better word) like this would mean, among other things, that you really can't
have two independent Noir apps defined/running in the same project
See [1].
Valid ServerSocket constructors:
ServerSocket()
ServerSocket(int)
ServerSocket(int,int)
ServerSocket(int,int,InetAddress)
Your code is trying:
ServerSocket(int,string)
[1] http://docs.oracle.com/javase/1.4.2/docs/api/java/net/ServerSocket.html
On Tue, Aug 28, 2012 at 8:25 PM, larry
In your has22 definition, (by-pairs [a]) should be (by-pairs a)
On Sun, Jul 29, 2012 at 9:07 AM, John Holland jbholl...@gmail.com wrote:
I'm doing some exercises in coding that are meant for Java but I'm doing
them in Clojure. I'm stuck on this one. The goal is
to return true if an array of
I haven't setup the naked domain, as heroku advises against that.
Perhaps I should?
Usually you can setup a 301 redirect from the naked domain to www with your
registrar.
On Fri, Jul 27, 2012 at 4:06 PM, Aaron Lebo aaron.m.l...@gmail.com wrote:
It is http://www.kodefund.com.
I haven't setup
for DNS.
On Fri, Jul 27, 2012 at 4:10 PM, Mark Rathwell mark.rathw...@gmail.com wrote:
I haven't setup the naked domain, as heroku advises against that.
Perhaps I should?
Usually you can setup a 301 redirect from the naked domain to www with
your registrar.
On Fri, Jul 27, 2012 at 4:06 PM
wrote:
Yes, I actually just set it up. Very easy. Thank you.
Vincent thanks for pointing that out.
On Friday, July 27, 2012 3:12:02 PM UTC-5, Mark Rathwell wrote:
I haven't setup the naked domain, as heroku advises against that.
Perhaps I should?
Usually you can setup a 301 redirect
, Mark Rathwell wrote:
your apply will end up doing sometihng like this:
(#(println %1) stu mary lawrence)
since apply takes @visitors as a collection and passes each item as an
argument to the function you give it.
In other words, apply essentially unpacks the collection
partial returns a closure, closing over a at the time b is defined.
On Wed, Jul 18, 2012 at 7:18 AM, Alice dofflt...@gmail.com wrote:
I'm reading Clojure Programming from O'Reilly.
(defn a [b] (+ 5 b))
;= #'user/a
(def b (partial a 5))
;= #'user/b
(b)
;= 10
(defn a [b] (+ 10 b))
;=
your apply will end up doing sometihng like this:
(#(println %1) stu mary lawrence)
since apply takes @visitors as a collection and passes each item as an
argument to the function you give it.
In other words, apply essentially unpacks the collection and passes
the items as individual
Depending on who else you are wanting to share the dependency with,
you may find Phil Hagelberg's s3-wagon-private useful:
https://github.com/technomancy/s3-wagon-private
On Mon, May 14, 2012 at 4:23 PM, Sean Corfield seancorfi...@gmail.com wrote:
Check out lein-localrepo - a way to install
1. does anyone have advice on getting somewhat
competent for a newb? (alternatively, how did you get good?)
- Think of some (smaller) project you've had on your mind for a
while, and try to implement it using clojure
- Read all of the incoming questions on this list, or StackOverflow
if you
Depending on what you are trying to do, you will probably also want to
have a look at pallet [1], clj-ssh [2], and clojure-control [3].
[1] http://palletops.com/
[2] https://github.com/hugoduncan/clj-ssh
[3] https://github.com/killme2008/clojure-control
On Fri, Apr 27, 2012 at 6:15 AM,
Try this:
(defn add-rows []
(let [data (js/google.visualization.DataTable.)]
(.addColumn data string Topping)
(.addColumn data number slices)
(.addRows data (clj-js [[Mushrooms 3] [Onions 1] [Olives 1]]))
data))
(defn chart-options []
(clj-js {:title How much Pizza i ate
I would start with storm:
https://github.com/nathanmarz/storm
On Apr 23, 2012, at 9:51 AM, Rogier Peters rogier.pet...@gmail.com wrote:
Hi,
For a java project I have been looking at Esper (esper.codehaus.org),
a component for complex event processing:
Complex event processing (CEP)
The main options for sharing Clojure and ClojureScript code at this point are:
1. Use lein-cljsbuilds crossover feature [1]
2. Kevin Lynagh's cljx [2]
3. Symlink your .clj source as a .cljs file
[1] https://github.com/emezeske/lein-cljsbuild/blob/0.1.8/doc/CROSSOVERS.md
[2]
https://github.com/ztellman/aleph
On Sun, Apr 15, 2012 at 9:51 PM, Stefan Arentz ste...@arentz.ca wrote:
There is a lovely little web server for Python called Tornado.
Tornado is an async server that also includes an async http client that plugs
right in the server's event loop. This makes
Hi,
Below are some good resources for the questions you have. Just a
note, you can advanced compile your own code that calls out to jQuery,
and others, you just can't compile those libraries in. So, there are
existing extern files for jQuery, and for other libraries you might be
using, you can
See [1] for this morning's response to a very similar question ;)
There is also a group for Noir-specific questions at [2].
[1] https://groups.google.com/forum/#!msg/clj-noir/mT8L2hnMnNg/jRJ2UdOqKuQJ
[2] https://groups.google.com/forum/#!forum/clj-noir
On Fri, Apr 13, 2012 at 11:10 AM, Rups
I haven't tried yet, but lein-cljsbuild [1] is meant to support
multiple builds, and I believe something like the below config would
be what you are looking for:
:cljsbuild {
:builds
[{:source-path src/cljs/project1
:compiler {:output-to resources/public/cljs/script1.js
I'm sure that some level of moderation is necessary to keep the list clean,
but does it have to be so draconian?
Hmm, I didn't even know the list was moderated (beyond first post
moderation which I'd assume was the norm on Google Groups). Perhaps
Clojure/core can comment on what the actual
You are trying to call method GetTransform on an instance of
vtk.vtkTransform, and this method does not exist (you are probably
wanting to call that method on boxWidget, not t).
On Thu, Mar 8, 2012 at 12:32 AM, Antonio Recio amdx6...@gmail.com wrote:
You are right. I have capitalized
If you are just printing it to the screen, print or println will do
what you want. There shouldn't be a need for a pretty printer, the
source is already formatted exactly as it was written.
On Tue, Mar 6, 2012 at 1:02 AM, Nikem gni...@gmail.com wrote:
Thank you for your help! :)
I managed to
(clojure.repl/source-fn 'qw) will give you the source.
On Fri, Mar 2, 2012 at 10:32 AM, Nikem gni...@gmail.com wrote:
Hi.
Is it possible to pretty print a source code of the function defined
with defn? I have tried the following:
(defn qw []
(inc 2))
(with-pprint-dispatch code-dispatch
Not sure how many people have seen this, looks interesting though:
https://github.com/halgari/clojure-py
--
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
Currently we have about half of core.clj ported from JVM clojure to
python clojure.
I know it's early, but have there been any thoughts/plans around
interop and dependency management, possibly providing some sort of
bridge between lein and pip/easy_install/virtualenv? And is
performance the
You must (:use ... :only ...) with ClojureScript
On Sat, Feb 25, 2012 at 3:31 PM, Chris McBride cmm7...@gmail.com wrote:
I have a namespace statement like this:
(ns alephtest.websocket
(:require [alephtest.js-utils :as util]))
If I change this to:
(ns alephtest.websocket
(:use
On Fri, Feb 24, 2012 at 2:25 PM, Jay Fields j...@jayfields.com wrote:
On Fri, Feb 24, 2012 at 2:12 PM, Cedric Greevey cgree...@gmail.com wrote:
On Fri, Feb 24, 2012 at 2:06 PM, gaz jones gareth.e.jo...@gmail.com wrote:
Are you Ken Wesson with a new account?
Who?
Wait. Surely you don't think
Try this (you need to wrap the return val of helper in lazy-seq also):
(defn pair-sequences-by
([seq-1 seq-2 f1 f2]
s1 and s2 are guaranteed to be strictly monotonically increasing
whith respect to f1 and f2 as keys respectively.
The return value is pairs of elements e1 from s1 and e2
I don't know that there is necessarily a recommended way to offer
options. Sometimes people want keyword options, sometime the want to
take options as a map, sometimes they need to do it one way or another
for various reasons, sometime they do it one way and later learn of a
better way.
To take
It's logging, and assuming the logging implementation it is using
log4j, you can specify the logging properties in a properties file, as
system properties, or set the properties in code. The easiest way is
to place a file called log4j.properties on the classpath (in the
resources directory of
possibilities.
Sent from my iPhone
On Feb 8, 2012, at 3:15 PM, Tassilo Horn tass...@member.fsf.org wrote:
Mark Rathwell mark.rathw...@gmail.com writes:
It's logging, and assuming the logging implementation it is using
log4j,
Why do you know that from the information given?
Just
In short, yes, if you stick to gClosure, advanced compilation will
work fine. Closure advanced compilation is an optimizing compilation
that minifies names and removes dead (unused, uncalled) code. Trying
to use jQuery without special effort will result in calls to jQuery
being unaddressable.
You can look at how Pinot does it, some links to get you started:
https://github.com/ibdknox/pinot
https://github.com/ibdknox/pinot/blob/master/project.clj
https://github.com/ibdknox/pinot/blob/master/src/pinot/dom.cljs
https://groups.google.com/forum/#!msg/clj-noir/x5x9vcI-T4E/FaCfb8jhDXoJ
On
1. Does the mahout-collections jar contain compiled classes? Or only
java source?
2. Is the mahout-collections jar making it to the lib directory when
you run `lein deps`?
On Mon, Jan 16, 2012 at 7:24 PM, joachim joachim.de.be...@gmail.com wrote:
Hello all,
I am trying to use the mahout math
Thank you for this! It looks to be very cohesive and comprehensive,
very nice work.
On Wed, Jan 11, 2012 at 2:27 PM, Brenton bashw...@gmail.com wrote:
Today we are releasing ClojureScript One. A project to help you get
started writing single-page applications in ClojureScript.
The thing about lisps, though, is that code and data are represented
with the same structure. Adding sugar that makes them appear to be
different things would not help anyone, especially the beginner. It
will make grasping macros, among other things, much more difficult
down the road. Getting
in-ns and load are what you are looking for:
;; foo.clj
(ns my.foo ...
...
(load foo_a)
;; foo_a.clj
(in-ns 'my.foo)
...
On Mon, Dec 19, 2011 at 11:37 AM, FD du...@hotmail.com wrote:
Hello,
In lisp, one can define functions within a package in multiple file.
Files have just to start with
Is clojurescript ready for wide water?
It's getting there.
+1
How far i can only see obscure compilation env and low level ops on
html elemnts.
I find the compilation environment is quite nice, if there's something you
find confusing you should discuss it. I don't think that
Generally, in production, jetty or tomcat would be fronted by a web
server like nginx or apache httpd, and those would be setup to serve
your static files. In development, or if you just don't want to set
that up, with Compojure you can use compojure.route/files to serve
static files [1].
Or, as
Reader macros are expanded by the reader, regular macros are
expanded by the compiler. The reader is what translates the text
strings that you have typed into Clojure data structures, the compiler
translates those data structures into executable code. Clojure does
not allow you to define custom
You can use the :pre and :post assertions on functions. Something
like the following would do what you are asking:
(defn myfun
[ {:keys [arg1 arg2 arg3] :or {arg1 default-value} :as args}]
{:pre [(every? #{:arg1 :arg2 :arg3} (keys args))]}
(println arg1 arg2 arg3 args: args))
Also,
:
On Nov 27, 8:43 am, Mark Rathwell mark.rathw...@gmail.com wrote:
Also, another way to take keyword arguments is:
(defn foo [ opts]
(let [opts (apply hash-map opts)]
(println opts)))
This is what already happens internally with the {:keys ...}
notation. You can actually be rather
Do I need Cygwin at all for Clojure work on
Windows/Emacs/Swank/clojure-mode/lein?
I don't think so. If lein.bat is on your path and is working, and if
emacs and clojure-mode are working, that's really all you need. There
are utilities and tools out there that you may want to use at some
You rebind dynamic vars with binding, so your use would look something
like this:
(binding [*logger-factory* (log-impl/log4j-factory)]
(do-stuff-with-the-logger-factory-rebound))
On Thu, Nov 17, 2011 at 5:17 PM, vitalyper vitaly...@yahoo.com wrote:
clojure.tools.logging defines
slime-connect should connect you and give you a repl).
- Mark
On Wed, Nov 16, 2011 at 4:15 PM, Andrew ache...@gmail.com wrote:
Having trouble setting up Clojure/Emacs on Windows again. Earlier Mark
Rathwell helped me by pointing out a recipe for Windows that resolved an
issue with sh. After having
I think there is some path issue in your setup between Cygwin and
Windows that will take some work to diagnose. You might try
installing everything from scratch, or maybe try a Linux vm with
VirtualBox (free) or VMWare. Either way, you can use lein swank and
slime-connect in the meantime.
On
I put a logging.properties file in the resources directory of the project
but it does not seem to pick it up. Do I have to do something else to
override the default logging from the java library I am using?
You still need to load the properties and tell the logger to use them.
Assuming it is
You still need to load the properties and tell the logger to use them.
Assuming it is using log4j, something like the following should do
that (completely untested though):
...
(:require [clojure.java.io :as io])
...
(with-open [s (io/input-stream (io/resource logging.properties))]
J2SE is available by default (since it is included with the JVM). I
believe java.lang.* is accessible without importing, and anything else
needs to be imported before using, can't remember for sure though.
So, (Math/sqrt 25) should just work.
On Tue, Nov 8, 2011 at 1:33 PM, megabite
Haven't tested, but seems like this should get you started with korma:
lein:
[korma 0.2.1]
[sqlitejdbc 0.5.6]
korma [1]:
(defdb mydb {:classname org.sqlite.JDBC
:subprotocol sqlite
:subname db/mydb.sqlite3});; Location of the db
[1]
. I just want to feed this servlet to
appengine-magic.
Thanks,
Razvan
On Nov 6, 10:43 pm, Mark Rathwell mark.rathw...@gmail.com wrote:
I'm still having trouble figuring out what it is you are wanting to
do, but if you have an existing Java servlet that will handle some url
pattern, and you
I'm not using
ring, I have a servlet which I need to feed to appengine-magic.
Not sure what you mean by this, could you expand on it a little more?
You have an existing Java servlet that you want to handle some url
pattern, and you want to integrate that into your appengine-magic app?
On Sun,
a ring handler to call def-
appengine-app:
(appengine-magic.core/def-appengine-app my-app #'my-ring-handler)
I have a servlet and want to build an application, something like:
(appengine-magic.core/def-appengine-servlet-app my-app #'my-servlet)
Razvan
On Nov 6, 4:32 pm, Mark Rathwell
at 3:24 PM, Razvan Rotaru razvan.rot...@gmail.com wrote:
The servlet is coming from an external jar, which is written in Java.
I need appengine-magic for the other services, like datastore.
Razvan
On Nov 6, 7:45 pm, Mark Rathwell mark.rathw...@gmail.com wrote:
I'm still not quite following
On Tue, Nov 1, 2011 at 7:33 PM, David Nolen dnolen.li...@gmail.com wrote:
(isa? (type '(:foo :bar)) clojure.lang.IPersistentList) = true
(isa? (type ()) clojure.lang.IPersistentList) = true
(isa? (type (list)) clojure.lang.IPersistentList) = true
(type ()) ;=
It uses (meta (var common/basic-logger)).
On Mon, Oct 31, 2011 at 2:28 PM, Sean Devlin francoisdev...@gmail.com wrote:
I'm a bit confused by what the doc macro is doing. Doesn't it simply
work of the metadata of what is passed to it?
I try this at the REPL:
user= (doc common/basic-logger)
31, 2:59 pm, Mark Rathwell mark.rathw...@gmail.com wrote:
It uses (meta (var common/basic-logger)).
On Mon, Oct 31, 2011 at 2:28 PM, Sean Devlin francoisdev...@gmail.com
wrote:
I'm a bit confused by what the doc macro is doing. Doesn't it simply
work of the metadata of what is passed
)
(reset-meta! (var ~symbol) m#)
(var ~symbol)))
Then:
(= (meta (var symbol)) (meta init)) ;= true
(= (meta (var symbol)) (meta symbol)) ;= true
On Oct 31, 4:20 pm, Mark Rathwell mark.rathw...@gmail.com wrote:
def already adds metadata on the symbol as metadata on the var. Did
, 2011 at 1:13 AM, e evier...@gmail.com wrote:
On Thu, Oct 27, 2011 at 8:26 PM, Mark Rathwell mark.rathw...@gmail.com
wrote:
Maybe it would be clearer if I proposed some other, lesser-used chars,
like
%(1 2 3 4) or even 1 2 3 4. That is, I'm not so much saying,
this
needs to be treated
Maybe it would be clearer if I proposed some other, lesser-used chars, like
%(1 2 3 4) or even 1 2 3 4. That is, I'm not so much saying, this
needs to be treated as data and not eval'd as I am simply saying, this is
the 'list' data structure as opposed to some other.
A list data structure
The point to think about here is that functions are also lists, the
same as your list of integers. The difference is that one is
evaluated, the other is not. That is what the quote is saying: don't
evaluate me. The quote is not actually a part of the list. It's just
the way you tell the reader
'(1 2 3) is a list that is not evaluated. No loss of generality. it's a
special type of list. One that's not evaluated. as opposed to a special
indicator to the repl.
That would essentially be a new data structure, filling a role mostly
already filled by vectors. And you would still need
In the original discussion in this list, a couple alternatives similar
to the following were suggested for property access to remain closer
to the Clojure situation:
(set! (.:id foo) my-css-id))
(set! (.:fillStyle ctxt) rgb(255, 150, 0))
Were those thrown out for being too ugly?
I didn't
are installation
instructions and tutorials for Clooj and Leiningen. Those are
generally where you will want to start if you are not familiar with
emacs or any of the big Java IDEs.
[1] http://dev.clojure.org/display/doc/Getting+Started+for+Beginners
Sagar, I had trouble on Windows until Mark
Are you behind a firewall or proxy that would be blocking .zip files?
lein search first makes sure it has an updated index from those
repositories, and if not tries to download and unzip those index
files:
http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.zip
those files from a browser.
On Oct 14, 2:17 pm, Mark Rathwell mark.rathw...@gmail.com wrote:
Are you behind a firewall or proxy that would be blocking .zip files?
lein search first makes sure it has an updated index from those
repositories, and if not tries to download and unzip those index
Now compare to the proposed change:
(set! (. foo :id) my-css-id))
(set! (. ctxt :fillStyle) rgb(255, 150, 0))
In the original discussion in this list, a couple alternatives similar
to the following were suggested for property access to remain closer
to the Clojure situation:
(set! (.:id foo)
In 1.3 doc was moved to the clojure.repl namespace. So, at the repl, you can:
(use 'clojure.repl)
and (doc foo) should work again.
On Fri, Sep 30, 2011 at 3:12 PM, Andrew ache...@gmail.com wrote:
When I do M-x clojure-jack-in on one project.clj which uses clojure 1.2.1,
I'm able to evaluate
And in this case Closure compiler behave itself also unpredictably and
quite the contrary:
Where it must evaluate a symbol (like in this case), it doesn't.
Symbols need to be namespace resolved in order to be evaluated
properly. This is something you need to be aware of, but it is not
Use macroexpand-1 to expand a call to this macro, and it should be
clear what is going on. The expanded code tries to call 5 as a
function. What you are probably trying to do here is make (5 + 2) a
list, not a function call.
;; (note the unquote splicing of e)
(defmacro infix [e] `(let [[x# f#
(let [rand (new java.util.Random) nextInt (fn [a] (.nextInt rand))]
((map (print) (iterate ((nextInt dummy) 0)
extra parenthesis in three places, and the first argument to iterate
is a function, not a long:
(let [rand (new java.util.Random) nextInt (fn [a] (.nextInt rand))]
(map print
Intentionally avoiding leiningen on ideological grounds will make
things more difficult and frustrating for yourself. If you do want to
try it out, there are links below to get you started below. You can
realistically be up and running with emacs and slime in less than an
hour.
lein:
Anyone can create their own account on clojars and publish their own
forks to their own group name. There are 22 forks of enlive on
github, the original is by Chrisotphe Grand [1], [2]. His most recent
version published to clojars is 1.0.0. Generally, people try not to
publish their own forks
A previous discussion on the topic can be found here [1]. You can
easily add the private metadata yourself:
Clojure 1.2: (def ^{:private true} size 25)
Clojure 1.3: (def ^:private size 25)
I think probably the reason against it is that generally there is not
as much reason to use a constant,
The distinction is that you type hint function parameters to tell the
compiler that this function parameter will always be of the specified
type. You coerce something that may or may not be of a desired type,
but is known to cleanly convert to that type.
So:
(defn add-two [^long x]
(+ x 2))
On Wed, Sep 14, 2011 at 2:21 PM, Mark Rathwell mark.rathw...@gmail.com wrote:
The distinction is that you type hint function parameters to tell the
compiler that this function parameter will always be of the specified
type. You coerce something that may or may not be of a desired type
How about this:
(#(true)), is this not calling a function that has no arguments and
returns true? But it still gives same exception
This actually is trying to call 'true' as if it were a function, not a
constant. The thing I think you're missing here is: when a symbol is
butted up against an
, just for learning. See the other responses for the
actual ways to do what you are trying to do.
On Wed, Sep 7, 2011 at 8:24 AM, Mark Rathwell mark.rathw...@gmail.com wrote:
How about this:
(#(true)), is this not calling a function that has no arguments and
returns true? But it still gives
Huh, interesting. I assumed ^:foo meta syntax was new to 1.3, and
wouldn't compile at all in 1.2. But now I see that in 1.2 it's
equivalent to ^{:tag :foo} - not useful, but not damaging either. I
guess I'll start using ^:dynamic myself.
Actually, it causes compiler errors, when the compiler
I prefer to use ^{:dynamic true} instead of ^:dynamic, unless you're
recommending intentionally breaking compatibility with 1.2 so as to
encourage people to move to 1.3.
What is meant by breaking compatibility? I haven't noticed any
issues using ^:dynamic with 1.2, am I missing something?
The sole alternative to an additional
machine in that case is to perform major surgery on an existing one,
involving a hard drive repartitioning
VirtualBox is free: http://www.virtualbox.org/
On Tue, Aug 30, 2011 at 12:57 PM, Ken Wesson kwess...@gmail.com wrote:
On Mon, Aug 29, 2011 at
On Tue, Aug 30, 2011 at 6:06 PM, Mike S mike73...@gmail.com wrote:
Two question:
1. Can I use clojurescript with dojo?
You should be able to use the advanced compile option with Dojo, it is
the only library other than Google Closure to meet the Closure
compiler requirements for the advanced
You can have a look at Compojure [1], Noir[2], and Conjure[3], but if
you want the enterprise standard, you will probably need to wrap one
of the Java frameworks that do that stuff well.
[1] https://github.com/weavejester/compojure
[2] https://github.com/ibdknox/noir
[3]
See the doc below. What (contains? [1 2] 1) is testing is whether [1
2] has a value at index 1 (the key value for numerically indexed
collections). It does, so it returns true. What you are probably
looking for is the Java method .contains of the vector:
(.contains [a b] a)
;= true
(.contains
1 - 100 of 216 matches
Mail list logo