This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-20
Channels
- # arachne (11)
- # aws (2)
- # beginners (33)
- # boot (167)
- # cider (71)
- # clara (2)
- # cljs-dev (28)
- # cljsrn (3)
- # clojars (1)
- # clojure (83)
- # clojure-austin (21)
- # clojure-dev (24)
- # clojure-russia (19)
- # clojure-spec (33)
- # clojure-uk (108)
- # clojurescript (114)
- # component (1)
- # core-async (1)
- # cursive (7)
- # datomic (13)
- # editors (1)
- # emacs (15)
- # hoplon (10)
- # lein-figwheel (4)
- # leiningen (3)
- # mount (2)
- # om (134)
- # om-next (4)
- # onyx (42)
- # pedestal (41)
- # quil (2)
- # re-frame (29)
- # reagent (4)
- # remote-jobs (6)
- # ring-swagger (5)
- # untangled (9)
@bcbradley - http-kit is for the server. If you want to talk to a websocket server that happens to be powered by http-kit, see https://www.html5rocks.com/en/tutorials/websockets/basics/
@beppu thanks for the advice, I'm actually in the middle of implementing a client library for discord's http api
it has a section on websockets, but after looking into http-kit it seems I can't really use it to solve this problem
right now i'm looking through http.async.client source on github to figure out if i can use that instead
@bcbradley there's a slack client which has ws, probably worth looking at :)
https://clojure.org/reference/lazy This page says
available in the SVN trunk since rev 1287
, what is this SVN trunk, where can we find it ?We are confused with this
lazy-cons
the article is talking about, it is not even in the api doc of clojure 1.1, is it a super-outdated article without a date ?After investigating a bit it looks like this is around 8 years old, it should really be updated since it is the reference article about clojure laziness.
it’s definitely confusing that the 8 year old model is referred to as “the current seq model” in the document
FYI - I see SwiftKey has a version that they wrote with Clojure and Skummet (lean compile)
Apologies if that isn't really news (about SwitftKey Clarity) . Here: https://blog.swiftkey.com/what-makes-clarity-keyboard-tick-clojure/
exciting cos I wanted to make a keyboard with Clojure as well.. thought it was a bad idea
^String x
@placeboza wow! Microsoft uses Clojure
@placeboza the logo at the bottom http://swiftkey.com website
Microsoft has bought a couple companies that use Clojure. MixRadio is another.
@yenda pre-Git, Clojure was stored in svn, but that history should still be in the existing git repo. I moved that lazy page over to the current site because some of it still seemed relevant, but it should be treated as a historical document. I will try to make that clearer on there though.
Hey guys just an update https://clojureremote.com/opportunity-grants/
hmm, using transit to serialize very long lists I'm getting "org.msgpack.unpacker.SizeLimitException: Size of array (4236122) over limit at 4194304", am I basically SOL there as that's the max array size for msgpack and transit lists get stored as msgpack arrays? guess I should switch to json?
@bfabry yeah, I think you have to switch to JSON, but to be honest JSON has been just as fast as msgpack most of the time
On some platforms msgpack is actually slower.
hmmm, I'm guessing not this one, big heavy java workers, but yeah I'm sure json is plenty fast. is its compression good though? we just switched from edn because the size of our serialized data vs the size in memory difference was large enough it was causing worker load estimation issues
EDN doesn't have compression though, Transit does. so things like keywords are written once, then afterwards they are written as '^1'
but give it a try? It's just a matter of changing a single keyword to :json
Although if everything is on the JVM I'd also be tempted to use Fressian. That gives you even more features/performance
sweet. that should make a difference. although to be honest I'm tempted to just start yelling at google that assuming the serialized data and the heap representation will move together is a silly idea
Fressian is the data format that Datomic uses. It's a lot like Transit, but full binary and a fair bit faster.
It'll do crazy things like write true, false, 4 , 0.0, etc. as single bytes.
hmmmm. seems like fressian is giving us back ArrayList's where previously we were getting Seqs from edn and transit
I'm getting this error "java.sql.SQLException: No suitable driver found for jdbc:postgresql..." when trying to access the database from Clojure. When installing PostgreSQL, I installed the JDBC driver and I also added [org.postgresql/postgresql "9.4.1212"] to the dependencies with no changes in the error. Any ideas what might be going on?
pupeno: What does your db-spec
look like and what version of java.jdbc
are you using?
Cool, glad you figured it out!
mmmm seems like it likes java types, so will have to add some custom handlers for maps lists and sets
what does this exception means exactly ? clojure.lang.ExceptionInfo: Invariant violation in
taoensso.sente:?`. Test form: ((fn* [p1__33724#] (satisfies? interfaces/IServerChanAdapter p1__33724#)) web-server-ch-adapter)
with failing input: ta[email protected]f35bcfd
`
@bfabry yep, never underestimate the power of an army of devs optimizing something for a decade.
does cause some bizarre " java.lang.UnsupportedOperationException: Caller does not own the underlying input stream and should not call close()." in the CI suite though
Hi everyone! I’m toying around with clojure.spec/form, wondering about this:
user> (let [limit 100] (s/form (s/spec #(< % limit))))
(clojure.core/fn [%] (clojure.core/< % limit))
Let’s say that I’d pass the result of s/form around, I’d have to somehow pass the limit
used while the spec was created
I think that’s expected behavior
but you could get around it by something like (let [limit 100] `(s/form (s/spec #(< % ~limit))))
@hiredman hmm.. I'm working on a macro which expands to a definterface
call. One of the inputs to the macro has an ^X
typehint, which is added to a generated symbol with with-meta
. But upon evaluation, I get "NoClassDefFoundError: java/lang/X"
I could prefix the symbol with the name of the current ns, but that seems like a band-aid fix
@moxaj Does this help?
bar=> (defmacro foo [x] `(println (meta ~x)))
#'bar/foo
bar=> (foo (with-meta [] {:tag X}))
{:tag bar.X}
(I’m not quite sure what you’re really trying to do but this at least resolves to the bar.X
form you seem to want)@seancorfield not really 😞. I need to apply the meta (type hint) at compile time to another symbol
Interesting info graphic https://anvaka.github.io/common-words/#?lang=clj