This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-29
Channels
- # aws (2)
- # bangalore-clj (2)
- # beginners (36)
- # boot (10)
- # cider (9)
- # cljs-dev (19)
- # clojure (47)
- # clojure-russia (4)
- # clojure-spec (18)
- # clojure-uk (4)
- # clojurescript (71)
- # core-async (20)
- # core-logic (2)
- # css (3)
- # cursive (5)
- # data-science (15)
- # datomic (7)
- # emacs (13)
- # figwheel (4)
- # klipse (1)
- # luminus (5)
- # lumo (1)
- # off-topic (33)
- # re-frame (17)
- # shadow-cljs (1)
- # spacemacs (5)
- # specter (21)
- # unrepl (1)
- # vim (7)
@srachamim Do you mean, a web app template with Clojure on backend and ClojureScript on frontend?
If so, try Luminus (http://www.luminusweb.net/).
I mean, some repository with some examples pages that I can see how can I integerage clojurescirpt with react-native and a recommended project structure for developing for iOS & Android & Web with same logic
@srachamim do you come from the JS world?
I come from JS, and I consider using clojurescript for my next project, which I need an iOS and Android app
Okay. That's what I figured. The answer is that ClojureScript, to my knowledge, does not have exactly what you are looking for as we see in the JS world that is. To clarify, it is my understanding that you are looking for something like one of these https://habd.as/awesome-react-boilerplates/
Where it provides a nice little starting point, basic tooling and a "run these 3 commands and you can start coding" approach
Having said this, there are some open source projects that can give you a little bit of a starting point - like these https://clojurescript.org/guides/project-templates. Of interest would be - jamal
and saapas
Further, if you are interested in seeing a new open source project to get some inspiration, Clojure Academy open sourced their code base - https://github.com/clojurecademy/clojurecademy
With the above in mind, I imagine your looking for something like a React Native starterkit - in this case I might loo to https://github.com/drapanjanas/re-natal.
If this is a personal project and not a freelance project with business stakeholders which are dictating technologies, then I would recommend looking into PWA - which means you could write in any of the React like CLJS frameworks
@srachamim re-frame
is great choice for react, client-side, ClojureScript Web app development, with quick-starter template https://github.com/Day8/re-frame-template , and playground https://day8.github.io/re-playground/
for general ClojureScript http://funcool.github.io/clojurescript-unraveled/
I have this: (def cc {:new-messages-in-other-chat '(1 1 2 3)})
and I'm trying to do (update-in cc [:new-messages-in-other-chat] remove #{1})
to filter out the 'ones', but it's throwing an error saying: ClassCastException clojure.lang.PersistentList cannot be cast to clojure.lang.IFn clojure.core/complement/fn--4611 (core.clj:1392)
I don't really understand this error, couldn't anyone give me a hint?
remove takes a collection as the last argument, so you would need to do something like (update-in cc [:new-messages-in-other-chat] #(remove #{1} %))
do you have a code example? seems like aget
should work
a lot of times you can just just use the clojure seq functions
and then you don’t to worry about what the underlying type is
like nth
, first
, etc
i didn’t know that either
guess i’ve never tried calling sort on a java array
interesting
from docs: If coll is a Java array, it will be modified. To avoid this, sort a copy of the array.
(source sort)
shows that it converts the collection to an array then sorts that using java.util.Arrays/sort
then calls seq
on the result.
And the conversion to-array
is part of clojure.lang.RT
so I expect there's an optimization that if you pass in a Java array, it just hands it back as-is. Hence the sort-in-place behavior.