clojure.string/starts-with? was added in Clojure 1.8.0, I see 1.7.0 in the
project.clj?
See
https://github.com/clojure/clojure/blob/b1b88dd25373a86e41310a525a21b497799dbbf2/src/clj/clojure/string.clj#L362
What exactly else is going on I don't know but it all starts from the wrong
Clojure
>
> None of these libraries are broken. They just include resources. Also, I
> don't think it is realistic to tell library authors to please move certain
> files out of the way because my build tool randomizes my classpath. That is
> not going to happen. People will keep including things like
This might be a good incentive for people to keep their published .jar
files clean. Unfortunately many published CLJS libs contain the rather
common "public" folder with "public/index.html" and often compiled .js
artifacts which aren't actually ever used.
I do however think that it is useful
Self-hosted should work the same way but it does require compiling the
macro namespace in an extra step (ie. the $macros ns is created
separately). I don't know how this is done for regular self-hosted.
shadow-cljs has an extra build step for this that should take care of
creating everything.
Hey,
cljs.test/assert-expr is part of the CLJ macro side so it can't be extended
from a CLJS REPL. You can write it in a .clj file and use (require-macros
'that.ns) from the CLJS REPL or use :require-macros in the ns form that
uses the new assert-expr.
HTH,
Thomas
On Thursday, September 26,
gt;!! c 42) should block because there is no buffer available.
>
> On Sunday, May 19, 2019 at 1:48:16 PM UTC-7, Thomas Heller wrote:
>>
>> (> by the first go (running in a different thread). So it is blocking until
>> something puts another value into c. Since nothing
(
> The documentation for >!! reads:
>
> -
> clojure.core.async/>!!
> ([port val])
> puts a val into port. nil values are not allowed. Will block if no
> buffer space is available. Returns true unless port is already closed.
>
>
> I have a case where I believe that the
I'm doing this in shadow-cljs deploying a normal jar and one with aot. I'm
not exactly sure how you'd do that for an uberjar though.
https://github.com/thheller/shadow-cljs/blob/master/project.clj#L96-L103
On Thursday, March 28, 2019 at 7:05:39 PM UTC+1, henrik42 wrote:
>
> Hi,
>
> I have an
To expand on what Alex already mentioned. There is no such thing as
double-colon keywords. Double-colon is a reader alias mechanism that let
the reader resolve them so you can type less.
(ns foo.bar.xyz)
::hello
this is resolved at read-time and identical to actually writing
lazy-seq is the short answer.
You are constructing the seq inside the try/catch but it is realized
outside of that so no exceptions will be caught.
(defn gen-ym-list [from to]
(try
(->> (p/periodic-seq (f/parse ym-fmt from) (t/months 1))
(take-while #(not (t/after? % (f/parse
You can create a deps.cljs in the root of your classpath for Y and declare
:npm-deps there
;; src/deps.cljs
{:npm-deps {"the-thing" "version"}}
This way the compiler can pick up your npm dependency and install it.
On Monday, January 15, 2018 at 9:01:55 AM UTC+1, Lucas Wiener wrote:
>
> Hi,
>
>
This is only an issue in unoptimized code, ie. :none.
Without optimizations all code is in separate files which are loaded in
dependency order. The default debug loader will load them by appending a
script tag to the document. This has pretty terrible performance
characteristics but is OK
>
> What is the best way to determine the right value for this? I remember
> that in the past I had a lot of little Java
>
> programs running and got a much better performance by limiting memory
> usage.
>
That is not an easy question to answer. If you make it too small your
process may
Last thing I can come up with is your environment variables or something in
your ~/.lein/* folder. Beyond that I'm out of ideas.
On Monday, February 27, 2017 at 2:15:18 PM UTC+1, Cecil Westerhof wrote:
>
> 2017-02-27 13:57 GMT+01:00 Cecil Westerhof >:
>
>> Maybe you have
Maybe you are running an old version of leiningen?
This might work although JVM_OPTS works fine for me as well
:jvm-opts ^:replace ["-Xmx512m"]
Maybe you have some other conflicting configuration somewhere that sets it
explicitly to 4G? Usually no maximum is set and the JVM will automatically
Ideally you would run your program without lein, probably as an uberjar.
But if you insist on lein you can do "lein trampoline run -m your.main/fn"
which will allow the lein process to exit after setting up your program
leaving you with only one JVM.
To control the memory you can add :jvm-opts
You may overwrite the default IPrintWriter by doing calling extend-type
after the defrecord.
But CLJS should probably allow the protocol in defrecord itself instead of
forcing the default. Not sure if there is an open issue for it.
On Friday, November 11, 2016 at 9:29:25 PM UTC+1, William la
Try https://github.com/weavejester/cljfmt
It is specifically written for clj code and not general pprinter.
/thomas
On Sunday, October 23, 2016 at 1:28:23 PM UTC+2, Jiyin Yiyong wrote:
>
> I'm using `write` function to generate code very heavily. But small part
> of the code are hard to read.
21 AM UTC+2, John Szakmeister wrote:
>
> On Tue, Oct 18, 2016 at 2:59 AM, Thomas Heller <th.h...@gmail.com
> > wrote:
> [snip]
> > While this issue can be very confusing you will hardly ever run into it
> when
> > following best practices. As David sugg
wn fork
> of Closure Compiler. Which is not that scary with git. It is pretty easy to
> automate rebasing of a few patch-commits on top of arbitrary complex
> foreign repo.
>
> [1]
> https://github.com/google/closure-compiler/blob/5616a66e40c5dc6ec9be9beacfc0ea20d47bbcfc/src/com
FWIW I investigated the check with "true" and a sentinel value and found
them to both have a small performance impact over just checking for a
true-ish property.
http://dev.clojure.org/jira/browse/CLJS-1658
The impact is really small so it might be worth the trade-off.
/thomas
On Sunday,
In general Java it is up to the creator of a "stream" to close it, the same
applies to Clojure pretty much.
Java has "try with resources" and in Clojure you can use "with-open":
(with-open [rdr (open-the-reader)]
(edn/read rdr {}))
This will ensure .close is called in a finally block.
HTH,
Not sure I understand what you mean. What do you mean by "main module"?
cljs has a notion of a base module, while shadow-build does not.
Typically your ns structure and the requires are enough to establish
relationships between them so shadow-build can figure out what needs to be
where. If
v20151216"]
>>[org.clojure/google-closure-library "0.0-20151016-61277aea"]
>> [org.clojure/google-closure-library-third-party
>> "0.0-20151016-61277aea"]
>>
>> the full output is here.
>>
>> https://gist.github.com/8801e6
That was an issue with old closure library releases but was fixed a while ago.
Try lein clean and make sure there are no conflicting versions being used (via
lein deps :tree).
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group,
Projects for this already exist but are somewhat dormant.
See:
https://github.com/clojure/tools.analyzer
https://github.com/clojure/tools.analyzer.jvm
https://github.com/clojure/tools.analyzer.js
https://github.com/clojure/tools.analyzer.clr
https://github.com/clojure/tools.emitter.jvm
Neither
Hey,
I have seen Servant but I do not like it. In general I do not like
solutions that use macros to solve problems a build tool should solve. YMMV.
cljs-runtime is the directory used by shadow-build for all compiled files.
The structure it creates is that you have one directory, with a .js
Hello,
I'm not quite sure what you are saying here since I do not know boot or
hoplon or durable-cells.
I can however suggest a "better" solution for Workers: Using Closure
Modules.
CLJS or boot do not implement them for :none at the moment but shadow-build
does. I also have a few extra
>
>
> What could we do to make the Exception visible, assuming there is one?
>
>
Exceptions are ALWAYS visible, the only way they get lost is the try/catch
blocks you added in your code which effectively swallow and ignore them.
The JVM will not randomly lose an Exception, it is always code
I see no code to ever call
(timbre/log :trace (str "in catch-exceptions our reply was: " reply))
Probably just a copy error, other than that things look correct.
The JVM is complex, but strange things happening are pretty much always
related to programmer errors.
If you add that line
FWIW getting 1mil+ connections will requires some OS level tuning even in
Erlang. So you are not going to get that in a benchmark that is not set up
for this.
In the JVM you are going to run into GC problems eventually, depending on
how much state/memory you keep per connection. It might work
, pretty
much all of it is till going to apply to an app of that scale. Are you sure
you are going to need that scale? 1mil connections is a pretty ambitious
goal.
/thomas
On Wednesday, October 7, 2015 at 8:50:47 PM UTC+2, Thomas Heller wrote:
>
> FWIW getting 1mil+ connections will re
o
> absolutely agree that the cognitive overhead of the macro isn’t justified
> here.
>
> On 2 Oct 2015, at 14:29, Thomas Heller <th.h...@gmail.com >
> wrote:
>
> Have you tried NOT using a macro at all? This code does not need to be a
> macro at all if you ask me.
>
&
Have you tried NOT using a macro at all? This code does not need to be a
macro at all if you ask me.
Just a little sketch but things could look just about the same without any
macros at all:
(let [form {:editing? true
:values form-values
:validation validation-report
se this use-case will never need a macro as hiccup very
> sensibly uses data so the thing passed to (form) is simply a vector.)
>
> I am saying, the discussion of whether _this example_ justifies a macro is
> mute - I agree it doesn’t.
>
> On 2 Oct 2015, at 15:01, Thomas Heller
To be honest I see no point in using core.async or any other library for
that matter. Java already solves this problem very well.
(ns ...
(:import [java.util.concurrent TimeUnit Executors]))
(def scheduler
(doto (Executors/newSingleThreadScheduledExecutor)
(.scheduleAtFixedRate
Hey,
this might not be too relevant to your project but since you said "web
project" it might be.
I cannot speak for Go but Clojure is "fast enough". I went from Ruby to
Clojure in one app and the difference was huge (150ms-ish -> 10ms-ish). I'm
actually somewhat of a performance junkie and
ords are created using
> s/defrecord, the factory functions (->, map->) will automatically validate
> them?
>
> I really appreciate you taking the time to clarify things for me.
>
> --
> Amith
>
>
>
> On Monday, 7 September 2015 20:57:46 UTC+5:30,
>
>
> For instance, which one of these to you consider to be the best
> representation of a event to set the expiry time:
>
>[:cache/expire #inst "2015-09-08T12:00:00Z"]
>
>{:type :cache/expire, :value #inst "2015-09-08T12:00:00Z"}
>
>#cache.Expire [#inst "2015-09-08T12:00:00Z"]
>
>
FWIW before I came to Clojure I did a lot of Erlang and in the beginning I
was at the exact same spot wanting to use pattern matching everywhere
because it is so damn cool. Same goes for tagged literals.
After a little while I realized that it is just not the way to do it in
Clojure and
>
>
> (def Recipient
>> (s/either PlaceHolder
>> Existing
>> OneOff))
>>
>
> This looks interesting. Where would I actually use this? I mean, if I have
> created three records, I may as well implement multi methods or protocols,
> right? Even if I don't do those, I
No idea what HttpInputOverHTTP is but I'd guess that it is an InputStream
implementation.
Try (slurp (:body request))
HTH,
/thomas
On Wednesday, August 19, 2015 at 9:57:57 PM UTC+2, Lawrence Krubner wrote:
I know this has been asked before, but Google is interpreting
HttpInputOverHTTP as
Hey,
I made a similar suggestion (minus the ThreadLocal) a few weeks ago,
although for slightly different reasons. [1]
It should be noted that your async macro does in fact use the dispatcher
just like a normal go would, the only difference is that it will start
executing immediately in the
That article makes it sound like an OOP beast, it is really much simpler
than that.
--
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
example I can refer to.
Cheers,
/thomas
On Friday, July 3, 2015 at 9:39:24 AM UTC+2, James Henderson wrote:
Hey Thomas, thanks for your e-mail :)
On Monday, 29 June 2015 11:25:44 UTC+1, Thomas Heller wrote:
Hey,
interesting approach but I don't like the nesting and manual wiring
Hey,
interesting approach but I don't like the nesting and manual wiring of
dependencies. I don't quite like that every with-* function remains on the
stack as well, but it shouldn't hurt that much. An uncaught exception will
also take down your entire system, but I guess you'd have a
Cache-control is evil. Users concerned with seeing the most up-to-date
information know to hit reload (and probably do anyway, just to be sure),
and there's also the option of AJAX polling for that (or whatever precisely
sites like Facebook do).
I don't even a wrong
On Wed, Jun 17, 2015 at 9:50 PM, James Reeves ja...@booleanknot.com wrote:
On 17 June 2015 at 09:51, Thomas Heller th.hel...@gmail.com wrote:
On another note: Sessions in cookies should be VERY VERY small.
java.io.Serializable usually isn't small and especially if you go java
object - binary
Hey,
the issue is not in clojure.core. It is with ring in this case, it uses
clojure.tools.reader.edn/read-string which supports an optional {:readers
{...}} argument but there is no way to specify those in ring. Should be a
fairly simple fix though, doing anything to clojure.edn won't help as
, Thomas Heller wrote:
Hey,
the issue is not in clojure.core. It is with ring in this case, it uses
clojure.tools.reader.edn/read-string which supports an optional {:readers
{...}} argument but there is no way to specify those in ring. Should be a
fairly simple fix though, doing anything
Hey,
I'm curious what you are trying to measure in regards to Clojure. As far as
I know there is not a single Web Server actually written in Clojure, they
are all written in Java and we just use them. The Compojure benchmark you
linked uses the default Jetty Adapter for Ring (like Rack in Ruby
You should check your sources. http-kit is not written in Clojure and does
not use netty.
On Wednesday, April 22, 2015 at 11:40:21 PM UTC+2, François Rey wrote:
On 22/04/15 20:22, Thomas Heller wrote:
As far as I know there is not a single Web Server actually written in
Clojure
Cat is just missing a print-method entry.
Try (into [] (r/fold 1 r/cat r/append! [1 2 3])), the result is what you'd
expect. The n parameter isn't actually about parallelism but partition
size. Fork/Join will decide the parallelism. In the case of n=1 the input
will be split into 3 partition
.
Crispin
On Wednesday, January 28, 2015 at 6:23:29 PM UTC+8, Thomas Heller
wrote:
I just have a guess for you.
AudioContext.decodeAudioData parameters are declared as ArrayBuffer,
Function, Function but you are passing data which is a String not an
ArrayBuffer. Maybe the type inference
I just have a guess for you.
AudioContext.decodeAudioData parameters are declared as ArrayBuffer,
Function, Function but you are passing data which is a String not an
ArrayBuffer. Maybe the type inference thinks you are calling a method that
is not defined in the externs?
Maybe it will work
https://github.com/clojure/tools.reader is probably your best bet.
On Friday, January 16, 2015 at 12:13:22 AM UTC+1, zirkonit wrote:
I'm thoroughly confused. If I want to parse clojure code from string
without evaluating or caring a lot about its context, I'm out of luck.
EDN tools choke on
If you want to boost performance a bit just memoize the conversion
functions. Memoize makes you vurnable to exploits though, better use
something with WeakRefs if you convert anything from untrusted sources (eg.
guava CacheBuilder). But given your usecase this will probably be the
biggest
I built a PostgreSQL Java client from scratch recently. Since it was not a
goal to support JDBC ever I thought about writing it with non-blocking
async IO. I played with some ideas but ultimately I decided not to. The
reason is quite simple. Async IO works well if you do enough IO to keep one
Here is a crazy idea I had.
https://gist.github.com/thheller/ad7dc6234f205cf4a53f
Basically it slurps the .clj file of the current namespace, then looks at
the form metadata to skip to the line where the (example ...) starts.
It then takes the next row as the title, then reads all rows until
Oops, simplified a little. We already have access to the title. ;)
On Monday, January 5, 2015 1:09:24 AM UTC+1, Thomas Heller wrote:
Here is a crazy idea I had.
https://gist.github.com/thheller/ad7dc6234f205cf4a53f
Basically it slurps the .clj file of the current namespace, then looks
I had a similar problem some time ago.
The analysis is correct that Clojure will always load user.clj. As a
workarround I just moved the require out of the ns form.
(ns user
(:require [mdg.meat2]))
becomes
(ns user)
(defn start []
(require 'mdg.meat2 :reload-all)
(do-something-useful))
Hey,
without knowing much about your application/business needs its hard to
speculate what might be good for you. The root of your problem might be
CouchDB since it was never meant for Big Data and since we are talking
tweets I generally think a lot. I'm not sure how your map value looks but
Due to significant platform differences from the JVM to Node.js (no real
threads, everything needs callbacks) you'd probably be better off writing
something more javascript-y. Porting Ring is probably not likely since
everything is async and Ring is not. Same goes for Compojure but that is
Hey,
what is your definition of an async function in Clojure? I imagine
something something that starts a (go ...), if appropriate you can use the
result of (go ...) as the result of the function since that is a channel
that will receive the return value of the go block when it dies.
(defn
@Jacob: If you get too many arguments in a loop I found it best to use a
map.
(loop [{:keys [a b c] :as state} a-map]
(cond
(and (= a 1) (= b 2))
(recur (update state :a inc)) ;; 1.7+ only, otherwise use update-in
...))
Working with named arguments (vs. positional) is a lot more
The way you wrote your loop it will only ever run once which means you
could take it out.
1 res = take from queue
2 if res nil? terminate
3 if res recur with result from with-open (always nil)
4 back to 2 and terminate
Not sure if this is intended but the way it is written it does not make
I meant to do a proper release announcement for quite some time now but
simply don't have the time to do it properly.
That being said I have now been using shadow-pgsql [1] in production for
well over a month and it has been working as expected and stable. A
couple million Queries were
I use http-kit as a web server as well. My deployment basically looks like
this:
My main function starts my app, once I have an app instance I attempt to
start the http-kit server on a specific port. I do this in a loop, catching
all socket already bound exceptions and retrying. Additionally I
core.sync is more about coordination and communication than about doing
things in parallel, thats just a pleasant side effect.
In your case you don't need anything core.async provides. You could either
use reducers or java.util.concurrent.ExecutorService.
(let [exec
Uh forgot to .shutdown the exec, proper cleanup is important otherwise the
threads might hang arround a bit.
On Wednesday, September 17, 2014 1:26:00 PM UTC+2, Thomas Heller wrote:
core.sync is more about coordination and communication than about doing
things in parallel, thats just
.
On Thursday, 21 August 2014 19:00:11 UTC+1, Thomas Heller wrote:
Hey Clojure Folk,
I'm close to releasing the first alpha version of https://github.com/
thheller/shadow-pgsql a native interface to PostgreSQL I wrote.
Its an implementation of the native binary protocol without any intent to
ever
As much as I like Clojure and atoms, I do not think they are a good fit for
caching. Not only is it impossible to address the concurrency issues
related to multiple threads loading the same object, but you also have to
do expiration and size management yourself. Immutability doesn't help much
strange use case, which is nice :-). For more typical server side
caching, I agree that Guava would be a great solution.
Cheers,
Colin
On 1 September 2014 20:54, Thomas Heller th.h...@gmail.com javascript:
wrote:
As much as I like Clojure and atoms, I do not think they are a good fit
On Saturday, August 23, 2014 8:05:37 PM UTC-4, Thomas Heller wrote:
EDN/Transit on the backend might be nice, but a little much for me. I'll
take it if you feel like a lot of C. jsonb in 9.4 will have to do for now.
Transparent encoding/decoding is already built-in to the client though,
even
It is possible, the question is WHEN?
You can make a function callable by name if you export it.
(ns myns)
(def ^:export testfn []
:foo)
can be called like so, must be careful with name munging though:
(let [the-fn (aget js/window myns testfn)]
(the-fn))
which also works with advanced
, August 21, 2014 at 1:00 PM, Thomas Heller wrote:
Hey Clojure Folk,
I'm close to releasing the first alpha version of
https://github.com/thheller/shadow-pgsql a native interface to
PostgreSQL I wrote.
Its an implementation of the native binary protocol without any intent
On Sat, Aug 23, 2014 at 11:23 AM, Thomas Heller th.h...@gmail.com
javascript: wrote:
Hey Kyle,
thanks for the Feedback. Appreciate it.
I think you misunderstood the meaning of a type in shadow-psql. A
type
is merely the format of how a given value is represented on the wire
Hey Clojure Folk,
I'm close to releasing the first alpha version
of https://github.com/thheller/shadow-pgsql a native interface to
PostgreSQL I wrote.
Its an implementation of the native binary protocol without any intent to
ever support JDBC. Mostly because that provides a bunch of features
Hey,
it's not how you'd usually do things in Clojure and I'd consider the use of
an atom in this place as wrong.
I was struggling with Clojure in the beginning too and my code looked
pretty much like yours, but the faster you get into the Clojure mindset the
easier it will be.
This might be
Looks nice, although I still need to wrap my head arround it.
I don't believe in micro-benchmarks but I did one anyways cause I was
curious how transduce would stack up against reduce (not reducers).
https://github.com/thheller/transduce-bench
transduce
Evaluation count : 2220 in 60 samples
Both Transit and fressian take a Handler map as arguments to the
reader/writer functions/constructors. So its pretty straightforward to
replace the default handlers with handlers that do what you want.
I have no example handy but it should be documented in both libraries.
Transit has
dotimes is for doing things n times. doseq is for seqs. Use dotimes when
you can, doseq when you can't.
On Wed, Aug 6, 2014 at 12:13 AM, Cecil Westerhof cldwester...@gmail.com
wrote:
2014-08-05 19:04 GMT+02:00 Thomas Heller th.hel...@gmail.com:
If you don't need the result of the for loop
If you don't need the result of the for loop (which you don't in your
example) use doseq.
Same syntax as for but not lazy and no return value (well, nil to be
exact)
(doseq [i (range 10)]
(aset intArr i (int 0)))
...
On Tuesday, August 5, 2014 5:41:08 PM UTC+2, Cecil Westerhof wrote:
I
FWIW I was not able to reproduce this behavior? What exactly does your code
look like?
See the source and the compiled version:
https://gist.github.com/thheller/4731f682665d38b1053c
Seems to me the shadowing kicked in correctly.
eval seems to be missing in :js-globals though.
I was not able to reproduce Sam's initial problem.
eval as I said does not appear in the :js-globals which seems like a
mistake.
--
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
https://gist.github.com/thheller/4731f682665d38b1053c
On Monday, August 4, 2014 3:34:33 PM UTC+2, Nicola Mometto wrote:
Try with (fn document [] js/document)
Thomas Heller writes:
I was not able to reproduce Sam's initial problem.
eval as I said does not appear in the :js-globals
David its probably best to hold off on that release. It seems the
closure-library HEAD version depends on a newer closure compiler version
than the one available via maven.
At least I'm seeing some renaming issues for advanced compilation.
--
You received this message because you are
Sorry, I would be if I could.
Trying to track it down, but debugging an optimized build is not exactly easy.
:(
When using 2277 I have no errors, when using 2277 with the new closure lib
release I have some undefined errors. That usually means some sort of
renaming gone wrong.
Error:
Cannot
Geez, 2277 actually works just fine. 2234 doesn't work, but it actually doesn't
work with either closure-library version. Forgot that I reverted to 2234 due to
the keyword issue.
2277 + [org.clojure/google-closure-library 0.0-20140718-946a7d39]
seems fine, except for that keyword issue.
Sorry
, Jul 30, 2014 at 11:11 AM, Thomas Heller th.h...@gmail.com
javascript: wrote:
Geez, 2277 actually works just fine. 2234 doesn't work, but it actually
doesn't work with either closure-library version. Forgot that I reverted to
2234 due to the keyword issue.
2277 + [org.clojure/google
Uhm small hint on how I'd do that? My maven-fu is weak.
But given that
https://oss.sonatype.org/content/repositories/orgclojure-1311/org/clojure/google-closure-library-third-party/0.0-20140718-946a7d39/google-closure-library-third-party-0.0-20140718-946a7d39.jar
does not contain a goog/base.js
wrote:
Just add sonatype to your :repositories project.clj entry
https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L79
David
On Tue, Jul 29, 2014 at 4:22 PM, Thomas Heller th.h...@gmail.com
javascript: wrote:
Uhm small hint on how I'd do that? My maven-fu is weak
Your issue is probably due to AOT compilation, uberjar aot compiles
everything and leaves alot of class files in your target directory (aka
classpath). When you run your app afterwards the class file is used instead
of the clj file since the .class file is newer. When you run lein clean
those
Hey David,
CLJS-826 is only partly resolved in this release since it only takes effect
with a new closure-third-party release since the current jar is causing the
problem.
Would be nice if you could build a new closure release and bump the
dependency in clojurescript.
Thanks,
/thomas
On
Hey,
I had this problem with a jar from Bing which is not available on maven.
You can use a local repo without any plugins or extra work for others.
Try this:
Pick a directory for your local maven repo, should be inside your git repo.
I'm using maven.
Take your jar and run
mvn
the uberjar so you'll have jar in a jar
which java doesnt understand.
/thomas
On Thursday, July 24, 2014 3:22:37 PM UTC+2, Yura Perov wrote:
Dear Thomas Heller,
Thank you very much for your reply.
As I mentioned in my initial post (sorry, it was a bit long), I
successfully managed local
catch returns the value of the last statement, so instead of the (str) you
could just return 0.0.
Also don't use read-string if you only expect floating point numbers,
otherwise (convert-to-float :hmm) returns :hmm, not exactly a float.
Since closure uses Double as the default floating point
I usually just give every ENTITY in my system a primary id and structure
everything in a nested map.
{:people {1 {:id 1 :type :student :name Ben :taking-classes #{1 2}}
2 ...}
:classes {1 {:id 1 :name Clojure 101}
2 ...}}
This basically looks like a database table. You can
Short and simple answer: NullPointerException
(def object-locations nil)
(object-locations 'bucket) will throw
('bucket object-locations) = nil
HTH,
/thomas
On Wednesday, July 9, 2014 3:48:53 PM UTC+2, Cecil Westerhof wrote:
When you have:
(def object-locations {
'whiskey
Oh and its rare (outside of macros) to use symbols like that. Usually you'd
use keywords.
(def object-locations
{:whiskey :living-room})
On Wed, Jul 9, 2014 at 5:03 PM, Thomas Heller th.hel...@gmail.com wrote:
Short and simple answer: NullPointerException
(def object-locations nil
1 - 100 of 155 matches
Mail list logo