This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-01
Channels
- # admin-announcements (3)
- # arachne (6)
- # boot (17)
- # cider (51)
- # cljs-edn (19)
- # cljsjs (1)
- # clojure (22)
- # clojure-russia (154)
- # clojurebridge (5)
- # clojurescript (20)
- # cursive (1)
- # emacs (2)
- # ldnclj (1)
- # liberator (1)
- # mount (1)
- # om (44)
- # onyx (6)
- # ring-swagger (4)
- # rum (30)
- # slack-help (8)
- # untangled (40)
hi guys I'm looking for a currency formatter lib in cljs. Do you guys have any recommendation ?
Hi all, looking at the following func for casting a string to an int:
(defn parse-int [s]
(Integer/parseInt (re-find #"\A-?\d+" s)))
I am writing clojurescript, and so perhaps don’t have access to the Integer class. Is that right?
@ezmiller: yea, try (js/parseInt (re-find #"\A-?\d+" s) 10)
i'm not sure if GCL has its own parseInt, but js has a native one. the extra arg is the base, which you should always include because javascript's parseInt does stupid things if you don't give it a base
@paradoxquine: thanks! That worked. And thanks for the tip about the xtra argument as well.
glad to help
What’s the best way to do a simple redirect in clojurescript? I’m using reagent have a route setup for page at /thankyou
.
It looks like this tutorial is deprecated? https://www.niwi.nz/cljs-workshop/#_routing_in_the_browser
The routing step, git checkout step3
, fails with string.cljs:38 Uncaught Invalid match arg: /^#/
when going to localhost:5050
I don't see how that's possible since the dependencies are frozen. Am I doing something wrong?
@borkdude thanks. I ended up using a shorthand version of that, just calling (set! js/window.location.href “/thankyou”)
This worked, but I didn’t look to see whether it maintained the history. I’ve seen some stuff about using the secretary module.
anyone using atom and protorepl? i'm not sure how to set it up for figwheel
@risto: that tutorial is pretty deprecated, I have done it some time ago..., I don't know why that errors is happens...