Hey,
for produces a lazy sequence (as does flatten) which is hurting you here.
You could wrap everything in a doall but I'd recommend using reduce since
thats technically what you want here. I'd probably go for something like:
(defn filter-file [filename]
(with-open [rdr (io/reader filename)
On Sat, Jun 8, 2013 at 7:16 PM, Steven D. Arnold <
> thoth.amon.i...@gmail.com> wrote:
>
>> Thanks for the responses! As suggested, wrapping in 'doall' does work.
>>
>>
>> On Jun 8, 2013, at 3:28 AM, Thomas Heller wrote:
>>
>> (defn filter-
Hey David,
I wanted to try core.match for a while and fiddled around a bit to see what
kind of code is generated by match, in doing so I found a potentially
"dangerous" bug.
See: https://gist.github.com/thheller/5850693#file-match-clj-L67
If a match has no :else clause an IllegalArgumentExcept
e
> same as `case` with respect to the no match exception.
>
> David
>
>
> On Mon, Jun 24, 2013 at 11:10 AM, Thomas Heller
>
> > wrote:
>
>> Hey David,
>>
>> I wanted to try core.match for a while and fiddled around a bit to see
>> what kind
Hey,
this looks pretty sweet! I stuck with EDN for now but its way too slow, so
I'm gonna give this a shot.
One thing: I'm don't think its the best idea to fall back to
*default-data-readers*, would you be open to adding a second argument to
'cljson->clj which takes a map specifying readers? e
Hey,
this looks very interesting. However I'm a little concerned about the
semantics of >! and https://gist.github.com/thheller/5890363
(ns thheller.async-test
(:use clojure.test)
(:require [clojure.core.async :as async :refer (go >! !! ! reply-to reply)
(recur (inc work-done))
Hi,
you could use a macro, but a simple function should suffice. I use
something along the lines of
(defn cond-transform [x & pairs]
(reduce (fn [x [test-fn transform-fn]]
(if (test-fn x)
(transform-fn x)
x))
x
pairs))
;; example
Hey,
cookie-store does not expect a string but a map like (cookie-store {:key
your-key}) otherwise it will generate a random new key each restart, which
you observed.
You can also set some options for the cookie itself, see :cookie-attrs
(http://clojuredocs.org/ring/ring.middleware.session/wra
Hey,
I'm doing some core.async tests and want to create a basic pub/sub model.
Messages are >! on one channel and >! to many others.
(deftest ^:wip async-test2
(let [subscribers (atom [])
events (chan 100)]
(go (loop []
(when-let [ev (! events i)
(r
> on it.
>
> Alex
>
> On Tuesday, July 9, 2013 6:46:21 PM UTC-5, Thomas Heller wrote:
>>
>> Hey,
>>
>> I'm doing some core.async tests and want to create a basic pub/sub model.
>> Messages are >! on one channel and >! to many others.
>>
This is awesome, thanks a ton. Solved all the issues I had with 0.2
Cheers,
/thomas
On Wednesday, July 10, 2013 8:26:03 PM UTC+2, Chas Emerick wrote:
> Earlier today, we released [com.keminglabs/cljx "0.3.0"], which brings a
> bunch of significant changes and improvements:
>
>
>
> https
One side node, *repeatedly* produces a lazy-seq. Since the REPL forces that
seq when it tries do print everything you get the desired results, but if
you were to
(def x (repeatedly 1000 addmod)
and then inspects mobs it would be empty, since no one forced the seq. If
you want to force side-eff
Hey,
this sounds interesting. I just tried it on my project but it seems to be
missing several keywords in the constants_table.js.
Dumb example: the code tries to use cljs.core.constant$keyword$1064 , which
does not exist.
Will try to investigate, just a heads up.
/thomas
On Wednesday, Augus
y, August 29, 2013 10:51:56 AM UTC+2, Thomas Heller wrote:
>
> Hey,
>
> this sounds interesting. I just tried it on my project but it seems to be
> missing several keywords in the constants_table.js.
>
> Dumb example: the code tries to use cljs.core.constant$keyword$1064 ,
> w
>
> For #2, we can't intern the keywords like Clojure does on the JVM because
> JavaScript does not provide weak references. If we interned dynamically
> created keywords, then we'd have an exploitable memory leak.
This may actually be a non-issue for Browser Environments since you would not
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 chok
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
>>>
>>>>> No, that's not it. So I tried:
>>>>>
>>>>> (def audio-context (js/AudioContext.))
>>>>> (.decodeAudioData audio-context (js/ArrayBuffer. 256) #(println "ok"
>>>>> %) #(println "error&quo
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 of
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 i
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
.
>
> > it uses clojure.tools.reader.edn/read-string
>
> Ugh, thanks. I forgot about that one as well.
>
> On Wednesday, June 17, 2015 at 5:10:24 AM UTC-4, Fluid Dynamics wrote:
>>
>> On Wednesday, June 17, 2015 at 4:52:00 AM UTC-4, Thomas Heller wrote:
>>>
On Wed, Jun 17, 2015 at 9:50 PM, James Reeves wrote:
> On 17 June 2015 at 09:51, Thomas Heller 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 -&
>
>
> 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 Cache
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 try/cat
while
but never get around to it. I might do that some day to create an actual
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 He
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
be a good idea to use
restarts. IMHO its not a good idea in clojure, especially coupled with
lazy-seqs.
But we are getting off-topic ...
Regards,
/thomas
On Fri, Jun 20, 2014 at 9:04 AM, Stefan Kamphausen
wrote:
> On Thursday, June 19, 2014 11:05:07 PM UTC+2, Thomas Heller wrote:
>>
>>
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 'livin
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 wrote:
> Short and simple answer: NullPointerException
>
> (def object-locations nil)
>
&g
Don't know Land of Lisp, but if you print it you can use (name :whiskey) to
get "whiskey" (as a String), also works on (name 'whiskey).
On Wed, Jul 9, 2014 at 5:28 PM, Cecil Westerhof
wrote:
> 2014-07-09 17:18 GMT+02:00 Thomas Heller :
>
> Oh and its rare (outs
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
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
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 deploy:dep
o just copies them INSIDE 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 (sorr
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 Fr
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
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 o
0.0-20140718-946a7d39"]
Confirmed to resolve CLJS-826.
On Tuesday, July 29, 2014 10:30:21 PM UTC+2, David Nolen wrote:
>
> Just add sonatype to your :repositories project.clj entry
> https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L79
>
> David
>
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 subscribe
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.
Sorr
affected.
>
> David
>
> On Wed, Jul 30, 2014 at 11:11 AM, Thomas Heller > 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 ke
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.
https://github.c
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 tha
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.
> >
>
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:
>
>
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
wrote:
> 2014-08-05 19:04 GMT+02:00 Thomas Heller :
>
> If you don't need the result of the for loop (which you don't
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 of
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 something
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
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
/thomas
On Saturday, August 23, 2014 5:12:30 PM UTC+2, Kyle Cordes wrote:
>
> On Thursday, 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-
jure and Postgres.
>
> Jason
>
> On Sat, Aug 23, 2014 at 11:23 AM, Thomas Heller > wrote:
> > Hey Kyle,
> >
> > thanks for the Feedback. Appreciate it.
> >
> > I think you misunderstood the meaning of a "type" in shadow-psql. A
> "type&quo
ks,
> Shashy
>
> 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.
>>
>> Transpa
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
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
f
ealise that my original solution was actually sufficient for my
> somewhat 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 >
>
> Ludwik.
>
>
> 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
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 (Executors/newFixedThreadPoo
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, tha
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 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 execut
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
@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 user-
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 sta
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
most
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 bu
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))
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 it
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 nam
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
a
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 gain,
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 to
>
> 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
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 versi
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 that
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,
T
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, Octo
maintain our own 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/5616a66e40c5dc6ec9be9beacfc0ea20d
0:21:21 AM UTC+2, John Szakmeister wrote:
>
> On Tue, Oct 18, 2016 at 2:59 AM, Thomas Heller > wrote:
> [snip]
> > While this issue can be very confusing you will hardly ever run into it
> when
> > following best practices. As David suggested using a custom js->clj h
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.
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 Fo
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
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
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 some other conflicting c
>
> 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
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 durin
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,
>
>
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 ym-f
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
:foo.bar.xyz/hell
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 ube
(
> 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 c
ding is correct, then
> (>!! 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 val
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, 2
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,
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 cu
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"
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 forcing
1 - 100 of 156 matches
Mail list logo