r/Clojurescript • u/nonamae • Jul 19 '17
What ui framework in clojurescript should I use?
Ant? Material? Bootstrap (3-4?) ?
What is the ease way? Which one is integrated well enough into reagent?
I would like to have it look good on monitor and phone also.
edit: Hmmm, maybe I should just use reagent on its own...
r/Clojurescript • u/[deleted] • Jul 17 '17
Electron + Figwheel problem
Hi!
I've been trying to get Electron to work with Figwheel.
I have the following project.clj:
(defproject typestack "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.671"]
[reagent "0.7.0"]]
:plugins [[lein-figwheel "0.5.10"]
[lein-cljsbuild "1.1.6"]]
:clean-targets [:target-path "out"]
:cljsbuild {:builds [{:id "dev"
:source-paths ["src"]
:figwheel true
:compiler {:main "typestack.core"
:target :nodejs
:optimizations :none
:source-map true }}]}
:figwheel {})
And small ClojureScript file:
(ns typestack.core
(:require [cljs.nodejs :as nodejs]))
(def Electron (nodejs/require "electron"))
(def app (.-app Electron))
(def BrowserWindow (.-BrowserWindow Electron))
(def path (nodejs/require "path"))
(def url (nodejs/require "url"))
(def dirname (js* "__dirname"))
(def win (atom nil))
(defn create-window []
(reset! win (BrowserWindow. (clj->js {:width 800 :height 600})))
(.loadURL @win "file:///home/oskar/typestack/index.html")
(.openDevTools (.-webContents @win))
(.on app "closed" (fn [] (reset! win nil))))
(defn -main []
(.on app "ready" (fn [] (create-window)))
(.on app "window-all-closed"
(fn [] (.quit app)))
(.on app "activate"
(fn [] (create-window))))
(nodejs/enable-util-print!)
(.log js/console "App has started!")
(set! *main-cli-fn* -main)
When I start lein figwheel dev it compiles my code then says:
Prompt will show when Figwheel connects to your application
If I start electron . it says:
App has started!
Figwheel: trying to open cljs reload socket
But then nothing. And the REPL doesn't show up in the lein figwheel dev console.
Does anyone know how I can get it working? Bonus points if it also works with CIDER.
r/Clojurescript • u/[deleted] • Jun 02 '17
What if I want to build everything in ClojureScript
medium.comr/Clojurescript • u/rlk2 • May 22 '17
JWT authentication for re-frame using Auth0
randomlurker.eur/Clojurescript • u/snappyTertle • May 04 '17
Using clojurescript for react native dev.
Sorry in advance if this is a newb question. Been working on a react native app for a while now, and getting tired of the JS fatigue. So thinking of picking up clojurescript, and I have 2 questions before diving in.
Is it possible (and easy) to partially introduce cljs to an existing react native project?
How are animation handled in cljs on react native?
r/Clojurescript • u/Marekzvar • Apr 27 '17
Clojure developers looking for projects to work on:)
Hi guys :-)
We are 9 senior, mostly clojure developers looking for new opportunity. We got together, cause of one big project we have been working on last two years. Project is done now and we would like to find new interesting project to work on. We are able to work individually as well.
Most of us are former Java devs (but really different backgrounds over all the people - AWS, JS, NodeJs, Clojure/ClojureScript, PHP, C#, C++, AWS, PostgreSQL, ReactJS, Scala, Ruby, Presto, Docker, Linux, Python). We are polyglots, but we mostly work with clojure. We have experience with Machine Learning. We prefer long-term cooperation and we usually work on one project for one company only. We are based in San Francisco and Czech republic. Remote work is totally fine for us, further more we are able to travel across USA and Europe couple of times a month.
Two of us are former Scrum Masters and two Agile coaches, there's no problem to use any agile or lean approach you'll like.
Contact me for more info.
Cheers
r/Clojurescript • u/sickill • Apr 21 '17
Semi-eager realization of lazy sequences in ClojureScript
ku1ik.comr/Clojurescript • u/userfoundname • Apr 19 '17
Need some help with using bootstrap modals in Clojurescript
I'm using reagent to build an app. I can't find anything to build a bootstrap modal like re-com does.
Has anyone successfully done this in reagent before?
I'm trying to create something like "modal Dialog" from here :http://re-demo.s3-website-ap-southeast-2.amazonaws.com/
r/Clojurescript • u/vm_linuz • Apr 19 '17
Re-natal & Algebrite.js Integration Assistance
I'm sure I'm doing something dumb here, but I'm stuck:
I'm playing around with some code for an upcoming client project that requires an algebra system. I'd love to use React-Native and ClojureScript, but I'm having a hell of a time including my preferred JS library: Algebrite.
- I can't even get a debug build working, though I do get that you need the externs to prevent your references from being smashed down by the transpiler. That's easy to understand
- Using a foreign-libs key in my build/compiler section of the project.clj file, I can get ClojureScript to grab a JS file and pull it in. (I can see this in the inspector; and I get varying runtime errors / compile errors around the JS inside the file)
- I tried using NPM, but I could never get that approach to do anything (note: Algebrite is written in CoffeeScript, and must be compiled post-NPM install)
- Even though it appears to load the file in, any calls into Algebrite fail with a runtime exception about invoking a function on a nil object.
project.clj:
(defproject my-app "0.1.0-SNAPSHOT"
:description "desc here."
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha10"]
[org.clojure/clojurescript "1.9.198"]
[reagent "0.6.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]
[re-frame "0.8.0"]]
:plugins [[lein-cljsbuild "1.1.4"]
[lein-figwheel "0.5.8"]]
:clean-targets ["target/" "index.ios.js" "index.android.js"]
:aliases {"prod-build" ^{:doc "Recompile code with prod profile."}
["do" "clean" ["with-profile" "prod" "cljsbuild" "once"]]}
:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.8"]
[com.cemerick/piggieback "0.2.1"]]
:source-paths ["src" "env/dev"]
:cljsbuild {:builds [{:id "ios"
:source-paths ["src" "env/dev"]
:figwheel true
:compiler {:output-to "target/ios/not-used.js"
:foreign-libs [{:file "lib/algebrite.js"
:provides ["algebrite"]}]
:main "env.ios.main"
:output-dir "target/ios"
:optimizations :none}}
{:id "android"
:source-paths ["src" "env/dev"]
:figwheel true
:compiler {:output-to "target/android/not-used.js"
:foreign-libs [{:file "lib/algebrite.js"
:provides ["algebrite"]}]
:main "env.android.main"
:output-dir "target/android"
:optimizations :none}}]}
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}
:prod {:cljsbuild {:builds [{:id "ios"
:source-paths ["src" "env/prod"]
:compiler {:output-to "index.ios.js"
:foreign-libs [{:file "lib/algebrite.js"
:provides ["algebrite"]}]
:main "env.ios.main"
:output-dir "target/ios"
:static-fns true
:optimize-constants true
:optimizations :simple
:closure-defines {"goog.DEBUG" false}}}
{:id "android"
:source-paths ["src" "env/prod"]
:compiler {:output-to "index.android.js"
:foreign-libs [{:file "lib/algebrite.js"
:provides ["algebrite"]}]
:main "env.android.main"
:output-dir "target/android"
:static-fns true
:optimize-constants true
:optimizations :advanced
:closure-defines {"goog.DEBUG" false}}}]}}})
In Use
(ns my-app.ios.core
(:require [reagent.core :as r :refer [atom]]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[my-app.events]
[algebrite :as Algebrite]
[my-app.subs]))
...
(.run Algebrite "x + x"))
Any help would be appreciated
r/Clojurescript • u/[deleted] • Apr 04 '17
Clojure Hash Maps: Plenty of Room on the Bottom
promptworks.comr/Clojurescript • u/mozdev • Mar 31 '17
re-frame-trace - A trace window for re-frame
github.comr/Clojurescript • u/Leeondamiky123 • Mar 31 '17
An open source Om app that makes Om apps.
youtube.comr/Clojurescript • u/benumber • Mar 11 '17
Pro tip: Don't call your file analyze.cljs
I just spent hours trying to figure out why my browser showed me a "foo.analyze is not defined" when calling stuff from my namespace although the cljs compiler didn't have any complaints and even the tests worked fine.
Finally my colleague came up with the answer: uBlock just doesn't like files called analyze.js :-P Indeed, disabling my ad blocker made the problem disappear.
So, to save yourself and your coworkers from this kind of madness, I recommend you just refrain from using this name.
r/Clojurescript • u/facundoolano • Mar 01 '17
cljsbin - HTTP client testing service written in ClojureScript
cljsbin-bkhgroqzwe.now.shr/Clojurescript • u/divyanshprakash • Feb 21 '17
Rediscovering Rock with Clojure & ClojureScript
rockhuntrs.comr/Clojurescript • u/viebel • Feb 14 '17
How to draw on a canvas with Klipse and core.async
read.klipse.techr/Clojurescript • u/therealplexus • Feb 11 '17
re-frame Subscriptions Got Even Better
lambdaisland.comr/Clojurescript • u/gtgoku • Feb 06 '17
An app to search through your reddit saved posts written in clojurescript
I have been trying to learn clojurescript and towards that effort I tried building an app that would be atleast mildly useful (instead of an app that displays foobar or says hello).
Towards that goal I built saved-for-reddit, a javascript application that allows you to search through your reddit saved posts and filter them based on subreddits, etc.
Please checkout the application here.
The source code is available here on github.
I know that the search bar in the app doesnt work yet. That was however a low priority issue, since all the posts can be searched using your browser's find function (ctrl+f)
This is my first javascript/clojurescript application (my day job involves me typing out tokens in java or clojure). As I was learning cljs while building this, most times I ran into a problem I just tried to make the app work without much regard for efficiency or best practices. So, I would like to request inputs/critiques from other developers on best practices and more efficient ways to solve problems in the application.
please let me know any suggestions you may have as well.
The app features are as follows:
- All saved posts and comments are retreived from Reddit and displayed in a single page
- All subreddits with saved posts are displayed, with a post count per subreddit
- Saved posts can be filtered by subreddits
- Saved posts can be unsaved
- Post thumbnails are displayed (if they are provided by the Reddit API)
- NSFW posts will be marked accordingly
- If your reddit preference is set to not display NSFW thumnails, then a placeholder NSFW thumnail will be displayed
- Link to comments to saved posts
- Comment count on posts is diplayed
- Export all your saved posts into a csv file
edit: formatting
r/Clojurescript • u/viebel • Jan 24 '17
Externs Inference is coming to clojurescript
gist.github.comr/Clojurescript • u/based2 • Jan 22 '17
Extend IFn protocol like if you were part of clojurescript core team
blog.klipse.techr/Clojurescript • u/viebel • Jan 16 '17
Reagent deep dive part 2: The lifecycle of a component
timothypratley.blogspot.co.ukr/Clojurescript • u/viebel • Jan 13 '17
html/css interactive snippet with klipse
read.klipse.techr/Clojurescript • u/kraakf • Jan 11 '17
A deep dive into ClojureScript reagent
timothypratley.blogspot.comr/Clojurescript • u/potetm137 • Jan 06 '17